![]() ![]() |
| netmation |
Aug 7 2012, 01:08 AM
Post
#1
|
|
Group: Members Posts: 3 Joined: 7-August 12 Member No.: 17,569 |
Have the following code to accept input data in a web page single field....
<form id="search-form" method="get" action="" class="form-search"> <fieldset> <input name="search" type="text" class="txt" id="search" value="Search Page#..." onfocus="if(this.value == 'Search Page#...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search Page#...';}"/> <input type="submit" value="Submit" class="btn-search"/> </fieldset> </form> I want to be able to take the user input (i.e. PAGENUM) and embed that into a web page URL to automatically popup into another browser instance, when the user hits SUBMIT in the above HTML code. http://company.com/website/PAGENUM/index.html Any assistance would be much appreciated. Thanks, Al |
| Christian J |
Aug 7 2012, 09:15 AM
Post
#2
|
|
. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 4,776 Joined: 10-August 06 Member No.: 7 |
I want to be able to take the user input (i.e. PAGENUM) and embed that into a web page URL That happens automatically when you submit a form with method GET. The user input is atached to the URL as its querystring. QUOTE to automatically popup into another browser instance, when the user hits SUBMIT in the above HTML code. Not sure what you mean with "popup" and "browser instance". |
| netmation |
Aug 7 2012, 11:57 AM
Post
#3
|
|
Group: Members Posts: 3 Joined: 7-August 12 Member No.: 17,569 |
I probably wasn't clear in my initial post. I want to have a data entry box on a web page with a submit button. When the user enters text and hits submit a web page then opens up, using the entered text in the url string, in a new browser window.
For example if the user enters, "12345", the following web page opens up in a browser window, notice the "12345" in the url.... http://company.com/index.html?ln=12345&ff=1 Thanks for the help. |
| Christian J |
Aug 7 2012, 01:15 PM
Post
#4
|
|
. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 4,776 Joined: 10-August 06 Member No.: 7 |
The easiest way is to give the form a target attribute:
CODE <form action="" target="_blank"> <input type="text" name="ln" value=""> <input type="submit" value="Send"> </form> If you want more control of the new window (size etc) javascript is needed. |
| netmation |
Aug 9 2012, 12:37 PM
Post
#5
|
|
Group: Members Posts: 3 Joined: 7-August 12 Member No.: 17,569 |
Thanks Christian for the link and sample code. I will give it a try and let you know how I make out. Very much appreciated.
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 08:30 PM |