Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6017523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:08:26+00:00 2026-05-23T03:08:26+00:00

I have an RSS feed being pulled through XSLT on an .xsl file. I

  • 0

I have an RSS feed being pulled through XSLT on an .xsl file. I have a “Show” Link that when clicked displays a hidden DIV with an Iframe that has the source of the unique RSS Item’s full page.

The issue is since this DIV is hidden it actually loads all the iframe’s source pages when the page is first viewed and boggs down the loading time considerably.

What i want to do is only have the iframe load the source after the “Show” button is clicked. How can i invoke this with an XSLT If Statement?

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="urn:my-extension-lib:date">
<xsl:template match="/">
    <xsl:for-each select="rss/channel/item">            
        <div style="margin-bottom: 30px;">
            <div style="margin: 5px;">
                <div style="font-weight: bold;">                        
                    <a href="{link}" target="_blank" style="font-size: 10pt;">
                        <xsl:value-of select="title" />
                    </a>
                </div> 
                <div>
                    <xsl:value-of select="user:GetFormattedDate(pubDate,'MMM d, yyyy hh:mm tt')" />
                </div>
            </div>
            <div style="padding-left:30px">
                <a href="javascript:test('{guid}', '{link}');" id="{link}">Show</a>
            </div>
            <div style="margin: 20px 20px 20px 40px;display:none" id="{guid}">
                <iframe width="685" height="400" scrolling="yes" frameborder="yes" src="{link}"></iframe>
            </div>
        </div>
    </xsl:for-each>
</xsl:template>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:08:27+00:00Added an answer on May 23, 2026 at 3:08 am

    What I think you need to do is initially load a ‘blank’ page for each IFRAME. For example, a page called blank.htm, that is empty. Also, you may want to give each IFRAME an ID tag, so you can easily access it with Javascript to change the source

    <iframe id="iframe{guid}" width="685" height="400" scrolling="yes" frameborder="yes" src="blank.htm"/>
    

    Then, you can code your javascript like so, to show the DIV, and change the source of the IFRAME to the correct page.

    function test(id, link)
    {
       document.getElementById(id).style.display = 'block';
       document.getElementById("iframe" + id).src = link;
    }
    

    Here’s an example of the whole stylesheet for you

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:template match="/">
          <html>
             <head>
                <title>Test</title>
                <script> 
                function test(id, link) 
                { 
                   document.getElementById(id).style.display = 'block'; 
                   document.getElementById("iframe" + id).src = link; 
                } 
                </script>
             </head>
             <body>
                <xsl:for-each select="rss/channel/item">
                   <div style="margin-bottom: 30px;">
                      <div style="margin: 5px;">
                         <div style="font-weight: bold;">
                            <a href="{link}" target="_blank" style="font-size: 10pt;">
                               <xsl:value-of select="title"/>
                            </a>
                         </div>
                         <div>
                            <xsl:value-of select="pubDate"/>
                         </div>
                      </div>
                      <div style="padding-left:30px">
                         <a href="javascript:test('{guid}', '{link}');" id="{link}">Show</a>
                      </div>
                      <div style="margin: 20px 20px 20px 40px;display:none" id="{guid}">
                         <iframe id="iframe{guid}" width="685" height="400" scrolling="yes" frameborder="yes" src="blank.htm"/>
                      </div>
                   </div>
                </xsl:for-each>
             </body>
          </html>
       </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTML structure that is being pulled from an RSS feed, and
I have two websites that declare an RSS feed, like so: <link rel=alternate type=application/rss+xml
I have a YouTube RSS feed set up to show YouTube videos in a
I have a dynamically generated rss feed that is about 150M in size (don't
I have this script to generate an XML file for an RSS feed. Works
I have a WCF service that uses a System.ServiceModel.Syndication.SyndicationFeed to create an RSS feed.
So I have RSS feed of 10 000 records in file.xml (I collected them
I have the following data being generated from a google spreadsheet rss feed. いきます,go,5
i have this rss feed to parse that contains several tags. i am able
I have RSS feed link, but I need to obtain date from it. Then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.