use script variable in an iframe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chevalier45
    New Member
    • Aug 2013
    • 1

    use script variable in an iframe

    I am trying to pass a the script variable var_url into an iframe. Can you help?

    Code:
        <head>
       <script>
          var_url="http://www.google.com"
        </script>
        </head>
        <body>
        <script> document.write(var_url);</script>
        <iframe width="100%"  height="420" scrolling="no" frameborder="0"  banner"src="var_url"></iframe> 
    </body>
    </html>
    Last edited by Rabbit; Aug 18 '13, 05:07 AM. Reason: Please use code tags when posting code.
Working...