Jack,
Add an Action="/cgi-bin/clientlist.pl" to the form tag
and just use document.myform.submit() in the script.
Don't forget to close the form tag with </form>.
<form method="POST" name="myform" action="/cgi-bin/clientlist.pl">
<stuff..............>
</form>
Rythmist
-----Original Message-----
Date: Thursday, May 14, 1998 10:09 PM
Subject: RE: WC:>: Form spaces in html layout
>Hi,
>
>Thanks for helping, but I'm baffled by something right now, maybe you can
>shed some more light? See the bottom of this email:
>
>
>OK, here's what I tried, but when you click on an image it loads the same
>page that it is called from, rather than going to the right perl script:
>
><script language="JavaScript">
><!--
>function gowhere(num){
> if (num == 1){
> document.myform.source.value="pwapprove";
> }
> if (num == 2){
> document.myform.source.value="disabled";
> }
> if (num == 3){
> document.myform.source.value="new";
> }
> document.myform.submit("/cgi-bin/clientlist.pl");
>}
>//-->
></script>
>
>Note that it really just has to call one script, but feed it different
>values for the same named variable.
>
>Further down in the html generated by the script that created this page in
>the first place:
>
><form name="myform" method="post">
><input type=hidden name=uid value="$uid">
><input type=hidden name=first_name value="$first_name">
><input type=hidden name=source value="0">
>
>The $uid and $first_name are filled in by the perl script that generated
the
>page.
>
>and...the image buttons:
>
><input type="image" name="I1" onclick="gowhere(1)"
>src="/test/images/n_s_passwordrequests.gif" width=139 height=22 alt=""
>border="0"><br>
>
><input type="image" name="I2" onclick="gowhere(2)"
>src="/test/images/n_s_disabledclients.gif" width=139 height=20 alt=""
>border="0"><br>
>
><input type="image" name="I3" onclick="gowhere(3)"
>src="/test/images/n_s_makenewclient.gif" width=139 height=20 alt=""
>border="0">
>
>Any ideas why I'm getting a reload of the page, instead of a post to the
>proper script?
>
>Thanks, I've gotta dig into this javascript stuff more...
>
>Jack
>
>____________________________________________________________________
>--------------------------------------------------------------------
> Join The Web Consultants Association : Register on our web site Now
>Web Consultants Web Site : http://just4u.com/webconsultants
>If you lose the instructions All subscription/unsubscribing can be done
>directly from our website for all our lists.
>---------------------------------------------------------------------
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------