I have an application with an index.html page that loads two frames.<br>
One is a navigation bar (using JavaScript) with options that change<br>
color when you mouseover/mouseout. On that frame is a form (menuForm) with hidden fields that save results of user's initial input and its validation (or not), after they have entered their account info on the other frame and submitted it. When user has validated successfully, they can click on an option on the navigation bar and then I post the form with the hidden data and send it to a servlet. The servlet returns (in the other frame - "body" ) the results of whatever option user selected. The code bits below work on Netscape, but IE 4.0 gives me a script error because it doesn't like the "document.captureEvents(Event.CLICK);" line. This code is the only way I know to just load the results sent back from the servlet without then immediately replacing them by overwriting with the link in the <A HREF=... (The clickHandler(Click) code with the eventual return of false stops the link event from occurring.) Since IE doesn't work with this, does anyone know another way to stop the link from occurring, or is there another way I can do a submit without a button in my code that will simply do the submit and put the results in my "body" frame?<br>
<br>
I'm sorry for the length of this question, but I don't know much about any scripting language and I'm at my wits end as to how to get this to work on both browsers. Any help will be very gratefully received!<br>
<br>
Here's the HTML on the navigation bar...<br>
<br>
<A HREF="companyMain.htm" onMouseOver="apage1()" onMouseOut="bpage1()"> <br>
<IMG SRC="company.gif" WIDTH=144 HEIGHT=12 BORDER=no></A><br>
<br>
Here's the JavaScript...<br>
<br>
document.captureEvents(Event.CLICK);<br>
document.onClick = clickHandler;<br>
<br>
function clickHandler(Click)<br>
{<br>
// **************************************************************<br>
// ** Setup for view results..<br>
// **************************************************************<br>
<br>
document.menuForm.submit();<br>
document.menuForm.target="body";<br>
return false;<br>
}<br>
One is a navigation bar (using JavaScript) with options that change<br>
color when you mouseover/mouseout. On that frame is a form (menuForm) with hidden fields that save results of user's initial input and its validation (or not), after they have entered their account info on the other frame and submitted it. When user has validated successfully, they can click on an option on the navigation bar and then I post the form with the hidden data and send it to a servlet. The servlet returns (in the other frame - "body" ) the results of whatever option user selected. The code bits below work on Netscape, but IE 4.0 gives me a script error because it doesn't like the "document.captureEvents(Event.CLICK);" line. This code is the only way I know to just load the results sent back from the servlet without then immediately replacing them by overwriting with the link in the <A HREF=... (The clickHandler(Click) code with the eventual return of false stops the link event from occurring.) Since IE doesn't work with this, does anyone know another way to stop the link from occurring, or is there another way I can do a submit without a button in my code that will simply do the submit and put the results in my "body" frame?<br>
<br>
I'm sorry for the length of this question, but I don't know much about any scripting language and I'm at my wits end as to how to get this to work on both browsers. Any help will be very gratefully received!<br>
<br>
Here's the HTML on the navigation bar...<br>
<br>
<A HREF="companyMain.htm" onMouseOver="apage1()" onMouseOut="bpage1()"> <br>
<IMG SRC="company.gif" WIDTH=144 HEIGHT=12 BORDER=no></A><br>
<br>
Here's the JavaScript...<br>
<br>
document.captureEvents(Event.CLICK);<br>
document.onClick = clickHandler;<br>
<br>
function clickHandler(Click)<br>
{<br>
// **************************************************************<br>
// ** Setup for view results..<br>
// **************************************************************<br>
<br>
document.menuForm.submit();<br>
document.menuForm.target="body";<br>
return false;<br>
}<br>