Ask a Question related to ASP, Design and Development.
-
John Davis #1
display text field based on the selection choices
I want to display credit card fields when the user selects the option paid
membership. If user selects the option free membership, then the credit card
text field will disappear. Here's the code I did with JavaScript but didn't
work.
name="credit")</P>");> <SCRIPT LANGUAGE="JavaScript">
> function generateCreditTextField()
> { if (document.myform.membership.value == "1")
> { alert('free');
> document.write("");
> }
> else
> { alert('paid');
> document.write("<P>Credit Card: <input type="text"> }
> }
> </SCRIPT>
>
> <form name="myform">
> <select name="membership" onchange="generateCreditTextField()">
> <option></option>
> <option value="1">Free Membership</option>
> <option value="2">Paid Membership</option>
> </select>
> </form>
>
> please advise! Thanks!
> John
>
>
John Davis Guest
-
Font choices in form field?
When creating a text form field in Acrobat Pro (7) can I use any font (I have a million of them on my Mac) or does it have to be a font that would be... -
SQL SELECT Based on *PART* a text Field?
Hello, I'm trying to figure out some SQL here and am wondering this: Is it possible to select data based on a sub-string of a text field? ... -
How to display alternate text based on dynamic data?
I need to display alternate text based on returns from a record set. For example, when my recordset returns "21," which is a code for an employee... -
Changing button's URLs based upon text field
I have created a quiz using the Coursebuilder extensions in DWMX, which puts their score in a text field on the page (no data base is used). What I... -
Hide text boxes based upon page selection via tab controls
Use the Change event of the tab control. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users -... -
Adrienne #2
Re: display text field based on the selection choices
Gazing into my crystal ball I observed "John Davis"
<jrefactor@hotmail.com> writing in
news:efSb2jAfDHA.164@tk2msftngp13.phx.gbl:
What about users without javascript?> I want to display credit card fields when the user selects the option
> paid membership. If user selects the option free membership, then the
> credit card text field will disappear. Here's the code I did with
> JavaScript but didn't work.
>
>>>> <SCRIPT LANGUAGE="JavaScript">
>> function generateCreditTextField()
>> { if (document.myform.membership.value == "1")
>> { alert('free'); document.write(""); } else
>> { alert('paid');
>> document.write("<P>Credit Card: <input type="text"
>> name="credit")</P>"); } } </SCRIPT>
>>
>> <form name="myform">
>> <select name="membership" onchange="generateCreditTextField()">
>> <option></option>
>> <option value="1">Free Membership</option>
>> <option value="2">Paid Membership</option> </select> </form>
>>
>> please advise! Thanks!
>> John
>>
>>
You could always do something put the option on page one, then test for the
value of the option on the next page, and generate the credit card based on
that.
--
Adrienne Boswell
Please respond to the group so others can share
[url]http://www.arbpen.com[/url]
Adrienne Guest



Reply With Quote

