Jump to content


Photo

Select


  • Faça o login para participar
5 replies to this topic

#1 lifeofgames

lifeofgames

    Ativo

  • Usuários
  • 325 posts
  • Sexo:Masculino
  • Localidade:Minas Gerais

Posted 30/01/2006, 16:24

Estou utilizando o seguinte codigo.

<FORM name="guideform">
<SELECT name="guidelinks" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value" target="loja">
<OPTION SELECTED value="pagina1.htm">--Página 1--
<OPTION value="pagina2.htm">Página 2


Gostaria que a pagina abrisse dentro de um iframe como fazer?

Edição feita por: lifeofgames, 30/01/2006, 16:25.

Aprendendo a Amar - O Encanto é aqui!
www.aprendendoaamar.com

#2 x-games

x-games

    Upgrade

  • Usuários
  • 1228 posts
  • Sexo:Não informado
  • Localidade:São Paulo
  • Interesses:Informática, internet, games, musicas, filmes, esportes, sexo

Posted 31/01/2006, 09:04

Tente fazer isso:

<html>
<head>
<title>Select</title>

<script LANGUAGE="JavaScript">
function load1(form) {
    var url = form.Llist_1.options[form.Llist_1.selectedIndex].value;
    if (url != '') parent.loja.location.href=url;
    return false;
}
</SCRIPT>
</head>

<body>

<form name="menuBuilder">
  <select name="Llist_1" onChange="load1(this.form)">
    <option value="" selected>Menu
    <option value="pagina1.htm">pagina1
    <option value="pagina2.htm">pagina2
  </select>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><iframe name="loja" frameborder="1" scrolling="auto" src="pagina1.htm"></iframe></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>


Basta vc criar 2 paginas pagina1.htm e pagina2.htm, esse codigo acima é a index.htm , no iframe so fiz o exemplo pra representar. (y)
A vida é dura pra quem é mole

#3 lifeofgames

lifeofgames

    Ativo

  • Usuários
  • 325 posts
  • Sexo:Masculino
  • Localidade:Minas Gerais

Posted 31/01/2006, 15:43

vlw, certim
Aprendendo a Amar - O Encanto é aqui!
www.aprendendoaamar.com

#4 x-games

x-games

    Upgrade

  • Usuários
  • 1228 posts
  • Sexo:Não informado
  • Localidade:São Paulo
  • Interesses:Informática, internet, games, musicas, filmes, esportes, sexo

Posted 31/01/2006, 16:13

(y)
A vida é dura pra quem é mole

#5 rondeico

rondeico

    Novato no fórum

  • Usuários
  • 8 posts
  • Sexo:Não informado

Posted 01/02/2006, 04:34

Isto funciona e já testei:
Observe que: a IFRAME tem como id="iframe_1" e no evento onChange() da Select tem como _target = "iframe_1".
Para testar, crie 3 páginas: estoque.htm vendas.html comercial.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR...ml4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!--

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

<body>
<form name="form1" method="post" action="">
<select name="select" onChange="MM_jumpMenu('iframe_1',this,0)">
<option value="">&nbsp;</option>
<option value="estoque.htm">Estoque</option>
<option value="vendas.html">Vendas</option>
<option value="comercial.html">Depto Comercial</option>
</select>
</form>

<iframe src="" id="iframe_1">
</iframe>
</body>
</html>

#6 digo

digo

    24 Horas

  • Usuários
  • 435 posts
  • Sexo:Masculino

Posted 26/06/2006, 15:28

mais tem como abrir no iframe.. mais carregar toda a pagina novamente?




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq