gen101298
asked on
Input mask for text box in webpage
I use FP98 to create my webpage. By using ActiveX, I'm able to set an input mask on my text box. But it will only show if I use IE to view it, not with netscape. So, is there any other way that I can set input mask to text box that can be view in both IE and netscape?
My text box takes value like 1997/1998. So, I want to set input mask _ _ _ _ / _ _ _ _
_ will take integer only.
My text box takes value like 1997/1998. So, I want to set input mask _ _ _ _ / _ _ _ _
_ will take integer only.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OK,
<input type=text name="date" size=4 onfocus="setTimeout('docum ent.forms[ 0].date.va lue=xxxx/x xxx;docume nt.forms[0 ].date.sel ect()',50) ;">
But the minute you start typing the / will disappear.
<input type=text name="date" size=4 onfocus="setTimeout('docum
But the minute you start typing the / will disappear.
ASKER
To Rafistern, when I run my webpage that contains the above codes that u gave in browser, it runs perfectly...but when I put the webpage in a frame in another webpage, the code behaves well when it is run for the first time, but for the following times, the textbox will just blank out any data that I key in after I click the submit button except the '/'. But if I don't click the submit button, but press Enter instead, it behaves well...what's wrong? Is it something wrong with the setTimeout?
What browser? Could you submit your code?
ASKER
I'm too tied up with other things now, but I'll let u see the code asap. Thanks!
ASKER