You are here: Re: Url from a form « HTML « IT news, forums, messages
Re: Url from a form

Posted by John Dunlop on 11/15/06 13:36

f8lerror@gmail.com:

> <form method=get form
> action="http://www.google.com/search?hl=en&lr=&safe=on ">

This is problematic. 'If the method is "get" and the action is an
HTTP URI, the user agent takes the value of action, appends a `?' to
it, then appends the form data set'. So if the URL in the action
attribute already has a query part, the URL created by the form will
have two question marks. The second question mark, the one actually
_in_ the query part, is data rather than a delimiter. To take your
example, with a non-empty form data set, the 'safe' variable - assuming
"variables" are separated by '&' - would have a value of 'on?' plus the
control-name, '=', and control-value of the first item in the form data
set.

There is no single production in the URI std that the HTML spec could
have pointed to to say 'the value of the action attribute must be
this'. What it could have said was that if the method is GET then the
URL in the action attribute must not have a query part.

site:google.com

--
Jock

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация