www.webdeveloper.com
Results 1 to 3 of 3

Thread: Take me to 'a particular Page' Box

  1. #1
    Join Date
    Oct 2013
    Posts
    3

    Question Take me to 'a particular Page' Box

    Hi guys,

    I have a site, not yet live, and I would like to include a 'Which Page?' Box to enable the user to insert the page number, from 1 to 999, he requires. All the pages will be in html, 1.html, 2.html etc. Is this at all possible?

    Any help would be appreciated. Mike

  2. #2
    Join Date
    Oct 2012
    Location
    Croatia
    Posts
    247
    Yes, it could be done. Simple example:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    	<meta charset="UTF-8" />
    	<script>
    		function changePage(){
    			window.location.href = document.getElementById('pNumber').value + ".html";
    		}
    	</script>
    </head>
    <body>
    	<p>Enter page number:</p>
    	<input id="pNumber" type="text" />
    	<input type="button" value="Go" onclick="changePage()" />
    </body>
    </html>

  3. #3
    Join Date
    Oct 2013
    Posts
    3
    Many thanks,

    I'll give it a go.


    Mike

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles