![]() |
Radio buttons - fetching query?
Hi all.. Here's my scenario.
four radio buttons Each have own data in database When user make hes choose, data would change automaticlly in that page.. eh.. I hope you understand what I'm after? Hard to explain while english isn't my home language! ;) Don't know much javascript/frameworks so thats why I here (again and again.. ;)) I'm already using prototype in my page so, if there is sollution that would be great! But doesn't have to.. I don't know what to look so even if someone knows something similar, could you share link or something so I could go and look. Thanks for all help! |
Try this link - many, many great ajax starter tutorials that should push you in the right direction:
Tutorials Round-Up: Ajax, CSS, PHP and More | Tutorials | Smashing Magazine |
Thanks serversphere, I'm familiar that page quite a bit! ;)
Anyway, I manage to get some help from another page and here's result. (if someone needs?!) Ajax.js: Code:
var rdiv;Code:
function fetchQueryPage(pid)Code:
<input type="radio" name="myradio" onClick="fetchQueryPage(11);" />PHP Code:
How can I define that if one of those radio buttons are already checked when user arrive that page, then run that fetchQueryPage function? Because I have option on different page when user can choose one of those radios. Code:
if (radio.[i].checked == true)Thanks for all help! =) |
Very nice! Just be sure to sanitize the ID passed to doquery.php or else it could be subject to sql injection.
|
Oh yes offcourse that was just example and type as was posted.. =)
|
| All times are GMT. The time now is 07:07 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0