Ajax ratings issue in CI architecture...

#1
[eluser]Zeeshan Rasool[/eluser]
Hello,
I am using Ajax ratings script in a CI site but i am unable to stop a user to rate twice, i am calling a controller function thru Ajax and passing to it 2 param one post ID and second user ID but where will i put a check to stop it again? if user make a rating and refresh the page then he cant make rate again as i am checking from db if he is already did that . But if he first time make a rate and could't refresh page and again click on rating then i am unable to put a check in javascript . Please any idea ?
Thanks in very advance !

#2
[eluser]InsiteFX[/eluser]
You should be able to set a variable say to TRUE to know that the user has already set the rating or you could refresh the page yourself in code.

Enjoy
InsiteFX

#3
[eluser]saidai jagan[/eluser]
After the ajax response show the rated amount of image.If he doesnt rated show the rating icon.

#4
[eluser]Zeeshan Rasool[/eluser]
[quote author="InsiteFX" date="1257774555"]You should be able to set a variable say to TRUE to know that the user has already set the rating or you could refresh the page yourself in code.

Enjoy
InsiteFX[/quote]

Thanks to you both ! InsiteFX i have required to use this with ajax so page refresh is not an option.
@Jagan . thank dude its also good option but i need a quick solution that can be implement in my current script. just a flag type variable that can hold the value so next time it can stop rating by same user.
Also i need this thing in on first time rating beacuse if a user come again from any other page then i have already puted a check to stop rating.
Main point is on first rating time i need to stop him for twice.

thanks

#5
[eluser]saidai jagan[/eluser]
Are u inserting the user details while rating?
If so u can check every time the user is rated or not.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.