Export to GitHub

quirkysoft - issue #18

<SCRIPT> Tags


Posted on Sep 9, 2007 by Quick Rhino

What steps will reproduce the problem? 1. <SCRIPT TYPE="text/javascript"> <!-- function dropdown(mySel) { var myWin, myVal; myVal = mySel.options[mySel.selectedIndex].value; if(myVal) { if(mySel.form.target)myWin = parent[mySel.form.target]; else myWin = window; if (! myWin) return true; myWin.location = myVal; } return false; } //--> </SCRIPT>

<FORM ACTION="../cgi-bin/redirect.pl" METHOD=POST onSubmit="return dropdown(this.gourl)"> <p align="center"> <SELECT NAME="gourl"> <OPTION VALUE="">Select a value... <OPTION value=?variable=1>001 Variable<OPTION value=?variable=2>002 Variable</OPTION></SELECT> </SELECT>

What is the expected output? What do you see instead? A combobox that works, instead I see a combo box but when I select the item then I press "Go" I'm not redirected instead the page is "refreshed".

What version of the product are you using? 0.3 Beta 2

Please provide any additional information below. This is a Combobox that let you select some items and then redirect you to a indicate item. I don't know if it because javascript is not implemented but that should be the way to solve this.

Comment #1

Posted on Sep 9, 2007 by Helpful Elephant

Javascript isn't implemented - and isn't likely to be ever (never say never, but I'm tempted) - so javascript problems aren't really bugs.

However... on submit it should call the cgi-bin/redirect.pl URL passing the SELECT chosen option at least. Is that the exact HTML code? The value=?variable=1 bit looks suspect, not sure if that'd get parsed correctly. Any chance of posting the URL of the website?

Comment #2

Posted on Sep 10, 2007 by Quick Rhino

Yes, that's the HTML code, you can test it here:

http://pkpidgeot.com/?page=index_dex

My webpage :)

Comment #3

Posted on Sep 14, 2007 by Helpful Elephant

Aha! I have found the problem. The document model is correctly parsed as this:

form +- p +- select +- input

But on activating the form (clicking submit) it only looked for form elements as direct children of the form, not as grand-children, etc. Expect a fix soon.

Incidentally, on Firefox with javascript turned off, clicking "Ver entrada" sends you to a non existent page. "La página http://pkpidgeot.com/cgi-bin/redirect.pl no existe".

Comment #4

Posted on Sep 14, 2007 by Helpful Elephant

Fixed in r321 - now does the same as Firefox without javascript ;-)

Status: Fixed

Labels:
Type-Defect Priority-Medium Component-Bunjalloo Milestone-0.3