473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

URL Redirection via text box . . . Please Help!

I need a form with one field, they type in a number (say 1234) and then
it takes them to a website: xyz.com/index.php?=1234
This is what I have so far, it may be completely incorrect, though.

<form name="PartSearch" id="PartSearch">
<input type="text" id="part" name="part"/>
<script>
redir {
document.location =
'http://www.icsource.com/icsourcewdl/icswdl.aspx?user=rezar&part=' +
getElementByID('part').value
}
</script>
<input type='button' onClick='redir'>
</form>

Please Help.

Thanks,

Jordan

Mar 2 '06 #1
2 1205
<jo**********@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
I need a form with one field, they type in a number (say 1234) and then
it takes them to a website: xyz.com/index.php?=1234
This is what I have so far, it may be completely incorrect, though.

<form name="PartSearch" id="PartSearch">
<input type="text" id="part" name="part"/>
<script>
redir {
document.location =
'http://www.icsource.com/icsourcewdl/icswdl.aspx?user=rezar&part=' +
getElementByID('part').value
}
</script>
<input type='button' onClick='redir'>
</form>

Please Help.

Thanks,

Jordan


Try this:

<html>
<head>
<title>redir.htm</title>
<script type="text/javascript">
function redir() {
var val = document.PartSearch.part.value;
if (val == "") return;
var url =
"http://www.icsource.com/icsourcewdl/icswdl.aspx?user=rezar&part=";
document.location.href = url + val;
}
</script>
</head>
<body>
<form name="PartSearch">
<input type="text" name="part">
<input type="button" value="Lookup" onclick="redir()">
</form>
</body>
</html>
Mar 2 '06 #2
Perfect! Thank you very much!

Mar 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jerry | last post by:
Hi All I would very much appreciate your help: I have two scripts alternating in the background triggering themselves mutually. Here is how: 1.) Script A does something and then calls Script...
4
by: Dustin | last post by:
I am trying to connect a camera through my router to put up onto a website. The camera (even after a firmware update) starts to get funny when i try to watch the video feed from above the router...
3
by: Wazz Up | last post by:
Hi, I'm trying run an image slide show where the images rotate once each, then after the last image in the array has been displayed for the specified amount of time, a redirection to another...
4
by: Edwin G. Castro | last post by:
I want to start a process from a C# application. I also want to redirect standard error to standard output so that I can read output from both streams just like I could from a command line. In...
13
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input,...
1
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID,...
4
by: segis bata | last post by:
Hello all, I have a page (located at mywebsite/a.asp) that redirects to another page (theirwebsite/b.asp) located in other server. This other page probably will redirect to another link again...
1
by: masanand | last post by:
Hi I have a web page which is calling a web method through which i am tring to do redirection to other url. But i am getting error says if i use server.transer.... Client found response...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.