Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing a forms Action value using Javascript in Netscape

Posted on 2001-07-30
4
Medium Priority
?
162 Views
Last Modified: 2012-06-27
Hi I have a form with some buttons and on the onClick() for the buttons I run a javascript function which changes the "ACTION = " for the form. This works fine in IE5+,i.e I can change the value and the form redirects correctly to. However in Netscape 4 and Netscape 6. It does not set correctly and the form always redirects to the original " ACTION= " web page .

Does anyone know of a way to correctly get this to work on Netscape, or have any pointers, comments, suggestions etc.

Thanks in advance

LK--<
0
Comment
Question by:LizardKing
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 9

Accepted Solution

by:
nimaig earned 300 total points
ID: 6334409
This works well in Netscape 4.7

<HTML>
<HEAD>
<TITLE>test</TITLE>
<script language="javascript">
<!--
     function changeAction(formObj){
          formObj.action = "test3.html";    
          formObj.submit();
     }
//-->
</script>
</HEAD>
<BODY>
<form name="form1" action="test2.html">
     <input type="button" value="Click" onClick="changeAction(this.form)">
</form>
</BODY>
</HTML>
0
 

Author Comment

by:LizardKing
ID: 6334547
nimaig

You are right that does work great in Netscape 4.7 , However it does not work in Netscape 6... Any Ideas on how to get it to work in that

Thanks Again

LK--<

0
 

Author Comment

by:LizardKing
ID: 6334612
Actually

I took out the code which checks the browser and left in just the formObj.action = "" and it seems to work fine
on all 3 browsers

Thanks a million

LK--<
0
 

Author Comment

by:LizardKing
ID: 6334614
Actually

I took out the code which checks the browser and left in just the formObj.action = "" and it seems to work fine
on all 3 browsers

Thanks a million

LK--<
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question