Welcome to WebmasterWorld Guest from 107.23.176.162

Forum Moderators: ocean10000

Message Too Old, No Replies

IFRAME - External Site

     
11:33 am on Jun 25, 2010 (gmt 0)

New User

5+ Year Member

joined:June 12, 2009
posts: 28
votes: 0


Hi...i've got an asp.net page that is posting to an asp site..ok so far.. my prob is i want the returned page to sit in an iframe..i can get it in a target = _blank but not in the iframe...any ideas...

thanks
11:49 am on June 25, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


You can set target to the name of your Frame, ie:
target="iFrameName"


<frame name="iFrameName" src="/MayTargetPage.html">
11:56 am on June 25, 2010 (gmt 0)

New User

5+ Year Member

joined:June 12, 2009
posts: 28
votes: 0


Hi Marcel i've tried that with the form in the javascript that posts the page

document.frmMain.setAttribute("target", "frame1");

I can't put it directly into the frame src as i need to post to it...unless you know different...is it poss to do this...
12:18 pm on June 25, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


Have you tried setting the Form target in page behind?

form1.Target = "frame1"
12:32 pm on June 25, 2010 (gmt 0)

New User

5+ Year Member

joined:June 12, 2009
posts: 28
votes: 0


can't do that marcel as the form is being created within xslt and submited with javascript...I just tried putting it in the form tag like below but didn't work...i still get the popup and if i view source i've got a thread aborted message...

<xsl:template match="test">
<!--Start of Javascript -->
<script language="JavaScript" type="text/javascript">
<![CDATA[
function submitform() {
document.frmMain.setAttribute("target", "frame1");
document.frmMain.submit();

}
]]>
</script>
<!-- End of Javascript -->

<html>
<body onload="submitform()" style='display:none'>
<form id="frmMain" name="frmMain" target="frame1" action="http://www.test.asp" method="POST">
<input type="text">
<xsl:attribute name="id">criteria</xsl:attribute>
<xsl:attribute name="name">test</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="//test" />
</xsl:attribute>
</input>

</form>
</body>
</html>
</xsl:template>
12:34 pm on June 25, 2010 (gmt 0)

New User

5+ Year Member

joined:June 12, 2009
posts:28
votes: 0


the <xsl:attribute name="id">criteria</xsl:attribute> should be <xsl:attribute name="id">test</xsl:attribute> sorry my typo
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members