By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

user feedback in one click

P: n/a
Hi,
I have seen this on google and MSN. Google groups has star on which if
you click the topic becomes stared... MSN has 5 stars to get feedback
from user for giving rank to the pages. Sorry I don't remember on which
page they have this feature but I am very sure they have this.

I also require it for page rank, I was wondering how do they do it. I
am sure MSN is not storing the data on the clients machine.

I want if users click on 3rd stat then the 3 should go inside my mySql
DB and at the same time I don't want them to go to some other page or
open a pop up or something, can anyone tell me how can I do this.
Thanks in advance.

Bye

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
<sm***********@hotpop.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi,
I have seen this on google and MSN. Google groups has star on which if
you click the topic becomes stared... MSN has 5 stars to get feedback
from user for giving rank to the pages. Sorry I don't remember on which
page they have this feature but I am very sure they have this.

I also require it for page rank, I was wondering how do they do it. I
am sure MSN is not storing the data on the clients machine.

I want if users click on 3rd stat then the 3 should go inside my mySql
DB and at the same time I don't want them to go to some other page or
open a pop up or something, can anyone tell me how can I do this.
Thanks in advance.

Bye


You use Javascript to set the stars. To send that info to the server, you
use a simple anchor tag, with the number of star in the URL.

Example:

<a href="save_rating.php?score=5">
<img src="img/star_on.gif"
onmouseover="HighlightStars(5)">
</a>
<a href="save_rating.php?score=4">
<img src="img/star_on.gif"
onmouseover="HighlightStars(4)">
</a>
<a href="save_rating.php?score=3">
<img src="img/star_on.gif"
onmouseover="HighlightStars(3)">
</a>
<a href="save_rating.php?score=2>
<img src="img/star_on.gif"
onmouseover="HighlightStars(2)">
</a>
<a href="save_rating.php?score=1>
<img src="img/star_on.gif"
onmouseover="HighlightStars(1)">
</a>

The trick is to return HTTP status code 204 (no content) after the data is
saved. The browser will react by keeping the current page.
Jul 17 '05 #2

P: n/a
Hi,
many thanks for the help, but can you tell me how will return 202
error.
or please guide to for what I should search in the google for...
Thanks again.
Bye

Jul 17 '05 #3

P: n/a
sm***********@hotpop.com wrote:
Hi,
I have seen this on google and MSN. Google groups has star on which if you click the topic becomes stared... MSN has 5 stars to get feedback
from user for giving rank to the pages. Sorry I don't remember on which page they have this feature but I am very sure they have this.

<snip>

XMLHttpRequest <http://jibbering.com/2002/4/httprequest.html>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #4

P: n/a

<sm***********@hotpop.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,
many thanks for the help, but can you tell me how will return 202
error.
or please guide to for what I should search in the google for...
Thanks again.
Bye


http://www.php.net/header/
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.