Looking into the syntax, it executes the Element.update method on the
container, as your container exists within the IFRAME, I'm assuming it
doesn't have these extended methods.

You could take two approaches from here.

Extend the element before sending Ajax.Updater the reference

or

Use Ajax.Request and stuff your responseText into the object you're
hoping to update.

Ajax.Request(url, { onSuccess : function(xhr){ $
("myFrame").contentDocument.getElementById("target").innerHTML =
xhr.responseText } ... });


p.s. Always attach an onException handler for debugging purposes, this
probably could have given you a clue sooner.



On Nov 18, 11:47 am, "Ron Newman" <[EMAIL PROTECTED]> wrote:
> Yep, tried that.  I was trying to be SUBTLE by mentioning that it wanted a
> string as the first argument, but that's what I meant, that I tried
> assigning a var and then passing that.  Seems it should work but it didn't.
>
> On Tue, Nov 18, 2008 at 10:11 AM, Matt Foster <[EMAIL PROTECTED]>wrote:
>
>
>
> > >   new parent.Ajax.Updater('target', './refresh.php5, { method:
>
> > You're sending a string, try using a direct object reference...
>
> > var ele = window.document.getElementById('target');
> > ele.innerHTML = "Loading...";
> > new parent.Ajax.Updater(ele, './refresh.php5, ...
>
> > On Nov 17, 4:37 pm, ronman <[EMAIL PROTECTED]> wrote:
> > > I've seen postings similar to my problem, but they didn't answer my
> > > question.
>
> > > Within an iframe, I've defined a <div id='target></div>
>
> > > Within the same iframe, I have some javascript:
> > > <script>
> > > function ajaxrefresh() {
> > >   window.document.getElementById('target').innerHTML='...Loading';
> > >   new parent.Ajax.Updater('target', './refresh.php5, { method:
> > > 'get'});}
>
> > > </script>
>
> > > The getElementById() finds the target div OK.
>
> > > But Ajax.Updater doesn't.  Since prototype is loaded by the parent
> > > window, and I don't want to load the whole thing again just for a
> > > little iframe, I have to go to the parent window, but Ajax can't find
> > > its way back.
>
> > > I tried setting a var to the location:
> > > var target=window.document.getElementById('target');
>
> > > Then saying Ajax.Updater(target, ...)
> > > But Updater wants a string for the first argument.
>
> > > Bottom line:  how do you make Updater find something inside an iframe?
>
> > > Thanks in advance,
> > > Ron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to