Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
Running Windows on your Mac
Javascript Problem: Safari 4.0 for Windows XP
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dipesh" data-source="post: 900802" data-attributes="member: 119062"><p>I was testing some scripts across major browsers. It was going on well till I tested on Safari 4.0 for Windows XP.</p><p>I wanted to put some values in the hidden field before the form is submitted.</p><p></p><p>When the form is submitted the value of the submit button doesn't seem to be set by the the browser(Safari 4.0). The URL after submit doesn't show the name of the submit button.</p><p></p><p>Would be very glad if anyone can show some pointers or explain why Safari is behaving this way.</p><p></p><p>Thank you.</p><p></p><p></p><p><?</p><p>//----------</p><p>// test.php</p><p>//----------</p><p></p><p> echo '********************************************';</p><p> echo "<br>fname = ". $_REQUEST['fname'];</p><p> echo "<br>submitaction = ". $_REQUEST['submitaction'] . '<br>';</p><p> echo '********************************************<br>';</p><p>?></p><p></p><p><html></p><p><head></p><p> <script type="text/javascript"></p><p> <!--</p><p> function forward()</p><p> {</p><p> var x = document.getElementById("fconfirm");</p><p> // do something;</p><p> x.submit();</p><p> }</p><p> --></p><p> </script></p><p></head></p><p></p><p><body></p><p></p><p> <form id = "fconfirm" action = "test.php" method="get"></p><p> FirstName:<input type = "text" name ="fname"></p><p> <!-- some hidden fields --></p><p> <input type = "submit" id = "submitaction" name = "submitaction" value = "Submit" onclick = "javascript: forward();"></p><p></form></p><p></p><p></body></p><p></html></p></blockquote><p></p>
[QUOTE="dipesh, post: 900802, member: 119062"] I was testing some scripts across major browsers. It was going on well till I tested on Safari 4.0 for Windows XP. I wanted to put some values in the hidden field before the form is submitted. When the form is submitted the value of the submit button doesn't seem to be set by the the browser(Safari 4.0). The URL after submit doesn't show the name of the submit button. Would be very glad if anyone can show some pointers or explain why Safari is behaving this way. Thank you. <? //---------- // test.php //---------- echo '********************************************'; echo "<br>fname = ". $_REQUEST['fname']; echo "<br>submitaction = ". $_REQUEST['submitaction'] . '<br>'; echo '********************************************<br>'; ?> <html> <head> <script type="text/javascript"> <!-- function forward() { var x = document.getElementById("fconfirm"); // do something; x.submit(); } --> </script> </head> <body> <form id = "fconfirm" action = "test.php" method="get"> FirstName:<input type = "text" name ="fname"> <!-- some hidden fields --> <input type = "submit" id = "submitaction" name = "submitaction" value = "Submit" onclick = "javascript: forward();"> </form> </body> </html> [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
Running Windows on your Mac
Javascript Problem: Safari 4.0 for Windows XP
Top