PDA

View Full Version : HELP! ?'s on drop down menu's


carnuts33
06-20-2001, 12:12 PM
Hello people, i have decided to join a useful forum that will probably give me a good raise at work, since im new in all im just going to flat out say what im having trouble designing. my main problem is that im not to sure if i should use javascript or plain html to write the code i want. basically i really don't know what to input for the code, OK enough with the crying, here is the situation.
-in the middle of my page i have a drop down menu, with in the drop down menu i have a list of names.
-under this drop down menu i have an animated gif, which says "click to enter"

so basically what i want to do is able the user to highlight an a name from the drop down menu and have the user click on the animated gif, so the user can go to the next page.

This is the confusing part for me! i really don't know how to write this, i really don't know if it can be done, i just had a vision in my head and thought that would look on the site. so if haven't confused you guys already just reply back and hopefully i can try to explain it better,
thanks for your time and hopefully you guys help me out from my jam!
CARNUTS33

pixelmonkey
06-20-2001, 12:29 PM
that can be done... i just need to know a couple of things.

is your drop down menu dynamic?

what program will you be using to edit it?

and how many options do you need from the drop down?


hangnig out and eating bananas!
chris<pixelmonkey>:monkey:

carnuts33
06-20-2001, 12:42 PM
As far as dynamic, well does animated gif's make a page dynamic?? i wouldn't think so. My editing program that i am using is frontpage 98 and the number of options that are within the drop down menu is 4 items,
hey, thanks again for responding.
CARNUTS33

pixelmonkey
06-20-2001, 01:25 PM
this should work for you!



have fun with it!
chris<pixelmonkey>:monkey:




<html>

<head>
<title>Dynamic Drive- Scrollers</title>
</head>

<body>
<table id=contentarea cellSpacing=0 cellPadding=0 width="98%" border=0>
<tr>
<td vAlign=top align=left>
<form name=test method=post>
<!--webbot
bot="HTMLMarkup" startspan -->
<script>
function warp(){
window.location=document.test.test2.options[document.test.test2.selectedIndex].value
}
</script>
<!--webbot bot="HTMLMarkup" endspan --><b>
<select style="font-WEIGHT: bold; BACKGROUND-COLOR: rgb(255,255,255)" size=1 name=test2>
<option value=http://www.yourdomain.com/index.html>Link Selection 1</option>
<option value=http://www.yourdomain.com/index.html>Selection 2</option>
<option value=http://www.yourdomain.com/index.html>Getting Closer</option>
<option value=http://www.yourdomain.com/index.html>Calling it complete!</option> </select>
<a style="COLOR: black; TEXT-DECORATION: none"
href="javascript:warp()"><img src="file:///W:/wwwroot/images/new_tiny.gif" border="0" alt="Go Button"></a></b></form>
</td>
</tr>
</table>
</body>
</html>

pixelmonkey
06-20-2001, 01:26 PM
special thanks to DynamicDrive on that one!

chris<pixelmonkey>:monkey:

carnuts33
06-20-2001, 04:38 PM
Hey, guys whats up?
just wanted to say it almost worked out for me but the only problem i ran into was that once i had all the code correct i clicked on the animated gif to take me to the next page, i was encountering an "error" saying wrong URL, so maybe that is mistake on my part? so far this is the code that i have:
<table id="contentarea" cellSpacing="0" cellPadding="0" width="98%" border="0">
<tr>
<td vAlign="top" align="left"><form name="test" method="post">
<div align="center"><center><p><b><select
style="font-WEIGHT: bold; BACKGROUND-COLOR: rgb(255,255,255)" size="1" name="test2">
<option selected value="Select one">Select One</option>
<option value="../web_addresses/muscatine.html">Krieger's of Muscatine</option>
<option value="../web_addresses/dewitt.html">Krieger's of Dewitt</option>
<option value="../web_addresses/orion.html">Krieger's of Orion</option>
<option value="../web_addresses/cambridge.html">Krieger's of Cambridge</option>
</select></b><!--webbot bot="HTMLMarkup" startspan -->
<script>
function warp(){
window.location=document.test.test2.options[document.test.test2.selectIndex].value}
</script>
<!--webbot bot="HTMLMarkup"
endspan --></p>
</center></div><b><div align="center"><center><p><a
style="COLOR: black; TEXT-DECORATION: none" href="java%20script:warp()"><img
src="http://63.102.190.57/web%20_addresses/clicktoenter.gif" border="0" alt="Go Button"
alt="clicktoenter.gif (16311 bytes)" width="145" height="77"></a> </b></p>
</center></div>
</form>
</td>
</tr>
</table>

i don't know am i suppose to mess with any of the [document.test.test2...., am i suppose to just leave that information alone? i was talking to another friend and said that the animated gif only has one action that is why the gif can not take me to the selected page. and junk like that so i was going to try to use front page's "plain buttons, and see if that works,
ok thanks for putting up with my Stupid self, but at least im not the only one! (i think)
CARNUTS##

pixelmonkey
06-20-2001, 04:51 PM
yea, it must be a naming error if you are seeing a 404 page. as for the code... about the only thing i could find wrong was double values in the image of alt="" & alt="" . best just to have one alt"". about the only other thing i see is the dir naming here: http://63.102.190.57/web%20_addresses/clicktoenter.gif

the web address works cleaner when compressed to webaddress.

hope it helps!
chris<pixelmonkey>:monkey:

petervazed
06-20-2001, 05:50 PM
In this part you have to take %20 out, there must be space.
-----
><p><a
style="COLOR: black; TEXT-DECORATION: none" href="java%20script:warp()">
------
The code of pixelmonkey is OK, when I put a space in your code where now is %20 it is also OK.

BTW, the button is to big if it is 16311 bytes.
You can use irfan freeware on http://www.irfanview.com
to make it smaller in kb. Use save as, then option and it will be smaller.

carnuts33
06-20-2001, 06:20 PM
well, its still not going through i have checked most possible ways to correct the address, situation, i still have a "file not found" error message come up each time i highlight the selected and i click on the gif to let me enter but still no luck. i have compressed the dir name to webaddresses and got rid of the underscore symbol. this is the current html:

<table id="contentarea" cellSpacing="0" cellPadding="0" width="98%" border="0">
<tr>
<td vAlign="top" align="left"><form name="test" method="post">
<div align="center"><div align="left"><p><b><select
style="font-WEIGHT: bold; BACKGROUND-COLOR: rgb(255,255,255)" size="1" name="test2">
<option selected value="Select one">Select One</option>
<option value="http://63.102.190.57/webaddresses/muscatine.html">Krieger's of Muscatine</option>
<option value="http://63.102.190.57/webaddresses/dewitt.html">Krieger's of Dewitt</option>
<option value="http://63.102.190.57/webaddresses/orion.html">Krieger's of Orion</option>
<option value="http://63.102.190.57/webaddresses/cambridge.html">Krieger's of Cambridge</option>
</select></b><!--webbot bot="HTMLMarkup" startspan -->
<script>
function warp(){
window.location=document.test.test2.options[document.test.test2.selectIndex].value}
</script>
<!--webbot bot="HTMLMarkup"
endspan --> <a style="COLOR: black; TEXT-DECORATION: none" href="java%20script:warp()"><img
src="http://63.102.190.57/webaddresses/clicktoenter.gif" border="0" alt="Go Button"
width="145" height="77"></a></p>
</div><div align="center"><center><p>&nbsp;</p>
</center></div></div>
</form>
</td>
</tr>
</table>
<div align="center"><center>

all the <centers> are a bit confusing but homepage puts those there just becuase of the way i have centered the drop down menu and the gif. but still it doesn't want to work, i'll keep at though, thanks alot you guys for your info, i'll keep you guys posted on the results. im pondering on the idea of wiping this idea out and just use pics as a hyperlink, i did try fixing the space in between java and script but frontpage automatically puts that the %20 so i really don't know what to do! so any suggestions from you guys on what or how i can fix this problem would be great.
thanks again
CARNUTS33

Ian
06-20-2001, 08:34 PM
Hi,
2 errors here both to do with your function. First, this one you already know... the %20 between java and script, maybe editing it in another program will solve this (notepad works). The second problem is within your function, your coding should say

<script>
function warp(){
window.location=document.test.test2.options[document.test.test2.selectedIndex].value}
</script>

NOTE: that is "Selected" not "Select" in your code.

I hope this helps.

petervazed
06-20-2001, 08:56 PM
Could not find out what was wrong :(

This is working:
<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>
(Type a title for your page here)
</title>
<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#808080" text="#ffff00" link="#0000ff" vlink="#800080" alink="#ff0000">

<!-- Start Of Drop Down Links Script -->
<!-- Consolidate a bunch of links to a simple drop down menu -->
<!-- Instructions: Just put this in your page where you want to display links. -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<script language="JavaScript">

function CC_go(form) {var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value, target="_parent", "toolbar=yes,scrollbars=yes,location=yes"); }

</script>
<center>
<form name="CC_LinkForm" >
<select name="dest" SIZE=1
style="color:#d50015"
style="background:#abcdef"
style="border:outset"
style="font-family:comic sans ms"
style="font-size:14">
<option selected value="">
Select a Site

<option value="http://63.102.190.57/webaddresses/muscatine.html">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Krieger's of Muscatine
</option>
<option value="http://63.102.190.57/webaddresses/dewitt.html">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Krieger's of Dewitt
</option>
<option value="http://63.102.190.57/webaddresses/orion.html">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Krieger's of Orion
</option>
<option value="http://www.geocities.com/kimmers_53110/SunshineAve.html">
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;Amerikaanse Site van Kim
</option>
<option value="http://63.102.190.57/webaddresses/cambridge.html">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Krieger's of Cambridge
</option>
</select>
<br>
<p>

<button style="background-color:#000000" onClick="CC_go(this.form)">
<table border="0" width="145" cellspacing=0 cellpadding=0 bgcolor="#000000">
<tr>
<td width="145">

<img src="http://63.102.190.57/webaddresses/clicktoenter.gif" border="0" alt="Go Button" alt="clicktoenter.gif (16311 bytes)" width="145" height="77">
</td>
</tr>
</table>
</button>
</form>
</center>
<!-- End Of Drop Down Links Script -->


</body>

</html>
================
In preview I saw a face
style="border:outset"
to be style="border : outset"
=====
used Arachnophilia to edit

carnuts33
06-25-2001, 12:27 PM
hey people once again I like to tell you guys thanks for the helpful hints, but for some odd reason its still doesn't want to go to the html file. I have corrected the function error which is the selected not select, i still can not change the error in
href="java%20script()"><img
I tried to delete it in front page and that didn’t work it always kept on popping up when I tried to preview it so I tried to go to word pad and inputted into the code. That still didn’t work so I don’t know what the deal is. Know I have the correct URL filenames so I am just assuming it’s the Java code.

This is the code so far:
<table id="contentarea" cellSpacing="0" cellPadding="0" width="98%" border="0">
<tr>
<td vAlign="top" align="left"><form name="test" method="post">
<div align="center"><div align="center"><center><p><!--webbot bot="HTMLMarkup" startspan -->
<script>
function warp(){
window.location=document.test.test2.options[document.test.test2.selectedIndex].value}
</script>
<!--webbot
bot="HTMLMarkup" endspan --> <b><select
style="font-WEIGHT: bold; BACKGROUND-COLOR: rgb(255,255,255)" size="1" name="test2">
<option selected value="Select one">Select One</option>
<option value="http://63.102.190.57/webaddresses/muscatine.html">Krieger's of Muscatine</option>
<option value="http://63.102.190.57/webaddresses/dewitt.html">Krieger's of Dewitt</option>
<option value="http://63.102.190.57/webaddresses/orion.html">Krieger's of Orion</option>
<option value="http://63.102.190.57/webaddresses/cambridge.html">Krieger's of Cambridge</option>
</select></b></p>
</center></div><div align="center"><center><p><a
style="COLOR: black; TEXT-DECORATION: none" href="java%20script()"><img
src="http://63.102.190.57/webaddresses/clicktoenter.gif" border="0" alt="Go Button"
width="145" height="77"></a></p>
</center></div></div>
</form>
</td>
</tr>
</table>
<div align="center"><center>

So when I click on the gif to go to the highlighted file, it is still giving me an URL error, so this is the update.
Again thanks for all that have inputted to help me out
Thanks again
CARNUTS33

sweetkrissy
01-02-2002, 05:37 AM
I know how to make that...just go to my site:D
http://www.geocities.com/gamezulike/index.html

I have that on my site just enter...and left above you see menu bars fallen down...

I am a HTML-webdesigner...if you got any problems at all just mail me krissantylove@hotmail.com I will answer back of course for free!!!!.....:D

sweetkrissy