Menu
I am trying to parse the URL values and pass into a text field.
i was able to parse it but i couldn’t dump that value into a text field..
can anyone suggest.
Here’s what i did:
<script type=”text/javascript”>
function test(){
var url = window.location.href;
var sub = url.split(‘=:’)[1];
document.write(sub);
document.getElementById(‘clksrc’).value = sub;
}
</script>
<input name=”clksrc” id=”clksrc” value=”document.write(sub)” type=”text” />
so first part gets the value from URL after ‘=’ and dumps it in variable ‘sub’. but how do i pass that into a text field?