Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTML Form process of POST by Safari



I am testing with the following HTML with a simple test CGI on my OS X machine:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en-US" xml:lang="en-US">
<head><title>Welcome</title></head>
<body>
<h3>Welcome </h3>
<form method="post" action="http://localhost/cgi-bin/test/cgi-bin/test?rm-login"; enctype="application/x-www-form-urlencoded" name="Form">
<h4><input type="submit" name="update" value="update particular" /></h4>
<input type="hidden" name="rm" value="update" /><div></div>
</form>
</body>
</html>


I found Safari behaves differently from IE and Netscape:

- I run it in Safari. I click the "update particular" button I got the URL like this:
http://localhost/cgi-bin/test?rm=login?rm=update which obviously created error


- When I run the same HTML on IE and Netscape I got the URL like this:
http://localhost/cgi-bin/test?rm=update

Which works fine with the rest.

It looks like in Safari the Post form processing is like to just append the hidden value rm=update to the action URI while IE and Netscape would replace the the "rm=login" in the actions URI with "rm=update" which is expected the result.

Any one could advise why Safari does this differently?

Thanks,

Leon
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.