iframe and Ajax $.post -
i'm using $.post in function , i'm getting $ underfined. on onchange event in iframe. why guvign error?
script type="text/javascript"> function photoupdate(id, name, value, chk) { if(chk==false) { value=""; } $.post('photoupdate.php', {id: id, name: name, value: value}) }; </script> <input type="radio" name="primaryphoto" id="'.$recordid.'" value="yes" '.$checked.' style="position:relative; left:-20px; bottom:5px; margin:0px" onchange="photoupdate(this.id, this.name, this.value, this.checked)"/>
you need make sure iframe contents has own html/head/script src=jquery.js , whatnot.
Comments
Post a Comment