Jump to content
Fórum Script Brasil
  • 0

Menu De Salto Abre Pop-up


Super Menina
 Share

Question

biggrin.gif Gostaria de saber como faço para que o Menu de Salto abra uma janela Pop-up.

Não consigo configurar o tamanho da janela (400 x 300), nem fazer uma nova janela (blank).

Obrigada! biggrin.gif

O código do Dreamweaver:

function MM_jumpMenu(targ,selObj,restore){ //v3.0

eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

if (restore) selObj.selectedIndex=0;

}

<form name="form1">

<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">

<option value="www.teste.com.br/teste1">Op&ccedil;&atilde;o 1</option>

<option value="www.teste.com.br/teste2">Op&ccedil;&atilde;o 2</option>

</select>

</form>

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Galera,

Acho que tenho uma solução para este problema:

O código da Super menina está quase certo. Só que fiz umas mudanças.

Código inicial

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

<form name="form1">
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="www.teste.com.br/teste1">Opção 1</option>
<option value="www.teste.com.br/teste2">Opção 2</option>
</select>
</form> 

Mudanças:

function MM_jumpMenu(targ,selObj,restore){

link = document.form1.menu1.value;

if (link == 1){

window.open("opcao1.htm','popup','width=500,height=400,top=200,left=200');  void(0);

}

if (link == 2){

window.open("opcao2.htm','popup','width=500,height=400,top=200,left=200');  void(0);

}

}

<form name="form1">

<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">

<option value="1">Opção 1</option>

<option value="2">Opção 2</option>

</select>

</form>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.7k
    • Total Posts
      648.5k
×
×
  • Create New...