Subho Halder
Subho Halder

Reputation: 1527

passing form parameters through html

My code is :

//cron.html    
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<
</head>

<body>
<form method="post" action="CETrafficGenerator.php?step=2">
<input type="text" name="url"/>




</body>

</html>

instead of typing the url can i pass it through cron.html?url= in this format?

Help needed please

Upvotes: 2

Views: 1921

Answers (3)

a_m0d
a_m0d

Reputation: 12195

Yes you could do, but you would have to fill it into the form field using javascript. You can use jQuery to make this easier - see http://projects.allmarkedup.com/jquery_url_parser/ for more info. Example:

$('url).value = jQuery.url.param('url');

And then make the form field like this:

<input type="text" name="url" id="url" value="" />

Upvotes: 2

Chris Nicol
Chris Nicol

Reputation: 10366

Short answer == No

You'll need some sort of programming (php, asp, javascript) to take the value of the querystring and insert it to your text box.

Upvotes: 1

tefozi
tefozi

Reputation: 5480

No you can't. If you want to autofill form you can do this call CETrafficGenerator.php?step=2&url=http://google.com only but you have to change "method" from "post" to "get"

<form method="get" action="CETrafficGenerator.php?step=2">
<input type="text" name="url"/>
</form>

Upvotes: 0

Related Questions