* User Info

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

* Who's Online

  • Dot Guests: 185
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • 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
  • Jade Elizabeth: Hey Sinan!! :D
    July 01, 2016, 11:06:59 am
  • [SiNaN]: But you shouldn't wait for a security issue and drop by more often. :D
    June 27, 2016, 04:32:18 pm
  • [SiNaN]: Hey ディン1031! It's great to see you around!
    June 27, 2016, 04:31:56 pm
  • ディン1031: Uh to long ago that i was last time here xD
    June 27, 2016, 02:03:08 pm
  • Schnuffeltier: :D
    June 24, 2016, 05:22:34 am
    June 24, 2016, 12:57:05 am
  • [DFg]DJF-1975: Thank you, SP!
    June 21, 2016, 01:35:09 pm
  • Skhilled: phpBB is a good product but has a steeper learning curve.
    June 21, 2016, 08:19:04 am
  • ♦ Ninja ZX-10RR ♦: Hmm, not so sure about it, Eliana: [link]
    May 05, 2016, 02:03:02 am
  • Eliana Tamerin: That may have faded away now, or gotten better. I hope so. I see a lot of happy phpBB users, so I have to imagine someone is having success.
    April 25, 2016, 12:48:06 am
  • Eliana Tamerin: @andy, the phpBB folks had (at one point, not sure how it is now) a specific set of rules you had to follow to get support. Anyone not found doing so would have their topic ignored.
    April 25, 2016, 12:47:40 am
  • andy: SP team is a breath of fresh air...
    April 24, 2016, 11:24:32 pm
  • andy: Yes they are difficult to deal with at SMF. I never experienced anybody like that at phpbb several years ago.
    April 24, 2016, 11:24:03 pm
  • D.Va: Their team is very antagonistic and I prefer this forum and this staff far more. So kudos to SP for doing it right.
    April 24, 2016, 09:18:21 pm
  • andy: When SMF went gold there was a lot of optimism about progress and talk of 3.0.  Five years on and that soulds like SF.
    April 24, 2016, 08:37:31 pm
  • andy: Just my frustration at the slow pace of SMF. I suppose we have an alternative now.
    April 24, 2016, 08:34:38 pm
  • Burke Knight: Andy, as long as the SMF team keeps like they are doing, there's always going to be bugs, mainly due to SMF issues, because the team can't get their stuff straight.
    April 24, 2016, 08:25:41 pm

* Recent Posts

Re: custom topic link block by D.Va
[Yesterday at 06:10:28 pm]

Re: how can i change my ip by D.Va
[Yesterday at 06:08:49 pm]

Re: Kaynak dosyalarda portal.css dosya yolu by tc bolubeyi
[Yesterday at 04:05:25 pm]

custom topic link block by abula
[Yesterday at 09:16:24 am]

Re: how can i change my ip by emanuele
[Yesterday at 08:18:38 am]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Javascript no funciona en Pagina  (Read 2361 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="" target="popup" onclick=", '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 />
<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"); = "contenidos";
    testFrame.src = val;
    testFrame.width = anc;
    testFrame.height = alt;
    testFrame.frameborder = "0";
    testFrame.scrolling = "no";
    var control = document.getElementById(

<input type="button" value="Silencio" onclick="crearFrame('nada.html', '1', '1')"/>
<input type="button" value="Grupo Acir" onclick="crearFrame('', '500', '400')"/>
<input type="button" value="Radio BUAP" onclick="crearFrame('', '550', '400')"/>
<br />
<iframe  id="contenidos"

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>";

Vaya solucion que encontre :P