Results 1 to 2 of 2

Thread: Contents of an Iframe [RESOLVED]

  1. #1

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Contents of an Iframe [RESOLVED]

    I am trying to use VBScript to get the contents of an IFRAME, but I am having no luck. Can someone point me in the right direction on this, I am just trying to populate a textbox with the HTML generated by the IFRAME, but I am getting an Invalid property error. Here is what I have so far:

    Code:
    <html>
    <head></HEAD>
    <BODY>
    <form name="Test">
    <iframe name="fraTest" src="me.asp" id="fraTest"></iframe>
    	<Input name="txtTest" value="A">
    <script language="VBScript">
    <!-- start of VBscript hide from old browsers
    document.forms(0).txtTest.value = fraTest.innerHTML 
    -->
    </script>
    </Form>
    
    </body>
    </html>
    Last edited by Negative0; May 10th, 2004 at 03:03 PM.

  2. #2

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Nevermind, I got it:

    Code:
    <SCRIPT language=vbscript>
    Sub A
    document.forms(0).txtTest.value = fraTest.document.body.innerHTML
    end Sub
    </SCRIPT>
    <html>
    <head></HEAD>
    <BODY onblur="A">
    <form name="Test">
    <iframe name="fraTest" src="me.asp" id="fraTest" height=0 width=0 border=0></iframe>
    	<Input name="txtTest" value="A">
    </Form>
    </body>
    </html>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width