Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape/IE

Status
Not open for further replies.

Cecile

Technical User
Nov 29, 2001
2
US
Hi all,
I am having a big trouble with Netscape. My Code works fine with I Explorer but It doesn't want to submit my code in Netscape. Do U have any idea?
Thanks for your help.
Here is my code:
<html>
<head>
<LINK href=&quot;include/StyleCof.css&quot; REL=&quot;stylesheet&quot; Type=&quot;text/css&quot; TITLE=&quot;StyleCof&quot;>
<script language=&quot;JavaScript1.2&quot; src=&quot;include/navigation.js&quot;></script>
<script>
function clickValider()
{ var var1=document.formulaire.choix.value.toUpperCase();

if (var1!=&quot;V&quot; && var1!=&quot;P&quot; && var1!=&quot;B&quot;)
{
document.formulaire.choix.focus();
document.formulaire.choix.select();
alert(&quot;Veuillez saisir P,V ou B.&quot;);
return;
}else{document.formulaire.submit();}
}

</script>
</head>

<body onload=&quot;chargement('popup');&quot; style=&quot;background-image:url(images/bgPopUp.gif);background-repeat:no-repeat&quot;>

<!-- Début : Tableau -->
<table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;>
<form name=&quot;formulaire&quot; method=&quot;post&quot; action=&quot;Z4L2P13-1.html&quot;>
<tr>
<td>

<table cellpadding=&quot;0&quot; border=&quot;0&quot;>
<tr>
<td colspan=2 valign=top class=&quot;TextePopUp&quot;>
<table align=&quot;center&quot; height=&quot;29&quot;>
<tr>
<td class=&quot;TextePopUp&quot; height=&quot;48&quot;><b>Votre choix :</b> </td>
<td height=&quot;48&quot;>
<input type=&quot;text&quot; name=&quot;choix&quot; size=&quot;1&quot; maxlength=&quot;1&quot;>
</td>
</table>
</td>
</tr>
<tr>
<td colspan=2 valign=top class=&quot;TextePopUp&quot; height=&quot;29&quot;>
<div align=&quot;center&quot;><a href=&quot;javascript:clickValider()&quot;>Valider</a></div>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>

</body>
</html>
 
The only thing that i found wrong was in the <body> tag.

<body onload=&quot;chargement('popup');&quot; style=&quot;background-image:url(images/bgPopUp.gif);background-repeat:no-repeat&quot;>

There is no function chargement(x) defined so whenever it loads in Netscape it trys to run chargement() cant find it and stops all other javascript execution.

Change if to <body style=&quot;background-image:url(images/bgPopUp.gif);background-repeat:no-repeat&quot;>

and try it again.

Hope that helps, DeltaFlyer
The Only Programmer To Crash With Style. LOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top