Jump to content

Go to Page


Joshua F

Recommended Posts

I have a Go to Page form, but it's not working. I want it so when you press Go it will add ?page=# and # meaning the number you type in the Text Box before pressing go.

 

Here's my code

<form name='page'><input type='text' class='input_text' id='#{id}_input' size='8' name='page' value='' /> <input type='submit' value='Go' name='submit' class='input_submit add_folder' id='#{id}_submit' onClick='location=document.c693.c335.options[document.c693.c335.selectedIndex].value'/></form>

Link to comment
https://forums.phpfreaks.com/topic/214406-go-to-page/
Share on other sites

Still not working. But maybe that's because it's in Javascript as a drop down.

 

            <script type='text/javascript'>
    //<![CDATA[
        /* Templates/Language */
        ipb.templates['page_jump']        = new Template("<div id='#{id}_wrap' class='ipbmenu_content'><h3 class='bar'>Jump to page</h3><form name='form' action='?page=' method='get'><input type='text' class='input_text' id='#{id}_input' size='8' name='page' value='' /> <input type='submit' value='Go' name='submit' class='input_submit add_folder' id='#{id}_submit'/></form></div>");
    //]]>
    </script>

 

Any ideas?

 

Edit: Oops, wrong board.

Link to comment
https://forums.phpfreaks.com/topic/214406-go-to-page/#findComment-1115767
Share on other sites

Well, javascript would make it not work that way.  That is the plain HTML way of doing it.

 

I would try it using the onSubmit event handler (or onBlur), and getting the value of the input field correctly.  You are trying to get the input value by searching the options of a dropdown box.

 

Or just post it in the javascript section, they may be more helpful.

Link to comment
https://forums.phpfreaks.com/topic/214406-go-to-page/#findComment-1115772
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.