Using value from dropdown box? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Using value from dropdown box? (/showthread.php?tid=37223) |
Using value from dropdown box? - El Forum - 01-02-2011 [eluser]umbongo[/eluser] I have a basket with a dropdown box allow selecting of different delivery options. I would like for this to update the delivery price on the client side, then add this to the subtotal/ add vat to give a total price. (The delivery type will be submitted upon checkout.). How do I go about getting and using the value without submitting the form?? Using value from dropdown box? - El Forum - 01-02-2011 [eluser]CroNiX[/eluser] Javascript is the only way without submitting. Using value from dropdown box? - El Forum - 01-02-2011 [eluser]umbongo[/eluser] Sure, i was expecting javascript to be involved. but all i can get it to do is either, print the value that is selected on load [using doc.write(document.getElementById('id').value)], or reload the entire page [with onclick=] Any help would be appreciated. Using value from dropdown box? - El Forum - 01-12-2011 [eluser]umbongo[/eluser] anyone?? Using value from dropdown box? - El Forum - 01-12-2011 [eluser]CroNiX[/eluser] I suggest using a cross browser framework such as jQuery. I wrote this in the post and didn't test it, but it should be close and get you in the right direction. Code: <skript type="text/javascript"> Using value from dropdown box? - El Forum - 01-13-2011 [eluser]umbongo[/eluser] Thank you! Figured out a solution from this. [Wish there was an option not to bump a thread on reply!] Using value from dropdown box? - El Forum - 01-13-2011 [eluser]CroNiX[/eluser] I believe you can just edit the title and put [solved] at the beginning. But I like the bump because it lets me know you got it working |