Click to See Complete Forum and Search --> : Goto Text box
Mongoloidman
09-03-2004, 09:00 AM
I own a virtual tour company, and i want to be able to type in a tour id number and press go and have it take to me that tour.
all of my tours are in a seperate folder labelled with that particular id.
TheBearMay
09-03-2004, 09:20 AM
Possibly something like:
<input type="text" id="tourNum" />
<button onclick="document.location.href='http://yourUrl/'+getElementById(\"tourNum\").value">Go</button>
gil davis
09-03-2004, 09:29 AM
<form name="goto" onsubmit="return false">
<input name="tour" type="text">
<input type="button" value=" Go! " onclick="window.open(this.tour.value)">
</form>
Or
<form name="goto" action="" onsubmit="this.action=this.tour.value">
<input name="tour" type="text">
<input type="submit" value=" Go! ">
</form>
Mongoloidman
09-03-2004, 11:01 AM
im not using php so the first one i cant use
Im using html
but i cant get either of those to work.
let me describe what i need to do a little bit more
type in tour number, press go.
i then need to open a folder called 'tours' then open the 'tourid' folder and then open 'index.htm'
so how do you incorporate the 'tours' folder into either of those forms
TheBearMay
09-03-2004, 11:05 AM
It's not PHP just using the php code property to format the text on this forum. Given the added info:
<input type="text" id="tourNum" />
<button onclick="document.location.href='http://yourUrl/tours/'+getElementById(\"tourNum\").value+'/index.htm'">Go</button>
gil davis
09-03-2004, 11:23 AM
<form name="goto" action="" onsubmit="this.action='tours/' + this.tour.value + '/index.htm'">
<input name="tour" type="text">
<input type="submit" value=" Go! ">
</form>
Or
<form name="goto" onsubmit="return false">
<input name="tour" type="text">
<input type="button" value=" Go! " onclick="window.open('tours/' + this.form.tour.value + '/index.htm')">
</form>
Mongoloidman
09-03-2004, 11:31 AM
TheBearMay
tried it your way could not get it to work.
Gil Davis
used the first one you gave me worked like a charm.
THank you both of you for being patient with me.:D