Help - Search - Members - Calendar
Full Version: form action
HTMLHelp Forums > Web Authoring > Graphics, Flash and Multimedia
GER
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
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
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
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).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.