Forum OpenACS Q&A: "pop-up" form values

Collapse
Posted by Torben Brosten on
Where might code be that interprets form GET requests but not GET requests via a browser?

Sadly I think I added some diagnostic code without proper procedure, and am having difficulty locating it.

One can browse to this url, and the url remains unchanged:

http://birdswelcome.com/configurator?spec1ref=sw6886&spec2ref=sw6926&spec3ref=sw6796&model=arbh

but if I press the update button, suddenly two new form inputs appear: x and y, apparently with timing related values.

Any ideas where to find?

I've grepped most everywhere: egrep -w y *

/torben

Collapse
2: Re: "pop-up" form values (response to 1)
Posted by Jeff Rogers on
Looks like an "image" form input - the x and y values are the coordinates clicked on the image. This can be used for server-side image maps, but I think almost no one uses those any more.
Collapse
3: Re: "pop-up" form values (response to 2)
Posted by Torben Brosten on
Jeff, yeah, they look like x,y coordinates, but I'm fairly certain I added them to test timing/performance somewhere in the internals where I wasn't sure if ns_log would work, perhaps in the tcl library of aolserver..

Anyway, this is a great example nightmare of why to always provide clear comments with any diagnostic code; and to leave the comments there until 100% of the diagnostic code is removed.

Collapse
4: Re: "pop-up" form values (response to 3)
Posted by Dave Bauer on
Nope! The source shows it is an image input type so that's why you are seeing the x and y.

Generally you'd use CSS or an img tag with link and javascript click handler to submit the form instead of image input type.

This behavior depends on the browser they all behave slightly differently.

Collapse
5: Re: "pop-up" form values (response to 1)
Posted by Torben Brosten on
Dave, Jeff, apparently you're right.

That's quite a coincidence, since I happened to use generic x and y for timing diagnostics. I'm glad I posted instead of continuing the search onward to insanity.

The button is html-only to increase compatibility between clients and avoid dependency on css and javascript.

cheers,

Torben

Collapse
6: Re: "pop-up" form values (response to 1)
Posted by Torben Brosten on
Just in case my thanks didn't make it through the previous post: Thank you, sincerely. I was about to go mad.

cheers,

Torben