Hi guys, could you help me on this script that I would like to implement.
there I think I was able to solve it myselfHTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Some Title </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <form> <fieldset> <p><label for="txtCuryear">Academic Year</label><input type="text" name="txtCuryear" id="txtCuryear" /><input type="text" name="txtNxtyear" id="txtNxtyear" /></p> </fieldset> </form> </body> </html>lol
I need to display the next year, of the year that is inputted by the user on the current year textbox.HTML Code:<p><label for="txtCuryear">Academic Year</label><input type="text" size="4" maxlength="4" name="txtCuryear" id="txtCuryear" /> - <input type="text" size="4" maxlength="4" name="txtNxtyear" id="txtNxtyear" /></p> <script type="text/javascript"> var sID = document.getElementById('txtCuryear'); sID.onkeyup = function(event) { document.getElementById('txtNxtyear').value = parseInt(document.getElementById('txtCuryear').value)+1; } </script>
Your help will be greatly appreciated![]()



lol
Reply With Quote

Bookmarks