Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 17th, 2003, 05:13 PM
Authorized User
Join Date: Jun 2003
Location: , , .
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"/>

<IFRAME class="viewer" name="viewframe" src="instructions.html" />
Reply With Quote
  #2 (permalink)  
Old September 18th, 2003, 01:25 AM
Authorized User
Join Date: Jul 2003
Location: Athens, , Greece.
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts

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">

Kostas Lagos

Reply With Quote
  #3 (permalink)  
Old September 18th, 2003, 10:57 AM
Authorized User
Join Date: Jun 2003
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts

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
    End If

Thanks again for your help.

Reply With Quote
  #4 (permalink)  
Old November 11th, 2003, 08:50 PM
Authorized User
Join Date: Jun 2003
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts

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?
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 04:55 AM.

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