You are here: Safari interprets 'submit()' as method 'POST' « PHP Programming Language « IT news, forums, messages
Safari interprets 'submit()' as method 'POST'

Posted by rynato on 05/11/07 14:53

I ran into an interesting problem while working on a form:

I have a drop down list (think <form><select><option>...) of 'open
sessions' which a user can choose from to continue entering data.
There is a small bit of javascript which, when the 'onChange' event
occurs, triggers a 'submit' which reloads the page and displays the
stored values for that session using a session ID variable named,
'$existingSessions'.

Even though the form's method is set to "GET", Safari insists on
seeing this as a "POST" as a result of the javascript submit call,
while all other browsers I tested (Firefox/Mac, IE/Mac, Firefox/PC,
IE7/PC) interpret this as a "GET".

So at the top of the PHP script, $existingSessions =
$_POST['existingSessions'] will ONLY work with Safari while all other
browsers (which I tested) require $existingSessions =
$_GET['existingSessions'] in order to retrieve the values.

Has anyone else run into this issue? I handled it with a simple
HTTP_USER_AGENT request and an if...else statement. Still, I'd like to
know what's up with this! Is it just because Safari is a semi-sucky
browser?

 

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

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