Re: user input box: first 2 characters as a read only value
"reneeccwes t" <reneeccwest@ho tmail.com> wrote in message
news:9f9d6d21.0 309050953.43309 c2d@posting.goo gle.com...[color=blue]
> <input type="text" size="7" name="test" maxlength="4" value="4Tyourna me">
>
> Is there any way I can make first 2 characters as a read only value?[/color]
Of course not, but you could simulate that strange behaviour, something like
this:
Re: user input box: first 2 characters as a read only value
reneeccwest wrote:
[color=blue]
> <input type="text" size="7" name="test" maxlength="4" value="4Tyourna me">
>
> Is there any way I can make first 2 characters as a read only value?[/color]
If it really is read-only, then make it read-only:
When the submitted data arrives at the server, concatenate the contents of
testHidden and test together.
Of course it doesn't look so hot in Netscape 4.x, but it's not completely
unusable, and in more modern browsers you get a funky input box where the
first two characters appear to be "read-only". The only browser I'm really
disappointed at is Opera 7.11. It refuses to honor border:none on the input
element.
--
| Grant Wagner <gwagner@agrico reunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
Re: user input box: first 2 characters as a read only value
Is it possible to remove the space from the left side?
There is a space before "4T"
"Vjekoslav Begovic" <vjbegovic@inet .hr> wrote in message
news:bjar54$dv4 $1@sunce.iskon. hr...[color=blue]
> "reneeccwes t" <reneeccwest@ho tmail.com> wrote in message
> news:9f9d6d21.0 309050953.43309 c2d@posting.goo gle.com...[color=green]
> > <input type="text" size="7" name="test" maxlength="4"[/color][/color]
value="4Tyourna me">[color=blue][color=green]
> >
> > Is there any way I can make first 2 characters as a read only value?[/color]
>
> Of course not, but you could simulate that strange behaviour, something[/color]
like[color=blue]
> this:
>
> <input value="4T" size="2" style="margin-right:none; border-right:none;
> text-align:right;"
> onfocus="docume nt.getElementBy Id('yourname'). focus()"><input id="yourname"
> style="margin-left:none; border-left:none" value="yourname ">
>
>[/color]
Comment