Click to See Complete Forum and Search --> : JavaScript and JSP


Padrill
07-15-2003, 06:38 AM
Hi all,

I started using JSP and I realised that some JavaScript functions (in the body of HTML) do not work when the page contains JSP code. Does anyone know why - or does anyone know a similar forum for JSP?
In the following HTML the code between the dashed lines seems to be ignored (when the page has any JSP code in it).

<tr>
<td>Date of birth :<font color="#ff0000"><sup>*</sup></font></td>
<td><script language="JavaScript1.2">
dropDownDay("selBirthDay");
dropDownMonth("selBirthMonth");
---added for clarity------------------------------------
dropDownYear("selBirthYear");
</script>
</td>
</tr>
<tr>
<td>Gender:<font color="#ff0000"><sup>*</sup></font></td>
<td>
<input name="rqradioGender" type="radio" value="Male"> Male
<input name="rqradioGender" type="radio" value="Female"> Female
</td>
</tr>
<tr>
<td>Nationality:<font color="#ff0000"><sup>*</sup></font></td>
-------------------------------------------------------------
<td><select name="rqselNationality" id="rqselNationality">
<option value="" selected>Please select</option>
<option value="">-------------</option>
<option value="Austria">Austria</option>


Note: dropDownXxx creates an HTML selection menu. I use that to reuse the code and not produce big HTML files.

I've also attached a sample screenshot.

Thanx

Khalid Ali
07-15-2003, 09:03 AM
Essentially jsp should not have any problem with js because both work on completely different domains..Post a link to your page if its possible,the code snippet you posted does not help much...(could be because I just woke up...:D )

Padrill
07-17-2003, 06:16 AM
The problem actually was with JBuilder. Running it from a Tomcat server worked fine.

Khalid Ali
07-17-2003, 07:45 AM
it sounds like the problem is fixed..???:p