I have the following javascript:
I call it using this:
Works in IE, not in Firefox. I know with javascript, you can use shortcuts (like omitting the document in document.imgpreview and so on). I thought maybe that would be the problem, but in no way am I a javascript expert. Anyone have any idea?
FYI, imgpreview is the name and id of an iframe that loads a preview of the image typed into the text area.
PHP:
<script type="text/javascript">
function getPreview(form){
link = form.link.value;
document.imgpreview.location.href("imagepreview.php?url="+link);
}
</script>
I call it using this:
PHP:
<input type="text" name="link" onChange="javascript:getPreview(this.form)" size="40">
Works in IE, not in Firefox. I know with javascript, you can use shortcuts (like omitting the document in document.imgpreview and so on). I thought maybe that would be the problem, but in no way am I a javascript expert. Anyone have any idea?
FYI, imgpreview is the name and id of an iframe that loads a preview of the image typed into the text area.





