collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 197
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 am
  • emanuele: [link]
    November 01, 2016, 12:43:50 pm
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 pm
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 am
  • [DFg]DJF-1975: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 am
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 pm
  • phantomm: and from what I see only patch is broken, full install package is fine
    October 21, 2016, 03:44:44 pm
  • phantomm: they say it for over 3 weeks now..
    October 21, 2016, 03:43:52 pm
  • aegersz: SMF say that bug fix 2.0.13 is coming soon ...
    October 19, 2016, 06:46:12 pm
  • Chen Zhen: check that thread at a later date as that file is not a final fix
    October 10, 2016, 03:09:18 pm
  • [DFg]DJF-1975: Thanks for the shoutbox fix file!
    October 10, 2016, 09:17:19 am
  • * Burke Knight Lurks
    October 02, 2016, 09:17:45 pm
  • [DFg]DJF-1975: Not to shoutbox spam, but I use this portal daily and I wanted to say thank you. It's been too long since I last thanked you all!
    October 02, 2016, 11:52:06 am
  • [DFg]DJF-1975: Is this project or for that matter anyone here still active?
    October 02, 2016, 11:48:04 am
  • ♦ Ninja ZX-10RR ♦: Hey :)
    September 30, 2016, 11:34:37 pm
  • aegersz: Hello SimplePortal people !
    September 30, 2016, 05:10:53 am
  • Jade Elizabeth: It's GREAT to see you too Sinan!! :D
    July 06, 2016, 02:33:26 am
  • [SiNaN]: Hey Jade! It's great to see you around! Jade!
    July 03, 2016, 06:51:31 am
  • Jade Elizabeth: Oops, sorry I mean HEY SINAN! ;)
    July 01, 2016, 11:07:13 am

* Recent Posts

Re: Get only the articles in rss by gcifuentes95
[Yesterday at 10:16:35 pm]


Re: Shoutbox Problem After SMF Minor Upgrade by newtoallthis
[Yesterday at 04:11:39 am]


Re: Get only the articles in rss by emanuele
[December 08, 2016, 08:46:29 am]


Re: SP articles more functions by emanuele
[December 08, 2016, 08:45:23 am]


Get only the articles in rss by gcifuentes95
[December 07, 2016, 08:00:00 pm]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Javascript no funciona en Pagina  (Read 2407 times)

0 Members and 1 Guest are viewing this topic.

Offline angelverde

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Javascript no funciona en Pagina
« on: August 03, 2010, 06:24:31 am »
Esta en uso SMF 1.1.11 con Simple Portal 2.3.2, el link del sitio es este

Me tomo horas para que un JavaScript me funcionara, lo estuve probando en esta pagina para probar modificaciones, cuando todo estuvo correcto fui al panel de Simple Portal y cree una nueva página tipo HTML, el problema esta en que el JS no funciona en ella.

Probe meter el JS antes de </head> y tampoco funciona, el link de la pagina creada es este si prueban los botones no verán algún cambio, cuando deberian cambiar los iframes.

El código de la página es este:
Code: [Select]
<a href="http://www.forosbuap.mx/chat/index.php" target="popup" onclick="window.open(this.href, 'chat', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=760px,height=550px');this.blur();return false;"><b>Ver el Chat en Ventana nueva</b></a>
<br />
<p>
<b>Disfruta de nuestra Programación</b>
<div class="smalltext">Prueba las estaciones de Grupo Acir, de Radio BUAP o películas en Streaming.<br /> Solo diviertete, aunque también puedes cerrar todo, da clic en el botón que más te guste:</div>

<script language="JavaScript" type="text/javascript">
<!--
function crearFrame(val, anc, alt) {
    var testFrame = document.createElement("IFRAME");
    testFrame.id = "contenidos";
    testFrame.src = val;
    testFrame.width = anc;
    testFrame.height = alt;
    testFrame.frameborder = "0";
    testFrame.scrolling = "no";
    var control = document.getElementById(testFrame.id)
    document.body.removeChild(control);
    document.body.appendChild(testFrame);

//-->
</script>
<form>
<input type="button" value="Silencio" onclick="crearFrame('nada.html', '1', '1')"/>
<input type="button" value="Grupo Acir" onclick="crearFrame('http://www.grupoacir.com.mx/multimedia/audio/radio/flash/mixquer.php', '500', '400')"/>
<input type="button" value="Radio BUAP" onclick="crearFrame('http://www.enciendetv.buap.mx/paginas/2510.asp?canal=1', '550', '400')"/>
</form>
</p>
<br />
<iframe  id="contenidos"
   frameborder="0"
   width="500"
   scrolling="no"
   height="400"
   src="http://www.grupoacir.com.mx/multimedia/audio/radio/flash/mixquer.php">
</iframe>

Cualquier sugerencia es bienvenida.
« Last Edit: August 03, 2010, 03:08:25 pm by angelverde »

Offline angelverde

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: Javascript no funciona en Pagina
« Reply #1 on: August 03, 2010, 06:48:21 am »
 :( :'(
Creo que mi JavaScript no funciona dentro de un <div> y por ahora ya estoy agotado para investigar, ojala me pudieran orientar un poco  :|

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Javascript no funciona en Pagina
« Reply #2 on: August 03, 2010, 11:11:46 am »
tu codigo está mal, revisalo, asegurate e que llame a el iframe correcto o en su caso que apunte a el frame correspondiente.

Offline angelverde

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: Javascript no funciona en Pagina
« Reply #3 on: August 03, 2010, 03:04:12 pm »
Revise que llame al iframe correcto y lo hace, solo que soy nuevo en JS y no se porque no funciona cuando esta dentro de un div.

Me pondre a estudiar/investigar si sabes algo por favor no dudes en comentarlo.

Offline angelverde

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: Javascript no funciona en Pagina
« Reply #4 on: August 03, 2010, 05:35:11 pm »
Lo solucione metiendo el iframe en un div y luego usando este JS

Code: [Select]
<script language="JavaScript" type="text/javascript">
<!--
function crearFrame(url, anch, alt) {

  document.getElementById ("miDiv").innerHTML = "<iframe frameborder=0 scrolling=no width=" + anch + " height=" + alt + " src=" + url + "></iframe>";
  }
//-->
</script>

Vaya solucion que encontre :P