Well thanks for the help on posting a request to the iframe to handle
the PDF. Here is my bigger problem and the reason for my original
thought: how do you trigger code on completion of the PDF load in the
iframe? Of course the original thought was to make an ajax request and
and write the results to the iframe. You then know when therequest is
complete and I'm sure writing to the iframe is fast enough. Is this
possible? Can I get back a binary result from an Ajax request and can
I binary write to the iframe?
Thanks
 Karl..

On Feb 9, 8:06 am, "T.J. Crowder" <[email protected]> wrote:
> Blast (I *hate* double posting), forgot to say: By "theIFrameName" in
> that code I mean literally the value of a `name` attribute on the
> `iframe` tag (*name*, not *id*).
>
> -- T.J. :-)
>
> On Feb 9, 3:05 pm, "T.J. Crowder" <[email protected]> wrote:
>
>
>
> > Hi,
>
> > > It must be a post to the server, not a get.
>
> > Okay, that's a *few* more lines of code:
>
> >     var markup, form;
>
> >     markup =
> >         "<form id='___unique_form_id___' " +
> >             "method='POST' " +
> >             "action='yoururl' " +
> >             "target='theIFrameName' " +
> >             "style='display: none'>" +
> >         "<input type='hidden' name='param1' value='value1'>" +
> >         "<input type='hidden' name='param2' value='value2'>" +
> >         "</form>";
> >     $(document.body).insert({bottom: markup});
> >     form = $('___unique_form_id___');
> >     form.submit();
> >     form.remove();
>
> > Quick test on IE7, FF3.6, and Chrome4 all seemed happy. (I wondered if
> > I might need a defer in there, but apparently not.)
>
> > HTH,
> > --
> > T.J. Crowder
> > Independent Software Consultant
> > tj / crowder software / comwww.crowdersoftware.com
>
> > On Feb 9, 12:03 am, kstubs <[email protected]> wrote:
>
> > > It must be a post to the server, not a get.
>
> > > On Feb 8, 4:22 pm, "T.J. Crowder" <[email protected]> wrote:
>
> > > > Hi,
>
> > > > > Is this possible?
>
> > > > Possible? It's downright easy:
>
> > > >     $('idOfIFrame').src = "pathToYourServerScript.xyz";
>
> > > > Very important that your server script set the correct content type,
> > > > of course.
>
> > > > I use something similar with a frame (not an iframe), but the concept
> > > > should be transferrable.
>
> > > > HTH,
> > > > --
> > > > T.J. Crowder
> > > > Independent Software Consultant
> > > > tj / crowder software / comwww.crowdersoftware.com
>
> > > > On Feb 8, 10:34 pm, kstubs <[email protected]> wrote:
>
> > > > > I'm fetching (with Ajax call) a dynamic PDF from the server and would
> > > > > like the results to load  into an Iframe (or other html embeded/
> > > > > object).
>
> > > > > Is this possible?
>
> > > > > Karl..

-- 
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 [email protected].
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