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