thelist digest, Vol 1 #2737 - 22 msgsRe: [thelist] form not passing variables if focus is in input box

Dunstan Orchard dunstan at 1976design.com
Fri Nov 8 12:54:01 CST 2002


Hi there,


I fixed this problem in the end - well, I've coded to cope with it, I haven't
fixed it I guess.

Search result scripts were being called on the basis of $submit_search (the
value of the submit button on the search form) being seen by the receiving
page.

However, in IE6 this variable wasn't reaching the receiving page. The only
variable that consistantly got passed through was the search terms input box,
$searchterms. I guess that hitting RETURN submitted the form up to that point,
and no further, and as that was the first field, that variable was always
passed along.

This is what the 'broken' url looks like when searching for 'cat' and hitting
RETURN:

http://www.1976design.com/testarea/photo/thumbnails.php?searchterms=cat


As opposed to this, acheived by clicking SEARCH:

http://www.1976design.com/testarea/photo/thumbnails.php?
searchterms=cat&submit_search=search+the+portfolio



All I did to fix the problem was to call my scripts on the basis of
$searchterms being set, instead of $submit_search. This way I could be assured
that no matter what happened I wouldn't get any "variable $X not found" errors.



> Tom:
> > Anyway, thankyou for the replies, it does seem it's like a browser
> > issue. IE6 and MOZ both screw up, while OPERA is fine...
>
> hate to pop that bubble D, but it worked fine for me on IE6

It may be because I fixed it after posting the last time?
I tested it on a bunch of machines...

But you should still be able to see the lack of variables being passed in the
URL?

If you read the article at the url below then you'll see that the behaviour I
was getting makes sense. I do think it was a browser problem. Could be wrong
though :o)

http://ppewww.ph.gla.ac.uk/%7eflavell/www/formquestion.html



> Jerry:
> I went to the site but am unable to view source.

sorry about that - I've got a simple js no-right-click on there; not to stop
people stealing my photos (we all know you can't) but to gentley remind people
I'd rather they didn't :o)

Remember you can usually go to VIEW>SOURCE in browsers...


> Can you make the code available so we can check it?

sure thing, I've removed the JS now.
it's just a simple form though, so there's not much to look at...
thanks for the interest though :o)


So, just to re-iterate, you won't be able to replicate the errors anymore as I
have implemented a solution on the receiving page - but you should be able to
see the lack of variables being passed in the URL.


Thanks very much - dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list