...

View Full Version : newbee needs some helps (Please)



flyersun
06-06-2007, 06:17 PM
My JavaScript knowledge is pretty much non existent .. I can do a pop up window and thatís about it. I'm working on a client site however and they need some JavaScript including.

Here is an example of what they want:

http://insurance.essentialtravel.co.uk/

The bit of the site I'm interested in is the Travel Insurance Quote form. What I need to be able to do is when an option is selected from select box the other form options change.. That probably doesnít make much sense but if you check out the site it's pretty clear.

Any help with be greatly appreciated.

cyberlogi
06-07-2007, 01:41 AM
You will need to attach an 'onchange' event listener to the select element. Then depending on the value of the select element show a particular form. That can be a complicated process and i recommend using a toolkit like YUI (http://developer.yahoo.com/yui/) (you really only need the yahoo.js && dom-event.js files), but you might also want to read DOMScripting (http://www.amazon.com/dp/1590595335?tag=javawebl-20&camp=14573&creative=327641&linkCode=as1&creativeASIN=1590595335&adid=0CH4WWFEYED9DBH46RET&) if you want to get a solid grasp of JavaScript.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum