The following Perl/JavaScript:URL scenario successfully assigns the value from a drop-down menu to the previously ,declared "global" var, ap_namex.print $cgi->start_form( -name=>"apps_menu", -method=>"GET", -action=>'javascript:ap_namex', -onsubmit=>"return checkForm( this );" );
. . .however, the "-action" taken "-onsubmit" is not what I expected. Essentially, I am (am I?) trying to "globally scope" a JavaScript var and convey an assigned value to the Perl environment, such that the "-action" operation will execute the desired URL as though it were hard-coded, e.g., -action=>"contacts_01.pl",.-onclick=>"javascript:ap_namex=form['ap_name'].value"
When the javascript:URL executes as per the above code, the URL displayed in my MS/IE v6+ remains the same as the "parent"; however, the displayed name of the window becomes javascript:ap_namex, the window panel is all white except, the value, "contacts_01.pl" is displayed, . . .the only html in the displayable source.
Apparently, the print $cgi->etc. is printing the value of the JavaScript variable, rather than executing it as per my intention. Obviously, I haven't connected all of the dots?
Suggestions?
Thanks, Ron W.
In reply to JavaScript to Perl: "-action" "-onsubmit" by rtwingfield
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |