prototype and iframe

0 views
Skip to first unread message

Miguel Beltran R.

unread,
Oct 10, 2008, 1:17:53 PM10/10/08
to prototype-s...@googlegroups.com
Hi list

I have the next code but not work, iframe show nothing
what I doing wrong?

<html>
...
<body>
<div id="content">
   <div id="form_search">
      <form target="iframe_show">...</form>
   </div>
   <div id="show">
      <iframe id="iframe_show" name="iframe_show"></iframe>
   </div>
</div>
<script>
var muestra = function(m_id, m_modulo, m_modo){
    var element =  $(m_id);
    element.update('cargando...');
    new Ajax.Updater(element,
             'muestra.html', {
             method: 'get',
             parameters: {modulo:m_modulo, modo:m_modo}
             });
  }
document.observe('dom:loaded', function(){
   muestra('iframe_show', 'taller_busca', 'nada');
}
</script>
</body>
</html>




--
________________________________________
Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida

Matt Foster

unread,
Oct 10, 2008, 1:28:33 PM10/10/08
to Prototype & script.aculo.us
Ditch the iframe object in favor of a DIV and things will work much
smoother..

Diodeus

unread,
Oct 10, 2008, 3:09:39 PM10/10/08
to Prototype & script.aculo.us
You don't use AJAX to put content into an Iframe. An Iframe is a new
separate document.

Use:

$("iframe_show).src="http://...."

Miguel Beltran R.

unread,
Oct 14, 2008, 3:53:57 PM10/14/08
to prototype-s...@googlegroups.com
Thanks to all.

I wanted to use the IFRAME to display the data of a query. But this display two scrollbars and they are ugly. as say Matt, I'm going to change for a DIV

2008/10/10 Diodeus <dio...@gmail.com>
Reply all
Reply to author
Forward
0 new messages