Gossamer Forum
Home : Products : DBMan : Discussions :

Help with Javascript

Quote Reply
Help with Javascript
I have to add a javascript in html.pl

This part should go before the head of the adding form:

<SCRIPT LANGUAGE="JavaScript">

</script>

And this in the form part:

<FORM NAME="main">
<SELECT NAME="Make" onChange="fillSelectFromArray(this.form.Team, ((this.selectedIndex == -1) ? null : team[this.selectedIndex-1]));">
<OPTION VALUE="-1">Select Team
<OPTION VALUE=1>Montreal Canadiens
<OPTION VALUE=2>Pittsburg Penguins
<OPTION VALUE=3>Toronto Maple Leafs
<OPTION VALUE=4>Ottawa Senators
</SELECT>
<BR>
<SELECT NAME="Team" SIZE="5">
<OPTION> </OPTION>
<OPTION> </OPTION>
<OPTION> </OPTION>
<OPTION> </OPTION>
<OPTION> </OPTION>
</SELECT>
</FORM>


I tried it, but when I add the first part into the head it return me an error.

What do I have to do?

Thank you





Quote Reply
Re: Help with Javascript In reply to
Are you putting the codes between the <head></head> codes in the subs in the html.pl file???

You can also use js files...search this forum for js and you should find a few threads that discuss using js files.

Regards,

Eliot Lee Wink
http://anthrotech.com/
Quote Reply
Re: Help with Javascript In reply to
yes, I'm putting the first part between the head in the subs in html.pl.

I tried to use the external js file but it didn't work :(

Quote Reply
Re: Help with Javascript In reply to
You'll need to post your full code or send a URL where we can view the code.