Author Topic: Rate form autojump  (Read 4416 times)

0 Members and 1 Guest are viewing this topic.

Offline uksoreeyes

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.myleeneklass.com
Rate form autojump
« on: April 08, 2003, 09:37:55 PM »
Does anyone know how to make the rate form on the details page an autojump menu like the category select box?

Thanks in advance

carl

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Rate form autojump
« Reply #1 on: April 08, 2003, 10:32:27 PM »
in /templates/<yourtemplate>/rate_form.html use this:
Code: [Select]
             <select name="rating" onchange="if (this.options[this.selectedIndex].value != 0){ forms['imagesperpage'].submit() }" class="select" />
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline uksoreeyes

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.myleeneklass.com
Rate form autojump
« Reply #2 on: April 09, 2003, 06:51:11 PM »
Hi I made the changes and now when I select a number from the rate form, nothing happens.

Code: [Select]
<form method="post" action="{self}">
 <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="bottom">
              <select name="rating" onchange="if (this.options[this.selectedIndex].value != 0){ forms['imagesperpage'].submit() }" class="select" />
                <option value="">--</option>
                <option value="5">5</option>
                <option value="4">4</option>
                <option value="3">3</option>
                <option value="2">2</option>
                <option value="1">1</option>
              </select>
            </td>
<td width="3"></td>
            <td>
              <input type="hidden" name="action" value="rateimage" />
              <input type="hidden" name="id" value="{image_id}" />
            </td>
<td width="10"></td>
          </tr>
        </table>
</form>


Did I do something wrong?

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Rate form autojump
« Reply #3 on: April 09, 2003, 08:28:21 PM »
Try this instead:

Code: [Select]
<form name="RateImage" method="post" action="{self}">
 <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="bottom">
              <select name="rating" onchange="if (this.options[this.selectedIndex].value != 0){ forms['RateImage'].submit() }" class="select" />
                <option value="">--</option>
                <option value="5">5</option>
                <option value="4">4</option>
                <option value="3">3</option>
                <option value="2">2</option>
                <option value="1">1</option>
              </select>
            </td>
<td width="3"></td>
            <td>
              <input type="hidden" name="action" value="rateimage" />
              <input type="hidden" name="id" value="{image_id}" />
            </td>
<td width="10"></td>
          </tr>
        </table>
</form>

Offline uksoreeyes

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.myleeneklass.com
Rate form autojump
« Reply #4 on: April 10, 2003, 01:02:38 PM »
Perfect, Thank you