ericmckean / quirkysoft

Automatically exported from code.google.com/p/quirkysoft
GNU General Public License v3.0
0 stars 0 forks source link

<SCRIPT> Tags #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by danielro...@gmail.com on 9 Sep 2007 at 7:31

GoogleCodeExporter commented 9 years ago
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?

Original comment by richard.quirk on 9 Sep 2007 at 8:08

GoogleCodeExporter commented 9 years ago
Yes, that's the HTML code, you can test it here:

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

My webpage :)

Original comment by danielro...@gmail.com on 10 Sep 2007 at 1:06

GoogleCodeExporter commented 9 years ago
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".

Original comment by richard.quirk on 14 Sep 2007 at 6:49

GoogleCodeExporter commented 9 years ago
Fixed in r321 - now does the same as Firefox without javascript ;-)

Original comment by richard.quirk on 14 Sep 2007 at 7:45