collapse

* User Info

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

* Who's Online

  • Dot Guests: 54
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • BurkeKnight: [SiNaN] old friend. Great Job. I can't wait to see what you add next. :)
    October 13, 2014, 04:13:53 PM
  • [SiNaN]: Thank you everyone, for the kind words and support. For those who are interested, check out our Donators Program: [link]
    October 13, 2014, 11:57:44 AM
  • {OCS}MasterSeal: Glad to be here, glad to use your amazing portal THank you!
    October 13, 2014, 11:33:35 AM
  • Mike Vail: I'd like to donate to you for all your wonderful work. Do you guys have a place on your site to do that? THANKS FOR EVERYTHING!
    October 13, 2014, 11:12:16 AM
  • Mstcool: Yay, an update! :D
    October 12, 2014, 01:39:17 AM
  • stanyy: You're right. I have no idea how I got to the "Archived" index. It looks too similar.
    October 03, 2014, 11:38:32 AM
  • [SiNaN]: SimplePortal 2.3.5 package is listed in Stable SimplePortal Packages category in Downloads area.
    October 03, 2014, 06:08:01 AM
  • stanyy: SP 2.3.5 is not available in the downloads section?? The big download link on the homepage points newcomers to the downloads section who then download 2.3.4. Not good.
    October 03, 2014, 03:54:21 AM
  • Mulwa: if simpleportal team could make some of the blocks like articles to display photos just like how ebay does, it would be very great for shopping
    September 27, 2014, 08:24:14 AM
  • Mulwa: everybody is busy, no help for us this time
    September 26, 2014, 05:00:07 PM
  • [SiNaN]: That shows how simple but powerful SimplePortal is!
    September 26, 2014, 06:56:41 AM
  • oNLy1: thought the 'Blocks In Blocks' was going to be complicated - easy peasy - and was exactly what my site needed - ty
    September 20, 2014, 01:13:44 PM
  • P flex: Xup guys
    September 18, 2014, 08:29:06 AM
  • P flex: Xup
    September 18, 2014, 08:28:38 AM
  • Mstcool: :p *
    September 13, 2014, 07:55:49 PM
  • Mstcool: so when is a new version coming out? :o
    September 13, 2014, 07:55:45 PM
  • USFA: sorry thought was search no glasses
    September 06, 2014, 08:48:23 PM
  • USFA: rename forum
    September 06, 2014, 08:47:40 PM
  • Mstcool: Oh, ok, Sinan
    August 25, 2014, 10:19:15 PM
  • Arsen: When i make them
    August 19, 2014, 12:20:20 AM

* Recent Posts

Re: Shoutbox refresh and page reload discrepancy by i8088
[Yesterday at 04:44:24 PM]


Staff list - Sort by rank by ThatCrazyGuy
[October 22, 2014, 04:16:44 PM]


Re: SimplePortal 2.3.6 Released! by andy
[October 22, 2014, 08:35:00 AM]


Re: Blok İçinde Bloklar Oluşturmak by mkuru
[October 22, 2014, 04:27:32 AM]


Re: SimplePortal 2.3.6 Released! by candidosa2
[October 22, 2014, 01:18:20 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Javascript no funciona en Pagina  (Read 1973 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, 04: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, 01: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, 04: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: 1777
  • 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, 09: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, 01: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, 03: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