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!

IE vs NS applet calls

Status
Not open for further replies.

bowmancp

Programmer
Jul 6, 2001
2
US
Hi,
I am a new JS coder, and have a problem re NS4 and IE5 differences.
The application uses an applet to create a URL. This is called by a button:

<INPUT TYPE=&quot;BUTTON&quot; VALUE=&quot;Select Editions&quot; NAME ONCLICK=&quot;SubmitClick();&quot;>

The applet is declared as :

<APPLET CODE=&quot;SearchDialogQT.class&quot; CODEBASE=&quot;../../../Java&quot; WIDTH=&quot;367&quot; HEIGHT=&quot;106&quot; NAME=&quot;javaSearchDialog&quot;>

The function code is:

function SubmitClick() {
var sResultLink = &quot;Error&quot;;
sResultLink = self.document.javaSearchDialog.ExternSubmitAdvanceSearch(sSearchMode);
self.location = sResultLink;

return false
}

When I use this page in NS4 everything works fine. When I use it in IE5
the submit button does not appear to work.
I am working on a Mac, so both browsers are Mac versions.

Any suggestions would be really helpful.

Thanx,

Chris


 
calling validation function from an onclick in an input element is the best way to get errors and weird behaviours from browsers to browsers ...
you have to call your function from onsubmit in the form element
like this :
<form ... onsubmit=&quot;return SubmitClick()&quot;>
...
<INPUT TYPE=&quot;submit&quot; VALUE=&quot;Select Editions&quot;>
</form>

also note that if your SubmitClick() function always returns false, the form will never ever be submitted
make SubmitClick() return true if you want the form to be submitted, false instead
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top