form action, help needed with simple form |
form action, help needed with simple form |
GER |
Feb 2 2014, 06:48 AM
Post
#1
|
Group: Members Posts: 2 Joined: 2-February 14 Member No.: 20,310 |
Hello,
I am looking for a simple form which has the following action: by entering a number the visitor is redirected to an url ( not the same as the domain where the fill in the form) + / number < they fill in f.e. 10 and bij submit they are redirected to: www.domain.com/10 > Can somebody point me in the right direction? Thanx in advance. GER |
Christian J |
Feb 2 2014, 08:49 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
That requires scripting, either javascript or server-side (e.g. PHP).
If it's used for password protection, javascript will not be reliable since anyone can see it in the page source. |
GER |
Feb 2 2014, 09:47 AM
Post
#3
|
Group: Members Posts: 2 Joined: 2-February 14 Member No.: 20,310 |
Its not for password protection.
Its only to direct customer to 'his' login on a different url with an ID So customer Id 10 goes to www.domain.com/10 Customer Id 11 goes to www.domain/11 The form is on another domain. Anybody a script/ form action I can try and work with.. I started something like this, but its not working < newby in forms ;-(…> <li class="dropdown"> <a href="http://www.domain.com" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-lock"></span></a> <ul class="dropdown-menu"> <li> <form role="form"> <div class="form-group"> <formaction="http://www.domain.com" method="get"> <label>ID: <input type="number" name="http://www.domain.com" /></label> <input type="submit" value="Go --> Login" /> </form> |
Christian J |
Feb 2 2014, 02:17 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
Here's a basic form:
CODE <form action="http://www.otherdomain.com/"> <input type="text" name="page" value=""> <input type="submit" value="Send"> </form> If the user enters "10" it will load the URL CODE http://www.otherdomain.com/?page=10 where "page" is the name of the textfield and "10" is a value entered in the form. If you want to change this URL format to something like CODE http://www.otherdomain.com/10 you'll need additional scripting. Perhaps a .htaccess redirect at www.otherdomain.com can do it, otherwise a server-side script like PHP, or as a last resort javascript in the form itself (search for "javascript password" or similar to find code examples). |
Lo-Fi Version | Time is now: 25th September 2024 - 09:53 PM |