Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 05-11-2004, 01:34 PM   #1 (permalink)
Inactive
 
Join Date: 10-29-03
Posts: 249
iTrader: 0 / 0%
Latest Blog:
None

Limit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the rough
Form Forwarder

Is it possible to have a form on a webpage which would have part of a web address in it.

eg.. http://www.domain.tld/ FORM BOX HERE

then whatever is filled in the form box when they click it goes to

http://www.domain.tld/textinputtedonform


Is this possible?

Thanxs in advance
Limit is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 05-11-2004, 02:18 PM   #2 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
You should be able to do it with JavaScript. Something like this example:

<SCRIPT LANGUAGE="JavaScript"><!--
function mySubmit(myForm) {
location.href = 'http://www.somewhere.com/someother.cgi?' +
'text1=' + escape(myForm.text1.value) +
'&' +
'text1=' + escape(myForm.text2.value);
}
//--></SCRIPT>

<FORM ACTION="http://www.somewhere.com/some.cgi">
<INPUT TYPE="TEXT" NAME="text1" VALUE="value1">
<INPUT TYPE="TEXT" NAME="text2" VALUE="value2">

<INPUT TYPE="BUTTON" VALUE="Submit Extra!" onClick="mySubmit(this.form)">

<INPUT TYPE="SUBMIT" VALUE="Submit">
</FORM>

You can also do it with ASP, PHP or Cold Fusion.

Asp Example:

<%
Dim url
url = "page.asp/" & Request.Form("text_box")

Response.Redirect url
%>

There are too many ways to do this to show all examples. It would be helpful to know what programming language you are using.

Personally I would not rely on a user typing in the link/directory. It would be better to either use a drop down menu or radio button for selection unless you are using this for validation or authenication purposes.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-11-2004, 02:19 PM   #3 (permalink)
Inactive
 
Join Date: 10-29-03
Posts: 249
iTrader: 0 / 0%
Latest Blog:
None

Limit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the rough
sorry about that i'm using PHP
Limit is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-11-2004, 02:46 PM   #4 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Create your form page.

[code:1:d6f6a08557]<form action="redirect.php">
<input type="text" name="url">
<input type=submit>
</form>[/code:1:d6f6a08557]

Submit the page to the following script:

[code:1:d6f6a08557]<?php
$link = $_GET['url'];

header("Location: $link/index.php");
?>[/code:1:d6f6a08557]
Example: If you type image in the text box.

If you submit the form to:

[code:1:d6f6a08557]www.somewebsite.com/redirect.php[/code:1:d6f6a08557]

The page would redirect to:

[code:1:d6f6a08557]www.somewebsite.com/images/index.php[/code:1:d6f6a08557]

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-11-2004, 02:51 PM   #5 (permalink)
Inactive
 
Join Date: 10-29-03
Posts: 249
iTrader: 0 / 0%
Latest Blog:
None

Limit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the roughLimit is a jewel in the rough
thanxs worked great
Limit is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-12-2004, 09:45 PM   #6 (permalink)
Inactive
 
seonewbee's Avatar
 
Join Date: 05-12-04
Posts: 520
iTrader: 0 / 0%
Latest Blog:
None

seonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really nice
I saw the php example above and it almost like something I need. I want one that reads a a flat text file and returns the correct url.

A varable would be passed to redirect.php and redirect.php would get the correct url from a file and pass it on to the browser.

redirec.php?id=webmasterforum


Text file:

webmasterforum!http://www.internet-marketing-research.net/

Can this be done?

Thanks in advance for your assistance.
seonewbee is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-12-2004, 09:54 PM   #7 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
You could try something like this.

[code:1:0fe7798b9b]<A href="http://www.domain_name.com/redirect.php?id=webmasterforum">redirect</a> [/code:1:0fe7798b9b]

submit page

[code:1:0fe7798b9b]<?php

$redirect = $_GET['id'];

if ($redirect == 'webmasterforum') {
header('location: http://www.domain1.com');
} else {
header('location: http://www.domain2.com');
}
?> [/code:1:0fe7798b9b]

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-13-2004, 08:54 AM   #8 (permalink)
Inactive
 
seonewbee's Avatar
 
Join Date: 05-12-04
Posts: 520
iTrader: 0 / 0%
Latest Blog:
None

seonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really nice
Thank you imaginemn. Very cool!

That is a very cool solution. Thank you very much.
seonewbee is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't show non-modal form when modal form is displayed sypond Coding Forum 3 03-23-2007 08:31 AM
there's a form down, form down drew68 Coding Forum 2 08-02-2006 10:45 AM
Php Form Help please... Clark Coding Forum 21 03-30-2005 07:38 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:41 AM.
© Copyright 2008 V7 Inc