Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/05/2013, 04:26
Avatar de arcanisgk122
arcanisgk122
 
Fecha de Ingreso: junio-2010
Mensajes: 755
Antigüedad: 14 años, 8 meses
Puntos: 28
Respuesta: Ocultar y Mostrar Iframe

a ver te explico primero:
llamas al JS que tienes preparado para el script:
Código HTML:
Ver original
  1. <script src="js/execute.js"></script>
luego de esto programamos el script:
Creamos una funcion:
Código Javascript:
Ver original
  1. function mostrardiv1() {
  2.         div = document.getElementById('content_iframe');
  3.         div.style.display ='';
  4.     }
luego creamos un div que contenga el iframe(OJO DEBE TENER style="display:none" por defecto)
Código HTML:
Ver original
  1. <div id="content_iframe" style="display:none">Aqui tu iframe</div>
haaaaaaa y el boton para hacer que aparesca:

Código HTML:
Ver original
  1. <input onClick="javascript:mostrardiv1();" type="button" name="button" id="button" value="Aparece Webon">

si quieres hacer que desaparesca puedes poner otro boton que haga esto:

Código Javascript:
Ver original
  1. div.style.display ='none';
a mi me funciona en mi web: http://icarosnet.webege.com/ cuando le picas a registrar
__________________
Cooler Master Gladiator 600 - AMD PHENOM II X4 955 @ 3.5GHZ
GA-MA78GM-US2H - Super Talent 800 2GB x 2 Dual, (Unganged)
PSU Cooler Master eXtreme Power Plus 500W - Saphire R7-260OC-2GB