Web Hosting Talk







View Full Version : Need few lines of JavaScript


Ron
07-05-2006, 01:22 AM
I know absolutely NOTHING about JS. Can anyone give me a few lines of code to do this:

if SelectMenu1 = A and SelectMenu2 = B then
DisplayField3 = C
end if
if SelectMenu1 = X and SelectMenu2 = Y then
DisplayField3 = Z
end if

and so on

What this is, is two pulldown selection lists which the user will choose from in his/her browser. What he/she selects will determine what gets written in the display field. Any change to either one or both of the Select Menus, will instantly change what is displayed in the Display Field without having to refresh the browser.

Again, please understand that I know absolutely nothing about JS so any code you gave me would have to be somewhat complete as I would not have the brains to do anything except substitute values, A,B & C with my own. I would also need to know what to put in the head, if anything.

Thanks!

aboyd
07-05-2006, 04:08 PM
I think you'll need to hire someone if you need it written with such precise catering to your needs.

However, you can get code samples here that will get you close, with some learning:

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21535689.html

-Tony