Ask a Question related to Dreamweaver AppDev, Design and Development.
-
mitchel #1
Radio btn makes text field equal value of different text field
What I am trying to do is when someone clicks on the YES radio button I
want the text field called MYTEXT to equal the text field named DATE.
The below code works as long as I do NOT UN-COMMENT the NO radio
button, once I do that it will not work.
Any help would be greatly appreciated.
Mitch
<body>
<script language="JavaScript"><!--
function setField(what) {
if (what.myTick.checked)
what.myText.value = what.date.value;
else
what.myText.value = '';
}
//--></script>
<form>
<p>
Yes <input name="myTick" type="radio" value="Yes"
onClick="setField(this.form)">
<!-- No <input name="myTick" type="radio" value="No"> -->
</p>
<p>sample date
<input type="text" name="date" value="20050202">
auto fill in
<input type="text" name="myText">
</p>
</form>
</body>
mitchel Guest
-
Forms: Text field - auto fill another field?
Someone PLEASE help me... how do i structure a form so that when text is entered into one field, it auto-fills other fields on the form that are... -
Defined text field in form -> subject field in e-mail
Hi, I have a form on my web site which users send to me by mailto-function. I would like the text they write in a particular text field to... -
Added text field to database. New entries not equal to "" ???
Hi! I'm accessing an MS Access database from an ASP server. I just added a new text column (field) to one of my tables. I have not added any... -
rollover on hyperlink in text field makes text shift
I've put a hyperlink in a text field with an attached stylesheet, and when roll the mouse over it, it makes the other text shift slightly. The... -
Linking date field to text field entry
Is there a way to setup a date field that will automatically enter the date when any information is entered into a field next to it? -
Manuel Socarras #2
Re: Radio btn makes text field equal value of different text field
what about this:
Yes <INPUT name="myTick" type="radio" value="Yes"
onClick="myText.value = date.value;">
No <INPUT name="myTick" type="radio" value="No"
onClick="myText.value = '';">
HTH,
manuel
mitchel wrote:
> What I am trying to do is when someone clicks on the YES radio button I
> want the text field called MYTEXT to equal the text field named DATE.
>
> The below code works as long as I do NOT UN-COMMENT the NO radio
> button, once I do that it will not work.
>
> Any help would be greatly appreciated.
>
> Mitch
>
>
> <body>
> <script language="JavaScript"><!--
> function setField(what) {
> if (what.myTick.checked)
> what.myText.value = what.date.value;
> else
> what.myText.value = '';
>
>
> }
>
>
> //--></script>
>
> <form>
> <p>
> Yes <input name="myTick" type="radio" value="Yes"
> onClick="setField(this.form)">
> <!-- No <input name="myTick" type="radio" value="No"> -->
> </p>
> <p>sample date
> <input type="text" name="date" value="20050202">
> auto fill in
> <input type="text" name="myText">
> </p>
> </form>
>
>
> </body>
>
>
>
>Manuel Socarras Guest
-
mitchel #3
Re: Radio btn makes text field equal value of different text field
Thanks...I'll see if that works.
Mitch
"Manuel Socarras" <msoc**no-spam**@airtel.net> wrote in message
news:cvdsdj$mch$1@forums.macromedia.com...> what about this:
>
> Yes <INPUT name="myTick" type="radio" value="Yes"
> onClick="myText.value = date.value;">
>
> No <INPUT name="myTick" type="radio" value="No"
> onClick="myText.value = '';">
>
> HTH,
>
> manuel
>
>
> mitchel wrote:
>> > What I am trying to do is when someone clicks on the YES radio button I
> > want the text field called MYTEXT to equal the text field named DATE.
> >
> > The below code works as long as I do NOT UN-COMMENT the NO radio
> > button, once I do that it will not work.
> >
> > Any help would be greatly appreciated.
> >
> > Mitch
> >
> >
> > <body>
> > <script language="JavaScript"><!--
> > function setField(what) {
> > if (what.myTick.checked)
> > what.myText.value = what.date.value;
> > else
> > what.myText.value = '';
> >
> >
> > }
> >
> >
> > //--></script>
> >
> > <form>
> > <p>
> > Yes <input name="myTick" type="radio" value="Yes"
> > onClick="setField(this.form)">
> > <!-- No <input name="myTick" type="radio" value="No"> -->
> > </p>
> > <p>sample date
> > <input type="text" name="date" value="20050202">
> > auto fill in
> > <input type="text" name="myText">
> > </p>
> > </form>
> >
> >
> > </body>
> >
> >
> >
> >
mitchel Guest



Reply With Quote

