Select() not working

Alles, was PHP betrifft, kann hier besprochen werden.

Select() not working

Postby mickeymouse » 15. February 2012 16:44

Why iis it that 'onload' perfectly selects the "01" in my 'mm' box and highlights it but 'myreset' only selects the box and does not highlight the '01'? i.e., the 'reset' does not work and yet my code is exactly the same as the 'onload'.

window.onload = function()
{var c = document.CorForm.mm;
c.select();}

function myreset()
{var c = document.CorForm.mm;
c.select();}

<input style=\"text-align: center\" name=\"mm\" size=\"1\" MaxLength=2 value=\"01\" onkeyup=\"mytab(mm,dd,2)\">

<input type=\"reset\" value=\"Reset\" onclick=\"myreset()\">

Thank you
mickeymouse
 
Posts: 58
Joined: 08. March 2009 06:10
Location: France & Canada
Operating System: Win 7 Family Prem Ed (64 bit?)

Return to PHP

Who is online

Users browsing this forum: No registered users and 31 guests