Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2003, 05:13 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP output returned to IFrame

I have a bit of code that calls an ASP file which, among other things, returns the contents of an XML file to an IFrame in my original page. The first time this is launched, all is well. The resulting document shows up perfectly within the IFrame. However, if I click again on a link that executes this process again, the resulting file takes over the whole browser window, rather than staying within the IFrame.

Is this something I can correct?

Below are the relevant lines from the originating .XML page:

<a href="showdoc.asp?filepath={source/@location}&amp;filename={source/@filename}" target="viewframe">
<xsl:value-of select="case"/>
</a>

<IFRAME class="viewer" name="viewframe" src="instructions.html" />
 
Old September 18th, 2003, 01:25 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have to define the target to all your links in order to open the page in the IFrame. The other solution is to place the <base> tag to the head of the page that contains the links, with the target attribute equal to the Iframe name, e.g <base target="viewframe">

Cheers
Kostas Lagos

 
Old September 18th, 2003, 10:57 AM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your reply.

The page containing the links is an XML page, formatted with XSL. The links in question are generated by an <xsl:for-each> loop, so the "target" is specified on each link, as the template does the work.

I added the <base> tag as you mentioned, but it made no difference.

By the way, the showdoc.asp file is feeding a .xml file back to the frame with the snippet below. It was suggested that I use Response.Redirect in place of this subroutine instead, but that only generates the error "Object doesn't support this property or method.":

    Set TS = objFSO.OpenTextFile(strFilename, ForReading, Create)
    If Not TS.AtEndOfStream Then
        Do While Not TS.AtEndOfStream
            strLine = TS.ReadLine
            Response.Write strLine
        Loop
    End If

Thanks again for your help.

Ken
 
Old November 11th, 2003, 08:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Base Target idea didn't work. My eventual solution to this was to use Microsoft's msxsl.exe utility to output the HTML from the xml/xsl files.

The HTML file does not exhibit the problem. Could it be that xml/xsl and internal frames just don't work well together?





Similar Threads
Thread Thread Starter Forum Replies Last Post
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
Firefox - iframe and asp:menu rturner003 ASP.NET 2.0 Professional 0 January 20th, 2007 04:59 AM
the java for iframe opening asp query gilgalbiblewheel Classic ASP Components 0 September 8th, 2004 03:17 PM
SP Returned Output with Error sidneyfuerte Classic ASP Professional 0 September 8th, 2003 02:11 PM
How to get output value to ASP page nikosdra SQL Server ASP 2 July 28th, 2003 03:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.