1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

submit it to iframe?

Discussion in 'Black Hat SEO Tools' started by amberlamps, Nov 24, 2010.

  1. amberlamps

    amberlamps BANNED BANNED

    Joined:
    Jun 24, 2010
    Messages:
    331
    Likes Received:
    142
    im basically trying to create a submit button outside of the targeted iframe.

    I have this but it is not working properly for me, when i hit submit, the page does waht it wants,

    here is a live example of my failure http://bit.ly/i2WgM0

    i want when i hit the button "submit the form" to basically act like if i hit enter on that iframe

    any help is muchly appericated

    Code:
    
    <html>
    <head>
    <script type="text/javascript">
    function submitFormToIFrame(){
        //IE
        if( document.myform ){
            document.myform.setAttribute('target','frame_x');
            document.myform.submit();
        //FF
        } else {
            var form=document.getElementById('myform');
            form.setAttribute('target', 'frame_x');
            form.submit();
        }
    }
    </script>
    </head>
    
    <body>
    <h1>Hello Erwin!</h1>
    
    <form id="myform" name="myform" action="" target="">
        <input type="button" value="Submit the Form" onClick="submitFormToIFrame();">
    </form>
    
    <span id="iframeSlot">
    <iframe name="frame_x">
    </iframe>
    </span>
    </body>
    </html>