From research, I'm assuming I need to use "Content-type: application/x-javascript\n\n" but haven't been able to find any details. Does it go in the head section of the html immediately in front of all the javascript functions? Does it need to be repeated for each function? And/Or does it need to be embedded in the body wherever a javascript function is called? Or am I totally incorrect about what is needed? My experiments thus far have all failed and I suspect I'm missing something simple.
A sample, here is the onSubmit statement:and here are the functions in the head of the htmlonSubmit="return (CompareD(this) && valisort(this));"
If someone could show me where/how to use the content type statement back and forth between javascript and html in this example, I would be eternally grateful! (I realize that some of the functions could be totally re-created in Perl but clientside onBlur and onFocus for instance would be difficult - at least for me!)<SCRIPT language="JavaScript"> function CompareD(thd){ //function details } </script> <SCRIPT language="JavaScript"> function valisort(pmp){ //function details } </script>
edited: Tue Dec 9 20:59:15 2003 by jeffa - code tags and formatting
In reply to embedding Javascript in perl generated html by waris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |