Is this possible?
Karl..
Best regards
Peter De Berdt
> 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 / com
www.crowdersoftware.com
It must be a post to the server, not a get.
On Feb 8, 4:22 pm, "T.J. Crowder" <t...@crowdersoftware.com> 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 conceptshould be transferrable.
> 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 / com
www.crowdersoftware.com
-- T.J. :-)
On Feb 9, 3:05 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
>