troubleshooting Question

javascript:this.blur() allowing the user to type an amount

Avatar of JWeb Admin
JWeb Admin asked on
Web Languages and StandardsWeb DevelopmentScripting Languages
11 Comments1 Solution838 ViewsLast Modified:
I have a form that I'm using with that automatically populates based on the user's selection.  There are 3 options which I will show below.  

I want the user to be able to pick from the 3 amounts, but when they select "Just a donation," I want the form field x_amount to be editable.  It is a simple text field in which they can type the amount they'd wish to donate, rather than selecting from a list of options.

My option values are as follows:

<select name="x_starfish" onChange="this.form.x_Amount.value=this.options[this.selectedIndex].value">
             <option value="">Just a donation
                   <option value="15.00">$15 Per Month
             <option value="25.00">$25 Per Month
             <option value="35.00">$35 Per Month

On the x_amount field, this is how it looks:

<input name="x_Amount" type="text" onFocus="javascript:this.blur()" size="7" />

I am wondering if the this.blur() function is stopping me from allowing the user to edit that field.  Can anyone help?  Is there another function that I can call which allows the user to type in a manual donation amount if they choose not to select a pre-set amount from my drop down list?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros