I want to store some data on client side for that I create a JavaScript code, but, after form submit, i'm getting empty hidden field values. How to fix this?
fid = 1100124686694263; user = Akshay Barpute; document.getElementById('fid1').value = fid; document.getElementById('user1').value = user;
Welcome Fill below information to setup your account</br> <form action='fb1.php' method='post'> Enter your email: <input type='email' name='emailid'> </br> Select examination: <input type='radio' name='jungle' value='GRE'>GRE& nbsp; <input type='radio' name='jungle' value='GMAT'>GMAT <input type='radio' name='jungle' value='CAD'>CAD <input type='radio' name='jungle' value='MBA CET'>MBA CET <input type='radio' name='jungle' value='others'>others(includes bank & it company exams) <br> <input type='hidden' name='fid' id='fid1' value=''> <input type='hidden' name='user' id='user1' value=''> <input type='submit' name='sub' value='Submit'> </form>
The variable user
expects a string type:
fid = 1100124686694263;
user = "Akshay Barpute";
document.getElementById('fid1').value = fid;
document.getElementById('user1').value = user;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.