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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE7 popup problem 1

Status
Not open for further replies.

cumap

IS-IT--Management
Jul 9, 2007
268
US
Hello all,
I'm having this jscript that's working with FF just fine; however, IE7 just won't response to it correctly (or the code is not written correctly, either way)

Code:
function confirmSubmit()
	{
		if (confirm("This UPDATE action can not be undone. Are you sure you want to continue?"))
		{
			document.form3.action="category_update.asp";
			document.form3.submit();
		}
	}

Basically, there's a form namely "form3" that I included onsubmit function to call the above confirmSubmit(). The confirm popup is displayed but it wouldn't redirect to go to the next page as specified like Firefox does. Why?

By the way, I'm writing this webpage with ASP.

Thanks!
 
Do you have any html elements inside the form that are named submit?

For example:
Code:
<input type="submit" value="submit the form" [!]name="submit"[/!]>

If so, you need to rename the element - submit should not be used as an element name.

-kaht

Google is gobbling up the Internet - electricphp

Finally, <. is a good thing!
 
>Basically, there's a form namely "form3" that I included onsubmit function to call the above confirmSubmit().
Then you don't call .submit(), just return true to the caller otherwise return false.
[tt]
function confirmSubmit()
{
if (confirm("This UPDATE action can not be undone. Are you sure you want to continue?"))
{
document.form3.action="category_update.asp";
[red]//[/red]document.form3.submit();
[blue]return true;[/blue]
}
[blue]else
{
return false;
}[/blue]
}
[/tt]
ps:Is that the way you indent?
 
Thank you guys and sorry for the REALLY delay response...

I believe tsuji got the point right on because I did resolve the problem by doing just that. The reason I had that .submit is because I had more than one submit buttons and giving "action" in the <form> script will only allow me to do only 1 thing. Now, I put both of the buttons' actions together in 1 page and have <form action=...>, the problem solved!!!

To kaht: I don't think it is the case b/c neither of my buttons has name="submit" included. But thanks anyway and your inputs have always been very helpful to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top