Pass and Read Parameters

[Total: 0    Average: 0/5]

This shows how to have a page submit data to itself.

Head Code:

var _c="";
var _l=document.location.toString().split("?"); /* now _l is the parameters */
/* document.write("_l="+_l+"<BR>"); */

var _m ="";
 _m = _l[1].split("&"); /* now _m is an array of all parameters */
if(_m[0]) _c="List of parameters:<BR>";
for (var i=0;i<_m.length;i++)

Body Code:

function doIt()
This form posts the paramters to this same page
<form name=tf>
<input type=text name=t1 value="one">
<input type=text name=t2 value="two">
<input type=text name=t3 value="three">
<input type=text name=t4 value="four">
<input type=button onclick="doIt()" value="Submit">

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *