1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

javascript.reload for an iframe

Discussion in 'JavaScript' started by grobar, Jul 28, 2006.

  1. #1
    Hello,

    I have a main page, that within it, contains an iframe name="ggg". On the main page, i have:

    
    <iframe name=ggg height=40px align=right width=90px frameborder=0 marginwidth=0 marginheight=0 scrolling=no src="aspcaptcha.asp"></iframe>
    
    <a class="info" href="javascript:location.reload(true)">
    new image</a>
    
    Code (markup):
    I can't seem to find how i can make that reload script actually reload the ifram only

    any help is appreciated. Thanks.
     
    grobar, Jul 28, 2006 IP
  2. grobar

    grobar Well-Known Member

    Messages:
    642
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    140
    #2
    answered my own question...

    in the head section...
    
    <script type="text/javascript">
    function Reload () {
    var f = document.getElementById('captcha');
    f.src = f.src;
    }
    </script>
    
    
    Code (markup):
    then the code...
    
    <iframe id="captcha" height=40px align=right width=90px frameborder=0 marginwidth=0 marginheight=0 scrolling=no src="aspcaptcha.asp"></iframe>
    										
    <a class="info" href="javascript:Reload()">
    
    Code (markup):
     
    grobar, Jul 28, 2006 IP