Welcome Guest, Not a member yet? Register   Sign In
Mootools Rapid Ratings : Passing variable to Php via the Request class [Tuto]
#3

[eluser]pickupman[/eluser]
Anytime you are dealing with js & ajax, do yourself a favor and checkout [url="http://api.jquery.com/jQuery.ajax/"]jQuery[/url]. It will save your life. The tricky part with ajax is that different browsers behave differently. You have to write routines for IE/mozilla/webkit. That's were jQuery comes in as it is cross browser. I don't know if you are trying to reference a js class with
Code:
var rating = new RabidRatings({url:'http://localhost/projectolearn/index.php/users/loadlib'});

You are using similar syntax in other spots using php. The way I have code some simple voting widgets with ajax is creating the form with options. Use jQuery to submit the form with the selected option to the server. The ajax call goes to my CI controller where I check user session, poll id, and vote id. I then submit values to my model if successfully. Send appropriate data back to user once voted has been counted (like results).


Messages In This Thread
Mootools Rapid Ratings : Passing variable to Php via the Request class [Tuto] - by El Forum - 06-27-2010, 03:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB