Function not working in javascript -
function displayjob1(ref,position) { document.getelementbyid("jobref").value=ref; document.getelementbyid("jobp").value=position; } function store() { var jobref1=100011; var jobposition1="application engineer"; displayjob1(jobref1,jobposition1); } function link() { window.location.href='enquire.html'; store(); } function job() { click1=document.getelementbyid("job1"); click1.onclick=link; } window.onload=job;
when page loaded , clicked button link, goes enquire.html
, store()
, display()
won't work textbox has no value after page loaded.
the problem isn't textbox has no value, problem textbox , javascript code not exist anymore! have send data need parameter in url, , obtain piece of code in new page.
update: point at, can use local storage, again: store need before changing location, , have code in new page fetch data when "onload"
Comments
Post a Comment