user feedback in one click

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • smilesinblues@hotpop.com

    user feedback in one click

    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

  • Chung Leong

    #2
    Re: user feedback in one click

    <smilesinblues@ hotpop.com> wrote in message
    news:1103342718 .428653.104030@ f14g2000cwb.goo glegroups.com.. .[color=blue]
    > 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[/color]

    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_rati ng.php?score=5" >
    <img src="img/star_on.gif"
    onmouseover="Hi ghlightStars(5) ">
    </a>
    <a href="save_rati ng.php?score=4" >
    <img src="img/star_on.gif"
    onmouseover="Hi ghlightStars(4) ">
    </a>
    <a href="save_rati ng.php?score=3" >
    <img src="img/star_on.gif"
    onmouseover="Hi ghlightStars(3) ">
    </a>
    <a href="save_rati ng.php?score=2>
    <img src="img/star_on.gif"
    onmouseover="Hi ghlightStars(2) ">
    </a>
    <a href="save_rati ng.php?score=1>
    <img src="img/star_on.gif"
    onmouseover="Hi ghlightStars(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.


    Comment

    • smilesinblues@hotpop.com

      #3
      Re: user feedback in one click

      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

      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: user feedback in one click

        smilesinblues@h otpop.com wrote:[color=blue]
        > Hi,
        > I have seen this on google and MSN. Google groups has star on which[/color]
        if[color=blue]
        > 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[/color]
        which[color=blue]
        > page they have this feature but I am very sure they have this.[/color]
        <snip>

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

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

        Comment

        • Chung Leong

          #5
          Re: user feedback in one click


          <smilesinblues@ hotpop.com> wrote in message
          news:1103366262 .689498.196110@ z14g2000cwz.goo glegroups.com.. .[color=blue]
          > 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
          >[/color]




          Comment

          Working...