Grab url params

Hi Guys,

how can i grab a value off of a URL and fill in a input field on the page with that value? Say I have this url:

how can i grab the value of var_email and pulse_daily and place it in a input field ?


with the help of google i got this working, here is the code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function gup( name )
  name = name.replace(/[\\[]/,"\\\\\\[").replace(/[\\]]/,"\\\\\\]");
  var regexS = "[\\\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
    return results[1];
var frank_param = gup( 'fname' );


<script type="text/javascript">

can sonmeone only show me how i can get document.write(frank_param) into a input field?

please does anyone know how i can get this document.write(frank_param);
into the value of an input field?


ok I got this also figuerd. If this is useful to anyone her is the code:

<form method="POST" action="something.cgi">
<script type="text/javascript">
/*document.getElementById("txtSearch").value = fname_pata;*/
document.write('<input ');
document.write('   type="text" ');
document.write('   name="x_url" ');
document.write('   value="' + sname_param + '">');