PDA

View Full Version : Drop-Down Nav menu error - HTML



RoD
10-03-2002, 02:13 PM
Ok, i wanted to make a navigation menu for my site, but when i select one of my options and click go, i get an error. The host supports FP extensions so it should work.

The site is http://www.nelie.org/steveprog

//Added: http://www.nelie.org/steveprog/_derived/nortbots.htm

thats the url in the address bar after i select any of my options, yet the html is clearly targeted to my sites not whatever that location is....

Select a catagory and click go, you'll see the error. I didn't program it in HTML, rather the FP 2002 interface, but i am posting the HTML. Please help, i know its prolly something i didn't do lol.



<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Hello</title>
</head>

<body text="#FFFFFF" bgcolor="#000000" background="bg.gif">

<p>&nbsp;</p>
<p align="center">
<img border="0" src="http://triplex.freewebsitehosting.com/banner.jpg" width="468" height="60"></p>
<p align="center">
&nbsp;</p>
<p align="center"><IMG SRC="http://counter.digits.com/wc/-d/4/COSB" ALIGN=middle WIDTH=60 HEIGHT=20 BORDER=0 HSPACE=4 VSPACE=2&gt; </p>
<p>&nbsp;</p>
<form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p align="center">
<select size="1" name="Navigation">
<option>Select Catagory:</option>
<option value="http://www.nelie.org/steveprog">Home</option>
<option value="http://www.nelie.org/steveprog/goals.html">Goals
</option>
<option value="http://www.nelie.org/steveprog/projects.html">Projects
</option>
<option value="http://www.nelie.org/steveprog/downloads.html">Downloads
</option>
<option value="http://www.nelie.org/steveprog/a.html">Acknowledgements
</option>
<option value="http://www.nelie.org/steveprog/links.html">Links
</option>
<option value="http://www.nelie.org/steveprog/contacts.com">Contact
</option>
</select><input type="submit" value="Go" name="B1"></p>
<p align="center">
&nbsp;</p>
</form>
<p align="center">&nbsp;</p>
<p align="center"><i><b><font size="4" color="#00FFFF">News:</font></b></i></p>
<p align="left">&nbsp;</p>
<p align="left">&nbsp;</p>
<p align="left"><u><i><b>October 2, 2002:</b></i></u></p>
<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I'm in the process of
adding sections, graphics, menus, content to,&nbsp; and just generally updating
the website. You may see the site one way now, and ten minutes from now it may
be totally different, this is not unusual for a website, but a lot of it will be
going on in the next week or so while I get things going. I am also in the
process of moving the site to a new server that handles FrontPage extensions, so
if you can't use the navigation menu above its because I'm still on Free
servers. After the move I will announce it and the menus will all be functional.
The URL will stay as <a href="http://www.steveprog.cjb.net">
<font color="#FFFFFF">www.steveprog.cjb.net</font></a>.&nbsp;&nbsp;&nbsp; <b><i>
-Steve</i></b></p>
<p align="left">____________________________________</p>
<p><u><i><b>October 1, 2002:</b></i></u></p>
<p>&nbsp;&nbsp;&nbsp; Caverns v 1.0 release 3 is on its way. I have implemented
a mapping system so you can't always go in the same directions. There will also
be a lot of code revamping going on to make it both more efficient and stable.
Keep your eye on the downloads section for Caverns v1r3!&nbsp;&nbsp; <b><i>&nbsp;-Steve</i></b></p>
<p align="left">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p align="center">
<p align="center">&nbsp;<p align="center">&nbsp;<p align="center"><font size="4">Steven Billington is a supporter of Open
Source.</font></p>
<p align="center"><font size="4">&nbsp; </font><font size="2">&nbsp;Please do
not email me requesting specific programs or games. For elaborations on my code,
explanations of my code, comments/suggestions, or anything pertaining to content
on this site, feel more then welcome to contact me. There are several ways to do
this, all of which are listed in the &quot;Contact&quot; section of this site.</font></p>
<p align="center"><font size="1">All programs, code, and content of this sire,
with the exception of ideas, is the sole property of Steven Billington and may
not be altered without permission unless otherwise noted.</font></p>
<font SIZE="1">
<p align="center"> Steven Billington</p>
</font>

</body>

</html>

FillYourBrain
10-03-2002, 02:18 PM
a great site for this sort of thing is www.dynamicdrive.com I am no master of dhtml so I probably can't figure out your problem.

RoD
10-03-2002, 02:19 PM
dhtml??

>>page cannot be displayed.

FillYourBrain
10-03-2002, 02:22 PM
I fixed the link. And Dynamic HTML is javascript+html the way I understand it.

FillYourBrain
10-03-2002, 02:23 PM
my bad. You aren't using javascript! Just a regular combobox thing. Ok, let me look over this.

RoD
10-03-2002, 02:25 PM
i'm a simple person hehe, thnx for looking at it.

FillYourBrain
10-03-2002, 02:25 PM
I get an error on those pages when I just type them in the address bar. the drop down isn't broken but the pages are.

RoD
10-03-2002, 02:30 PM
http://www.nelie.org/steveprog/downloads.html
http://www.nelie.org/steveprog/index.html
http://www.nelie.org/steveprog/a.html
http://www.nelie.org/steveprog/contacts.html
http://www.nelie.org/steveprog/links.html
http://www.nelie.org/steveprog/projects.html
http://www.nelie.org/steveprog/goals.html

all work for me, i can type em manually n they work, but its like the combo box is aiming for that weird URL i mentioned rather then the ones i told it to.

Edit://

i think it has sumthing to do with this, cause this has that url (the end of it anyway)


<form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p align="center">

FillYourBrain
10-03-2002, 02:30 PM
ok, never mind what I just said. The thing that's broken is "_derived/nortbots.htm" which is supposed to redirect I assume. You could do this without redirecting through that page but I don't remember this stuff too well. a little bit of javascript on the button click to surf to the address in the "option" does it. But someone else is going to have to help now. sorry.

RoD
10-03-2002, 02:32 PM
well fyb least we narrowed it down, i edited my post while u were posting your last haha, hopefully one of our html/java savvy buddies will tell us where i messed up.

Thnx

Driveway
10-03-2002, 02:59 PM
Why use front page when you ca just do it yourself?

RoD
10-03-2002, 03:00 PM
Why use front page when you ca just do it yourself?

i can't lol.

Well i COULD, fp is easier.

FillYourBrain
10-03-2002, 03:04 PM
got it
change your form to this


<form name="form1" method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p align="center">
<select size="1" name="Navigation">
<option>Select Catagory:</option>
<option value="http://www.nelie.org/steveprog">Home</option>
<option value="http://www.nelie.org/steveprog/goals.html">Goals
</option>
<option value="http://www.nelie.org/steveprog/projects.html">Projects
</option>
<option value="http://www.nelie.org/steveprog/downloads.html">Downloads
</option>
<option value="http://www.nelie.org/steveprog/a.html">Acknowledgements
</option>
<option value="http://www.nelie.org/steveprog/links.html">Links
</option>
<option value="http://www.nelie.org/steveprog/contacts.com">Contact
</option>
</select><input type="button" value="Go" name="B1" onclick="window.navigate(document.form1.Navigation.options[document.form1.Navigation.selectedIndex].value);"></p>
<p align="center">
</p>
</form>

RoD
10-03-2002, 03:30 PM
Thanks man, i guess FP's built in code is messed up : /

I used the text compare'r thingy so i know what u did, i'm learning woot!

RoD
10-04-2002, 08:43 PM
New problem, i made a second copy of this form and chnaged its name and values, the prob is the "jet boat" option targets the boat.html and goes to my index.html.....i messed sumthing up, its the second form i seperated for easy reading.



<form name="form1" method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p align="center">
<select size="1" name="Navigation">
<option>Select Catagory:</option>
<option value="http://www.nelie.org/steveprog">Home</option>
<option value="http://www.nelie.org/steveprog/goals.html">Goals
</option>
<option value="http://www.nelie.org/steveprog/projects.html">Projects
</option>
<option value="http://www.nelie.org/steveprog/downloads.html">Downloads
</option>
<option value="http://www.nelie.org/steveprog/a.html">Acknowledgements
</option>
<option value="http://www.nelie.org/steveprog/links.html">Links
</option>
<option value="http://www.nelie.org/steveprog/contacts.html">Contact
</option>
</select> <input type="button" value="Go" name="B1" onclick="window.navigate(document.form1.Navigation.options[document.form1.Navigation.selectedIndex].value);"></p>
</form>





<form name="form2" method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="1"><!--webbot bot="SaveResults" endspan i-checksum="43406" --><p align="left">
<select size="1" name="Navigation2">
<option>Select Pictures</option>
<option value="http://www.nelie.org/steveprog/boat.html">My Jet Boat</option>
<option>More soon</option>
</select>
<input type="button" value="Go" name="B2" onclick="window.navigate(document.form1.Navigation.options[document.form1.Navigation.selectedIndex].value);"></p>
</form>

Eibro
10-04-2002, 09:00 PM
onSubmit="location.href='_derived/nortbots.htm';return false;"

Uhm, unless there's something special about frontpage extensions.. this bit of script is going to send you to the same page every time.

RoD
10-04-2002, 09:09 PM
but see FYB fixed the first menu, that works, and scince i copied the first and jus changed name/values as well as the form name and such, the scripts the same aside from targets so it should work.

My theory is this:

On menu one index is the first option, as Select has no value, so Jet Boat is in index's spot on a different menu, and somehow is linking back to the first menu, i just don't know where @.

dbaryl
10-04-2002, 09:33 PM
I've had one on my site before, looks like this:
<form name="form_name" method="POST">

<select name="select_list">

<option selected>Select a Category:</option>
<option value="URL_one">1</option>
<option value="URL_two">2</option>
</select>

<input type=button onClick= "location = '' + document.form_name.select_list.options[ document.form_name.select_list.selectedIndex ].value;" value="Go">
</form>


all you have to do is replace the respective names for the form name and the list name and it should work just fine.

RoD
10-05-2002, 09:25 AM
name="B2" onclick="window.navigate(document.frm2.Nav2.options[document.frm2.Nav2.selectedIndex].value)

It used to have the same names as the first form stead of frm2 and Nav2, i just changed em and the form names to correspond, thnx for the help!