Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i refresh when an item is clicked in a jumpmenu? 1

Status
Not open for further replies.

eekthecat

Programmer
Nov 13, 2000
45
US
Hi,

How can i refrsh the page when i select an option from a jumpmenu (or pulldown menu)?
I've made a menu with a line in it (like this -----------). There is no function to the line, so when i click on it (select it) i just want the page to stay put.
When i click (select) the line now i'm going to an error page... I figured i could resolve that problem by refreshing the current page when the line is selected from the jumpmenu (pulldown)
 
Post the script that u r using and the code of the jump menu

regards ::) Unicorn11
abhishek@tripmedia.com

[red]Nothing is permanent in life except Change[red]
 
<script language=&quot;JavaScript&quot;>
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+&quot;.location='&quot;+selObj.options[selObj.selectedIndex].value+&quot;'&quot;);
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body bgcolor=&quot;#000000&quot; text=&quot;#000000&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td rowspan=&quot;2&quot; height=&quot;14&quot; width=&quot;20%&quot; bgcolor=&quot;#000000&quot;>
<form name=&quot;form1&quot;>
<select name=&quot;pulldownmenu 1&quot; onChange=&quot;MM_jumpMenu('parent',this,0)&quot;>
<option selected>Ga naar...</option>
<option>----------------</option>
<option>value=&quot;../home/home_pagina.htm&quot;>Home</option>
<option>----------------</option>
<option>value=&quot;../actueel/actueel_pagina.htm&quot;>Actueel</option>
</select>
</form>
</td>
 
Code:
<body bgcolor=&quot;#000000&quot; text=&quot;#000000&quot;>
                          <table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
                            <tr> 
                              <td rowspan=&quot;2&quot; height=&quot;14&quot; width=&quot;20%&quot; bgcolor=&quot;#000000&quot;> 
                                <form name=&quot;form1&quot;>
                                  <select name=&quot;pulldownmenu 1&quot; onChange=&quot;MM_jumpMenu('parent',this,0)&quot;>
                                    <option selected>Ga naar...</option>
                                    <option>----------------</option>
                                  <option>value=&quot;../home/home_pagina.htm&quot;>Home</option>
                                    <option>----------------</option>
                                    <option>value=&quot;../actueel/actueel_pagina.htm&quot;>Actueel</option>
                                  </select>
                                </form>
                              </td>

here is the right code according to me

Code:
<body bgcolor=&quot;#000000&quot; text=&quot;#000000&quot;>
                          <table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
                            <tr> 
                              <td rowspan=&quot;2&quot; height=&quot;14&quot; width=&quot;20%&quot; bgcolor=&quot;#000000&quot;> 
                                <form name=&quot;form1&quot;>
                                  <select name=&quot;pulldownmenu 1&quot; onChange=&quot;MM_jumpMenu('parent',this,0)&quot;>
                                    <option selected value=&quot;&quot;>Ga naar...</option>
                                    <option value=&quot;&quot;>----------------</option>
                                  <option value=&quot;../home/home_pagina.htm&quot;>Home</option>
                                    <option value=&quot;&quot;>----------------</option>
                                   <option value=&quot;../actueel/actueel_pagina.htm&quot;>Actueel</option>
                                  </select>
                                </form>
                              </td>

Hope this helps
mail me if u have any problems or if it goes fine

regards ::) Unicorn11
abhishek@tripmedia.com

[red]Nothing is permanent in life except Change[red]
 
Hi,

I've tried it but it doesn't work like you said... I'm getting the index of the directory in front of me instead that nothing happens, and that's what i want. When i select an option from the jumpmenu then nothing happens.

Thanx anyway!
 
i have some code written by my self and not dreamweaver that works

here the code

javascript code
Code:
<script language='JavaScript'>

function visit(newURL) {

  if (newURL != &quot;&quot;) {
    location.href=newURL
  }
}

</script>

the jump menu
Code:
                            <select onChange=visit(this.options[selectedIndex].value) name=&quot;select&quot;>
                              <option selected>Jump Menu</option>
                              <option value=&quot;aboutus.htm&quot;>About US</option>
                              <option value=&quot;product.htm&quot;>Boilers & Services </option>
                              <option value=&quot;technology.htm&quot;>Publications</option>
                              <option value=&quot;knowledege.htm&quot;>Employment</option>
                              <option value=&quot;news.htm&quot;>House News</option>
                              <option value=&quot;press.htm&quot;>Press Releases</option>
                              <option value=&quot;#&quot;>Feedback</option>
                            </select>

hope this is better

regards ::) Unicorn11
abhishek@tripmedia.com

[red]Nothing is permanent in life except Change[red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top