Gossamer Forum
Home : General : Perl Programming :

cgi in perl and HTML

Quote Reply
cgi in perl and HTML
I would like to pass a text from html form to a cgi, by clicking on a link instead of submit button. I tried url encolding, but it does not look like it works. Could anybody is willing to help me? what I tried is:head

script language = javascript
function myfun(){
var myvalue=document.myform.mytext.value;
return myfun();
}

form name=myform
input type=text name=mytext value=""
herf = test.cgi?mytext=myfun()>mylink/form>

THE SECOND ATTEMPT:
script language = javascript
function myfun()
{
var val1=document.myForm.myVal.value;
location.href="test.cgi?myVal=val1";
}
form name=myform
input type=text name=mytext value=""
a href="#"name="myLink"onClick="myfun()" mylink/a
/form

IN BOTH ATTEMPTS I COULD NOT PASS THE VALUE TO THE test.cgi, ONLY 'val1' THE WORD PASSED.