Hi all,
On the addopt pages (like contactaddopt.php), is it possible to add client script for it in PhpMaker ?
Hi all,
On the addopt pages (like contactaddopt.php), is it possible to add client script for it in PhpMaker ?
Thanks but nope, still not working.
Here is my codes;
$(document).ready(function(){
var type="<?php echo $type;?>";
if(type=="1"){
$("#x_tip").val(2);
}else{
$("#x_tip").val(1);
}
alert(type);
});
I have a field with lookup table, that uses different table and have allow add option. So when users adding a new contact to that field, i need to change "x_tip" field value. That codes working when i adding manually in addopt.php pages. But i cant find where need to write in PhpMaker.
Ok, i find an another solution.
I wrote this codes in Row_Rendered function;
$type=$_GET['type'];
if($type==2){
$this->tip->EditValue = "2";
echo "<script type='text/javascript'>alert('$type');</script>";
}else{
$this->tip->EditValue = "1";
echo "<script type='text/javascript'>alert('$type');</script>";
}
I can get "$type" and alert is working fine. But i couldn't change the "tip" fields value. By the way "tip" field is a select box.
How can i change the selectbox selecting value ?
I used "CurrentValue" instead of "EditValue" and its done. Works fine.
Sorry for the flood messages.
Thanks again.