Solved

Dropdown menu without a Go button!!

Posted on 1998-08-12
38
630 Views
Last Modified: 2012-08-14
Hi,
Well my title will tell you what I need for my site.
I can make a:
-------
<CENTER><FORM><SELECT NAME="list"><!--OPTION VALUE="">TEXT HERE-->
<OPTION VALUE="index.html">Choose
a category. Email me with suggestion; at bottom of the page:)&nbsp;
<OPTION VALUE="100-FAQ.html">100
Troubleshooting Articles&nbsp;
<OPTION VALUE="http://www.onelook.com/">Computer
ACRONYMS.&nbsp;
<OPTION VALUE="3PartSys.html">Creating a New System.ini
File Without Third-Party Drivers&nbsp;
<OPTION VALUE="IE.html">IE4x and
Active Desktop&nbsp;
<OPTION VALUE="MostUsed.html#How to Register">How to
Register DLL, Ole, Oxb, Vxd and misc other files&nbsp;
<OPTION VALUE="95-Files.html">Windows95
Directory and Alphabetical File Listing&nbsp;
--------------
What I'm trying to make is one without the Go button.
A friend sent me the below but I get jave errors from the script.
Can any one help.
-------------
<SCRIPT LANGUAGE="JavaScript">
<!--
function leapto(form) {
        var myindex=form.dest.selectedIndex
        window.location=(form.dest.options[myindex].value);
}
-->
</script>

Put this part on your page anywhere....

<FORM NAME="myform">
<SELECT NAME="dest" SIZE=1>
<option value="">
 <OPTION selected> Select Destination
<OPTION VALUE="anywhere.html"> Anywhere
<OPTION VALUE="nowhere.html"> Nowhere</SELECT>
<INPUT TYPE="BUTTON" VALUE="GO!" onClick="leapto(this.form)">
</FORM>
=============
I'll show you what i need it for. Please see:
http://www.geocities.com/~budallen/
"Assorted Categories"
"Registry Hacks and Assorted Tips"
All those links at the top of that page are unacceptable.

Thanks.
Bud
0
Comment
Question by:smeebud
  • 18
  • 7
  • 6
  • +4
38 Comments
 

Expert Comment

by:nicho_52
Comment Utility
Try changing the [myindex] array to the address you want to goto...
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
make 2 changes:

1.
change:
<INPUT TYPE="BUTTON" VALUE="GO!" onClick="leapto(this.form)">
to:
<INPUT TYPE="BUTTON" VALUE="GO!" onClick="leapto(this)">

2.
change:

function leapto(form) {
  var myindex=form.dest.selectedIndex
  window.location=(form.dest.options[myindex].value);
}

to:

function leapto(selectbox) {
  window.location=selectbox.options[selectbox.selectedIndex].value;
}



0
 
LVL 3

Expert Comment

by:MorFF
Comment Utility
From your code above, try changing...

<SELECT NAME="dest" SIZE=1>  to...

<SELECT NAME="dest" SIZE=1 onClick="leapto(this.form)">  
and remove...
<INPUT TYPE="BUTTON" VALUE="GO!" onClick="leapto(this.form)">

this moves the action to the dropdown, rather than the button, when the user picks something from the combo, the onclick sends them there straight away.

Cheers - MorFF
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Thanks guys,
Sybe,
The error, no matter what i change is always as below;
---------------
JavaScript Error: file:/C|/bud/Reg-Tips.html, line 20:

syntax error.

    -->
....^
------------------------
And a Go Button appears.
I'm wanting a dropdown without a GO button
=============
Here's whatI have
--------------
    <!--
     function leapto(selectbox) {
        window.location=selectbox.options[selectbox.selectedIndex].value;
      }
    -->
    </script>
------------
Then

 <FORM NAME="myform">
    <SELECT NAME="dest" SIZE=1>
    <option value="">
     <OPTION selected> Select Destination
    <OPTION VALUE="Reg-Tips.html#Icon Troubles">Rebuild Your Registry
    <OPTION VALUE="Reg-Tips.html> Nowhere</SELECT>
     <INPUT TYPE="BUTTON" VALUE="GO!" onClick="leapto(this)">
    </FORM>

That stops anything from loading on the page.

Know that I'm a newbie at this.

Bud
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
sorry the following code works:

<FORM>
<SELECT NAME="list" onChange="leapto(this)">
<OPTION VALUE="index.html">Choose a category. Email me with suggestion; at bottom of the page:)
<OPTION VALUE="100-FAQ.html">100 Troubleshooting Articles
<OPTION VALUE="http://www.onelook.com/">Computer ACRONYMS.
<OPTION VALUE="3PartSys.html">Creating a New System.ini File Without Third-Party Drivers
<OPTION VALUE="IE.html">IE4x and  Active Desktop
<OPTION VALUE="MostUsed.html#How to Register">How to  Register DLL, Ole, Oxb, Vxd and misc other files
<OPTION VALUE="95-Files.html">Windows95 Directory and Alphabetical File Listing
</SELECT>

<SCRIPT LANGUAGE="JavaScript">
<!--
function leapto(selectbox) {
       window.location=selectbox.options[selectbox.selectedIndex].value;
}
-->
</script>

</FORM>


0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Sorry nicho,
I don't understand that.

What I need is for someone to go to
http://www.geocities.com/~budallen/
"Assorted Categories"
"Registry Hacks and Assorted Tips"

Steal that right frame and take these links
----
Rebuild Your Registry
Icon Troubles
Icon Troubles 2
Change the Registered User Information
Removing Sound Events
Backing Up the Registry
Stop Applications From Running At Boot
Opening a DOS Window to either the Drive or Directory in Explorer
Getting Rid Of Registry Garbage
Bill Sorciere's Registry Cleaning Method
Changing Exchange's Mailbox Location
Removing Sound Events from Control Panel / Sound
Changing the Registered Owner
Adding an Application to the Right Click on Every Folder
Adding Explore From Here to Every Folder
Saving Desktop Settings
Getting Rid of Tips
Getting Rid of Schemes
Changing the Location of Windows95's Installation Files
Creating a Network Logon Banner
Creating a Default File Opener
Deleting Registry Keys from the Command Line
Restrictions without running Poledit
Automatic Screen Refresh
Disable Password Caching
Changing the MaxMTU and other Network Settings
DefaultRcvWindows and DefaultTTL
Adding Items to the Start Button
Removing Open, Explore & Find from Start Button
Removing Items from NEW
Changing the Telnet Scroll-Back Buffer Size
Changing the Tips of the Day
Disabling Drives in My Computer
Save Settings on Exit
Not Displaying the Network Neighborhood
Disabling Run or Find from the Start Menu
Hiding All Icons from the Desktop
Get Your Folders to Open the Way You Want Every Time
Modifying Default Desktop Icons
In addition, you can change:
Clearing the Documents Menu Automatically
Disabling the Right-Click on the Start Button
Disabling My Computer
Changing Desktop Icons
Opening Explorer from My Computer
Fixing A Corrupt Registry
Recycle Bin Edits
Setting the Minimum Password Length
Disabling File and Print Sharing
Specifying programs to run every time Windows95 starts
Removing the Shortcut Icon Arrows
Turn Off Window Animation
Changing your Modem's Initialization String
Increasing the Modem Timeout
Removing Programs from Control Panel's Add/Remove Programs Section
A Brief Explanation of the Registry Keys.
Restore the Registry by using DOS.
The Fix For Greyed Out Box's = EDIT FLAGS
-----
and make a dropdown. Then I can, or you can get rid od that long lisk of links.

I'll increase then pionts.

Heres one I found that would be really great if I understood.

------
<HTML>
<HEAD>
<TITLE>Pull-Down Menues</TITLE>

<SCRIPT LANGUAGE="JavaScript">
<!--

/*********
This JavaScript code was origianlly found at http://www.golden.net/~steinman/layers/
*********/

function chapter1on()
{
      if (document.layers['chapter1'].clip.bottom < 80)
      {
                document.layers['chapter1'].clip.bottom += 10;
                setTimeout("chapter1on();",50);
        }
}

function chapter1off()
{
      if (document.layers['chapter1'].clip.bottom > 20) {
                document.layers['chapter1'].clip.bottom -= 20;
                setTimeout("chapter1off();",20);
        }
}

function chapter2on()
{
      if (document.layers['chapter2'].clip.bottom < 80) {
                document.layers['chapter2'].clip.bottom += 10;
                setTimeout("chapter2on();",50);
        }
}

function chapter2off()
{
      if (document.layers['chapter2'].clip.bottom > 20) {
                document.layers['chapter2'].clip.bottom -= 20;
                setTimeout("chapter2off();",20);
        }
}

//-->
</SCRIPT>
</HEAD>

<BODY BGCOLOR="#FFFFFF">
<A HREF="jv_main.html"><IMG SRC="java.gif" ALT="Back to JS main page" width=33 height=33 border=0></A><P>
BY:<a href="http://www.golden.net/~steinman/layers/">Steinman</a><br>
DATE:1997-11-09<BR>
<hr>


<LAYER NAME="chapter1" LEFT=150 TOP=130 BGCOLOR=#C0C0C0 WIDTH=200 CLIP="-10,0,190,20" onMouseOver="chapter1on()" onMouseOut="chapter1off()">
Chapter 1: Title 1
<LI>1.1 - <A HREF="a1.html">A</A>
<LI>1.2 - <A HREF="a2.html">B</A>
<LI>1.3 - <A HREF="a3.html">C</A>
</LAYER>

<LAYER NAME="chapter2" LEFT=370 TOP=130 BGCOLOR=#C0C0C0 WIDTH=200 CLIP="-10,0,165,20" onMouseOver="chapter2on()" onMouseOut="chapter2off()">
Chapter 2: Title 2
<LI>2.1 - <A HREF="b1.html">D</A>
<LI>2.2 - <A HREF="b2.html">E</A>
<LI>2.3 - <A HREF="b3.html">F</A>
</LAYER>

<P><BR><BR><BR><BR><BR><BR><BR>
Just move your mouse over the links above to start the example.


The onMouseOver and onMouseOut methods are used to activate the appropriate function
to clip the layers.  As a suggestion, you'll probably want to make the speed of the
clipping faster when you exit than when you enter the layer.  That tends to make the
code more "fool-proof".  Also it's best that you use greater than and less than symbols
to define when the layers get clipped.  If you don't, then sometimes if you switch
between layers too quickly it'll mess up - like one will get clipped half way while the
other one starts and so on.

<hr>
If you want this script just choose "Save Frame As..." (in Netscape) when you have the focus on the frame.<p>
<I>URL: http://www.geocities.com/SiliconValley/7116/jv_clip1.html</I>
<hr>
<center>
<b>
This page hosted by
<a href="/"><img src="/pictures/geocities.gif" border=0 align=middle></a>
Get your own <a href="/">Free Home Page</a></b></center>


</BODY>
</HTML>

<DIV CLASS="GeoBranding" ID="GeoBranding" STYLE="position:absolute;top:1;visibility:hide;" ALIGN="right">
<A HREF="/cgi-bin/branding" TARGET="_top"><IMG SRC="/images/branding/geocities.gif" ALT="Welcome to GeoCities!" BORDER="0"></A><BR>
</DIV>
<SCRIPT LANGUAGE="javascript1.2" SRC="/include/branding/default_ns.js">
</SCRIPT>
----------

Thanks.
Bud
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Ok sybe, I'll try that.

Bud
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Sybe,
i still got
syntax error.

      -->
......^

Bud.
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
replace the
-->

with //-->
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Hi Sybe::::)))))
It lives.
I've entered 6 out of 50. before I go one with the other 50+ so I don't have to redo the whole thing, How do I make the Font Size, maybe color the same as the links where before. in the dropdown box the fonts are very large.

I'll up the points. The dropdown will be longer than the screen, as are the links now. Will scroll bar appear".
=======here's what I have now that works.
----
<FORM><FONT SIZE=+1><SELECT NAME="list" onChange="leapto(this)">
<OPTION VALUE="Reg-Tips.html">Menu
<OPTION VALUE="Reg-Tips.html#Rebuild Your Registry">Rebuild
Your Registry&nbsp;<OPTION VALUE="Reg-Tips.html#Icon Troubles">Icon Troubles&nbsp;<OPTION VALUE="Reg-Tips.html#Icon Troubles 2">Icon
Troubles 2&nbsp;<OPTION VALUE="Reg-Tips.html#Change the Registered User Information">Change
the Registered User Information&nbsp;<OPTION VALUE="Reg-Tips.html#Removing Sound Events">Removing
Sound Events&nbsp;<OPTION VALUE="Reg-Tips.html#Backing Up the Registry">Backing
Up the Registry&nbsp;
</SELECT><SCRIPT LANGUAGE="JavaScript">
<!--
function leapto(selectbox) {
window.location=selectbox.options[selectbox.selectedIndex].value;
}
//-->
</SCRIPT>
----------------Here is what the fonts looked like in my OLD links.
-------
<CENTER><B><FONT COLOR="#FFFFCC"><FONT SIZE=+1><A HREF="#Stop Applications From Running At">Stop Applications From Running At Boot</A></FONT></FONT></B></CENTER>
-----------

Well, wadda ya think
points increased to 500.
I'll grade an Excellent for just a little more help.
OH yea, can we center it.

Told you I was a newbie at html. I can handle most things alright, but I don't yet understand JAVA at all.

Bud
0
 
LVL 8

Expert Comment

by:jbirk
Comment Utility
Bud,
 You would have to use style sheets again to change the font of a form field.  I know that one of the browsers does support the color change and one doesn't, but they should both support the font change.  I am not sure if this will work, since I have never done this on a select, but have on text, and textarea fields, but you would just make your select like this:
<SELECT NAME="list" onChange="leapto(this)" style="">  with whatever your style is.  You could just copy the style right from your document, if that's the same style you want.

-Josh

0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Ok,
-----My style
<STYLE>
 BODY {font-size: 11pt; font-face: "Arial";margin-left: 10px;margin-right: 5px}
  H1 {font-size: 12pt; font-face: "Arial","Helvetica"; color: navy; font-weight: bold; }
  H2 {font-size: 14pt; font-face: "Times Roman"; color: black; font-weight: bold; }
   A:link {font-size: 11pt; font-face: "Arial","Helvetica"; color: blue; font-weight: bold; text-decoration: none}
  A:visited {font-size: 11pt; font-face: "Arial","Helvetica"; color: navy; font-weight: bold; text-decoration: none}
</STYLE>
==============So
<SELECT NAME="list" onChange="leapto(this)" style="">

style="">???

Bud
0
 
LVL 8

Expert Comment

by:jbirk
Comment Utility
try this: (I'm not sure if this will work correctly since it's a select, it may react differently to CSS)
<SELECT NAME="list" onChange="leapto(this)" style="font-size: 11pt; font-face: 'Arial','Helvetica'; color: blue; font-weight: bold;">
-Josh
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Darn, That doesn't seem to work.
Any other sugestions.
I can live with the big fonts as long a scroll bar appears.

Bud
0
 
LVL 8

Expert Comment

by:jbirk
Comment Utility
Yes, a scroll will appear.  I've seen it before.
-Josh
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
I'll give it a go.

be back.

Bud
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
sybe,
You did good, I'm re0opening in hopes that someone can tell me how to get the font size and maybe color in the statement.

Here's what i have now that works.
---------------
<FORM><SELECT NAME="list" onChange="leapto(this)">
<OPTION VALUE="Reg-Tips.html">Menu
<OPTION VALUE="Reg-Tips.html#Rebuild Your Registry">Rebuild
Your Registry&nbsp;<OPTION VALUE="Reg-Tips.html#Icon Troubles">Icon Troubles&nbsp;<OPTION VALUE="Reg-Tips.html#Icon Troubles 2">Icon
Troubles 2&nbsp;<OPTION VALUE="Reg-Tips.html#Change the Registered User Information">Change
the Registered User Information&nbsp;<OPTION VALUE="Reg-Tips.html#Removing Sound Events">Removing
Sound Events&nbsp;<OPTION VALUE="Reg-Tips.html#Backing Up the Registry">Backing
Up the Registry&nbsp;
</SELECT><SCRIPT LANGUAGE="JavaScript">
<!--
function leapto(selectbox) {
window.location=selectbox.options[selectbox.selectedIndex].value;
}
//-->
</SCRIPT>
</FORM>
----------------
Does anyone know how to get font size. Please see.
http://www.geocities.com/~budallen/
Under "Assorted Categories"
"Registry Hacks and Assorted Tips"

That's the size of font I'm after.

It also needs centered.

Thanks,
Bud
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
I have looked at your thing, if it possible to change the layout of a dropdown box, then only in MSIE4.

Anyway, I think that is worth another question.

I am leaving for holiday tomorrow, and I don't think I have much time to look at your new question.

0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
Bud,

Here is the code that you need...

<FORM name="SharedForm" METHOD=POST ACTION="redir.htm" TARGET="_top">
<SELECT SIZE=1 class="shared" NAME="GoOnCommand" ONCHANGE="GoHere(this);" language="JavaScript">
<OPTION VALUE="http://www.whatever.com/thispage.asp">This Page</OPTION>
<OPTION VALUE="http://www.thispage.com/whatever.htm">Go here...</OPTION>
etc..

</SELECT>

<SCRIPT language="JavaScript">
<!--
function GoHere(s)
{
      var d = s.options[s.selectedIndex].value;
      window.top.location.href = d;
      s.selectedIndex=0;
}
//-->
</SCRIPT>

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
Sorry, didn't read all the comments:
You can add color & font size by using:

<OPTION STYLE="font-size: 14pt; color: red;">words</OPTION>

That will give you the color and font changes using CSS...



0
 
LVL 2

Expert Comment

by:bernfarr
Comment Utility
I see that there's already a proposed answer. This may also help. I've tested it on IE 4.0 and Netscape 4.04, can't vouch for earlier versions. Notice I'm using &nbsp; characters to space out selections in the pulldown, and the if statement in the JavaScript to make the headings not go anywhere.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
</head>
<body>

<script language="JavaScript">
<!--
function leapto(myForm)
{
      var destField = myForm.dest
      var myindex = destField.selectedIndex

      if ( destField.options[myindex].value != "" )
            window.location=(destField.options[myindex].value);
}
// -->
</script>

<H2>Select a Topic</H2>
<FORM NAME="myform">

<SELECT NAME=dest SIZE=1 onchange="leapto(myform)">
<option value="" SELECTED>Select Destination  
<option value="">General
<OPTION VALUE="i_advanced.html">&nbsp;&nbsp;Utilities Everyone Should Have
<OPTION VALUE="i_utilities.html">&nbsp;&nbsp;Windows 95 Tune up; A must
<OPTION VALUE="Setup.html">&nbsp;&nbsp;Setup and Re-install Windows 95
<option value="">Trouble Shooting Section
<OPTION VALUE="i_startup.html">&nbsp;&nbsp;Specific Startup Errors
<OPTION VALUE="safemode.html">&nbsp;&nbsp;Safe Mode Procedures
</SELECT>

</FORM>

</body>
</html>
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
bernfarr,
I don't know if your read the thread, I know it long, but remember I'm very new to Java, so i don't follow you.
Did you look at my site, it all there.

Please see.
http://www.geocities.com/~budallen/
Under "Assorted Categories"
"Registry Hacks and Assorted Tips"

That's the size of font I'm after.

It also needs centered.

Please do look,
Thanks a lot
Bud
0
 
LVL 2

Expert Comment

by:bernfarr
Comment Utility
Bud

I did look at the web site. I think that shows from the sample code.

I don't think it's entirely clear what you're really asking for. You started by asking for a dropdown menu, which is what the code supplies. You can't control the font size in a select pulldown. If you change the code to:
<SELECT NAME=dest SIZE=1 onchange="leapto(myform)">
<option STYLE="font-size: 15pt; color: red;" value="" SELECTED>General</option>
<OPTION STYLE="font-size: 14pt; color: blue;" VALUE="i_advanced.html">&nbsp;&nbsp;Utilities Everyone Should Have</option>
<OPTION STYLE="font-size: 14pt; color: blue;" VALUE="i_utilities.html">&nbsp;&nbsp;Windows 95 Tune up; A must</option>
<OPTION STYLE="font-size: 14pt; color: blue;" VALUE="Setup.html">&nbsp;&nbsp;Setup and Re-install Windows 95</option>
<option STYLE="font-size: 15pt; color: red;" value="">Trouble Shooting Section</option>
<OPTION STYLE="font-size: 14pt; color: blue;" VALUE="i_startup.html">&nbsp;&nbsp;Specific Startup Errors</option>
<OPTION STYLE="font-size: 14pt; color: blue;" VALUE="safemode.html">&nbsp;&nbsp;Safe Mode Procedures</option>
</SELECT>

It will look more correct in IE, but the same as a normal pulldown in Netscape. You also keep referring to Java. All of this code is written in JavaScript. If you want some Java code for a pulldown menu, you could look at the XeoMenu code, which I believe is free for use, at:
  http://www.javasoft.com/applets/other/XeoMenu/index.html

Hope this helps.

0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
Or this, I have found some time to test it:


<FORM>
<SELECT NAME="list" style="font-family: Courier; font-size: smaller; background-color: rgb(128,128,0); color: rgb(0,128,0)" onChange="leapto(this)">
<OPTION VALUE="index.html">Choose a category. Email me with suggestion; at bottom of the page:)
<OPTION VALUE="100-FAQ.html">100 Troubleshooting Articles
<OPTION VALUE="http://www.onelook.com/">Computer ACRONYMS.
<OPTION VALUE="3PartSys.html">Creating a New System.ini File Without Third-Party Drivers
<OPTION VALUE="IE.html">IE4x and  Active Desktop
<OPTION VALUE="MostUsed.html#How to Register">How to  Register DLL, Ole, Oxb, Vxd and misc other files
<OPTION VALUE="95-Files.html">Windows95 Directory and Alphabetical File Listing
</SELECT>

<SCRIPT LANGUAGE="JavaScript">
<!--
function leapto(selectbox) {
       window.location=selectbox.options[selectbox.selectedIndex].value;
}
//-->
</script>

</FORM>
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Thanks sybe, I'll rename the .htmls and targets.
I appologize to all for my example in my question. it was just an example. Right now I'm only working with the below:
-----------All in Reg-tips.html
<FORM><SELECT NAME="list" onChange="leapto(this)">
<OPTION VALUE="Reg-Tips.html">Menu
<OPTION VALUE="Reg-Tips.html#Rebuild Your Registry">Rebuild
Your Registry&nbsp;
<OPTION VALUE="Reg-Tips.html#Icon Troubles">Icon Troubles&nbsp;
<OPTION VALUE="Reg-Tips.html#Icon Troubles 2">Icon
Troubles 2&nbsp;
<OPTION VALUE="Reg-Tips.html#Change the Registered User Information">Change
the Registered User Information&nbsp;
<OPTION VALUE="Reg-Tips.html#Removing Sound Events">Removing
Sound Events&nbsp;
<OPTION VALUE="Reg-Tips.html#Backing Up the Registry">Backing
Up the Registry&nbsp;
</SELECT><SCRIPT LANGUAGE="JavaScript">
<!--
function leapto(selectbox) {
window.location=selectbox.options[selectbox.selectedIndex].value;
}
//-->
</SCRIPT>
</FORM>

I'll try yours sybe.

Bud
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
massieM,
I'll try this,
Does it include centering and font size and color as is on that REG-TIPS.HTML now??

Thanks,
Bud
0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
Bud,
You can use this to get the centered text, color, and font size:
<OPTION STYLE="font-size: 14pt; color: red; text-align:center;">Your Stuff Here</OPTION>

That will give you the color and font changes using CSS...
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
So I would have to define the above
You can use this to get the centered text, color, and font size:
      <OPTION STYLE="font-size: 14pt; color: red; text-align:center;">Your Stuff Here</OPTION>

in every OPTION LINE???

bUD
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
massey,
I keep getting
JavaScript Error: file:/C|/bud/Reg-Tips.html, line 31:

missing ; before statement.

Icon Troubles
...^
----------------
Here's what I have now plus two of the links to targets that I want to replace with the dropdown.
======================
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (Win95; I) [Netscape]">
   <META NAME="Author" CONTENT="Bud Allen">
   <TITLE>Bud's Win95 Win98 Tips and Troubleshooter</TITLE>
<STYLE>
 BODY {font-size: 11pt; font-face: "Arial";margin-left: 10px;margin-right: 5px}
  H1 {font-size: 12pt; font-face: "Arial","Helvetica"; color: navy; font-weight: bold; }
  H2 {font-size: 14pt; font-face: "Times Roman"; color: black; font-weight: bold; }
   A:link {font-size: 11pt; font-face: "Arial","Helvetica"; color: blue; font-weight: bold; text-decoration: none}
  A:visited {font-size: 11pt; font-face: "Arial","Helvetica"; color: navy; font-weight: bold; text-decoration: none}
</STYLE>
</HEAD>
<BODY BACKGROUND="pix/back2.jpg" NOSAVE>
<!--#geoguide-->
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="99%" BGCOLOR="#FFFFFF" BACKGROUND="pix/table1.jpg" NOSAVE >
<TR>
<TD BGCOLOR="#FFFFFF" NOSAVE><IMG SRC="pix/logo2.jpg" NOSAVE HEIGHT=86 WIDTH=134 ALIGN=ABSCENTER><B><FONT SIZE=+2>&nbsp;<A NAME="top"></A>Registry
Hacks and Assorted Tips</FONT></B></TD>
</TR>
</TABLE>
<FORM name="SharedForm" METHOD=POST ACTION="redir.html" TARGET="_top">
    <SELECT SIZE=1 class="shared" NAME="GoOnCommand" ONCHANGE="GoHere(this);" language="JavaScript">
    <OPTION VALUE="Reg-Tips.html#Rebuild Your Registry">Rebuild
Your Registry</OPTION>
    <OPTION VALUE="Reg-Tips.html#Icon Troubles">Icon Troubles</OPTION>
</FORM>
    </SELECT>

    <SCRIPT language="JavaScript">
    <!--
    function GoHere(s)
    {
    var d = s.options[s.selectedIndex].value;
    window.top.location.href = d;
    s.selectedIndex=0;
    }
    //-->
    </SCRIPT>

&nbsp;
<CENTER><B><FONT COLOR="#FFFFCC"><FONT SIZE=+1><A HREF="#Rebuild Your Registry">Rebuild
Your Registry</A></FONT></FONT></B></CENTER>

<CENTER><B><FONT COLOR="#FFFFCC"><FONT SIZE=+1>&nbsp; <A HREF="#Icon Troubles">Icon
Troubles</A></FONT></FONT></B></CENTER>

Bud
0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
sybe,
You originally answered my question.
massey won't follow up so if you sybe will answer i'll grade this and get it off the books. I think massey is hoping for an auto-grade.

Where I hang out at the 95
http://www.experts-exchange.com/topics/comp/os-ms-windows/general/win95/

http://www.experts-exchange.com/topics/comp/os-ms-windows/setup/windows95/

http://www.experts-exchange.com/topics/comp/os-ms-windows/general/win98/

I always try to follow thru with questioners to the end.

Regards
Bud
http://www.geocities.com/~budallen/
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 500 total points
Comment Utility
Hey, sorry... I just have never received any email saying that this question changed... Here is the code that I would use...
0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
1) I replaced your spaces in the links with _'s...
2) added the OPTION CSS to the STYLE tag (Change background to what ever color you want your background to be in the box...)
3) There is no way to center the items in the select box...
4) tested this on IE4.x  All OK
5) tested in NS4.x // No background color nor text color in box.
6) Links work in both just great...

<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (Win95; I) [Netscape]">
   <META NAME="Author" CONTENT="Bud Allen">
   <TITLE>Bud's Win95 Win98 Tips and Troubleshooter</TITLE>
<STYLE>
  BODY {font-size: 11pt; font-face: "Arial";margin-left: 10px;margin-right: 5px}
  H1 {font-size: 12pt; font-face: "Arial","Helvetica"; color: navy; font-weight: bold; }
  H2 {font-size: 14pt; font-face: "Times Roman"; color: black; font-weight: bold; }
  A:link {font-size: 11pt; font-face: "Arial","Helvetica"; color: blue; font-weight: bold; text-decoration: none}
  A:visited {font-size: 11pt; font-face: "Arial","Helvetica"; color: navy; font-weight: bold; text-decoration: none}
  OPTION {font-size: 11pt; text-align:center; color: #FFFFCC; background:black;}
</STYLE>
</HEAD>
<BODY BACKGROUND="pix/back2.jpg" NOSAVE>

<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="99%" BGCOLOR="#FFFFFF" BACKGROUND="pix/table1.jpg" NOSAVE >
<TR>
<TD BGCOLOR="#FFFFFF" NOSAVE><IMG SRC="pix/logo2.jpg" NOSAVE  HEIGHT=86 WIDTH=134 ALIGN=ABSCENTER><B><FONT SIZE=+2> <A NAME="top"></A>Registry
Hacks and Assorted Tips</FONT></B></TD>
</TR>
</TABLE>

<FORM name="SharedForm" METHOD=POST ACTION="redir.html" TARGET="_top">
    <SELECT SIZE=1 class="shared" NAME="GoOnCommand" ONCHANGE="GoHere(this);">
    <OPTION VALUE="Reg-Tips.html#Rebuild_Your_Registry">Rebuild Your Registry</OPTION>
    <OPTION VALUE="Reg-Tips.html#Icon_Troubles">Icon Troubles</OPTION>
    </SELECT>
</FORM>

    <SCRIPT language="JavaScript">
    <!--
    function GoHere(s)
    {
    var d = s.options[s.selectedIndex].value;
    window.top.location.href = d;
    s.selectedIndex=0;
    }
    //-->
    </SCRIPT>



0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
massey,
Why the "#Rebuild_Your_Registry". _ 's. The targets don't have them.
I copied your above script and For whatever reason it's not working on my 'Netscape Communicator 4.04???

Is there another method? Or does this need refined more??

Regards
Bud
http://www.geocities.com/~budallen/

0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
massey,
When I said it's not working, I mean it's not jumping to the target.

Regards
Bud
http://www.geocities.com/~budallen/
0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
You will need to change the targets to have the _'s in them... For some reason, the script doesn't like to deal with the spaces...

<FORM name="SharedForm" METHOD=POST ACTION="redir.html" TARGET="_top">
    <SELECT SIZE=1 class="shared" NAME="GoOnCommand" ONCHANGE="GoHere(this);">
      <OPTION></OPTION>
    <OPTION VALUE="#Rebuild_Your_Registry">Rebuild Your Registry</OPTION>
    <OPTION VALUE="#Icon_Troubles">IconTroubles</OPTION>
    </SELECT>
</FORM>

Again, I tested in NS & IE 4.x browsers.. worked fine for me (Before, I had assumed that the links were on different pages... Now I noticed that they are on the same page... The above text has been changed a little to reflect that... Sorry for the confusion....)


0
 
LVL 14

Author Comment

by:smeebud
Comment Utility
Alright::::::::::::)))))))))))))))))

It'lives.
massey, I'll go ahead and grade you. One thing though, rather than it just jumping to the target, it's going there, but breaking the frame and opening a full screen.
Why is that??

I have learned a lot in this thread.
thanks all

Bud
0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
rather than using window.top.location.href, use window.<framename>.location.href=  this will open it in the correct frame... I am sory once again.. I was testing it onmy local machine without the frames... Sorry...

Sybe, I owe you some points... Where do you want me to post them?
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
MassyeM,

If you want to give me some points, then go ahead, I would be glad.

I was on a vacation, so I could not finish answering.

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now