Link to home
Start Free TrialLog in
Avatar of gen101298
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.  
ASKER CERTIFIED SOLUTION
Avatar of rafistern
rafistern

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gen101298
gen101298

ASKER

To Rafistern, the sample u gave uses 2 text box, dummy1 and dummy2.  But what if I want only 1 textbox that shows xxxx/xxxx?
OK,

<input type=text name="date" size=4 onfocus="setTimeout('document.forms[0].date.value=xxxx/xxxx;document.forms[0].date.select()',50);">

But the minute you start typing the / will disappear.

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?
I'm too tied up with other things now, but I'll let u see the code asap.  Thanks!