Mailing Lists: Apple Mailing Lists

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

Re: HTML Form process of POST by Safari



I'll further emphasize Lucas Holt's point, and point out that you
*REALLY* *never* ever should include query parameters as part of a
form's action, it's a very common mistake, but it's bound to cause
your pages to break on browsers that support standards more strictly.

Instead of having ?rm-login at the end, try to do add this inside your form:

<input type="hidden" name="rm-login" value="" />

i'm hoping this will fix your issue. Keeping the enctype as it is
should be fine.

good luck :)

-chris

On Wed, 23 Jun 2004 23:18:13 +0800, Leon Chen <email@hidden> wrote:
> 
> 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.
> 
> 




-- 
Chris Holland
http://chrisholland.blogspot.com/
_______________________________________________
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.


References: 
 >HTML Form process of POST by Safari (From: Leon Chen <email@hidden>)



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.