Forum Moderators: coopster

Message Too Old, No Replies

Rate it and see next

Have a problem and can't find the solution

         

tomda

7:51 am on Jan 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I have a picture gallery where pictures can be rated.

To be a user-friendly, I though I could have two buttons in the form so that user can EITHER rate the current pic and stay at the same page, EITHER rate the current pic and load the next pic in one click.
1/ RATE IT (rate the pic)
2/ RATE IT AND SEE NEXT (rate it and see next pic)

<form action="pop_see.php?" method="get">
<span class=dTc><b>RATE THIS PHOTO</b></span><br>
<input name="photo" type="hidden" value="'.$same_photo_id.'">
<select name="rate" class="form fcont3 upper"><option value="1">1</option><option value="2">2</option><option value="3" selected>3</option><option value="4">4</option><option value="5" >5</option></select><br>
<input type="submit" class="butt note xcont3" value="RATE IT"><br>

<input name="photo" type="hidden" value="'.$next_photo_id.'">
<input type="submit" class="butt note xcont3" value="RATE IT &amp; SEE NEXT"></form><br>

The problem is that the second photo ($next_photo_id) value overwrite the first photo ($same_photo_id) value and even if I click on "RATE IT", it will go the next picture... Totally understandable but how can I solve this problem!

I know I could
1/ Have two forms but it is not very friendly
2/ Use Javascript but I don't want to!

Hope it's clear? Any other idea?

simon2263

9:26 am on Jan 18, 2006 (gmt 0)

10+ Year Member



I think your only other option is to use a radiobox to choose between the two options - otherwise, bite the bullet and use Javascript to change the value of the value of the photo field (it's not so difficult!)

Simon

tomda

9:57 am on Jan 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes! The radiobox!
How can I forgot the radiobox option?
Thanks Simon