Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy iFrames and Click Events

    Idealy what I would like to do is have three buttons (linked in, twitter, facebook) and i would like for the specific files (linkedin.html, twitter.html, facebook.html) appear in the same iFrame. I don't know how to use a click event with multiple documents appearing in the same iFrame just the one:

    <iframe src ="Twitter.html" width="100%" height="100">
    <p>Your browser does not support iframes.</p>
    </iframe>


    I think it has to be something like :
    <input style="margin-bottom:5px;font-family:verdana;" name ="TwitterButton" type ="submit" value=Twitter" >>" onClick="displayiFrameTwitter()" >

    <input style="margin-bottom:5px;font-family:verdana;" name ="FacebookButton" type ="submit" value=Facebook" >>" onClick="displayiFrameFacebook()" >

    <input style="margin-bottom:5px;font-family:verdana;" name ="LinkedInButton" type ="submit" value=LinkedIn" >>" onClick="displayiFrameLinkedin()" >




    <script type="text/javascript">

    function displayiFrameTwitter()
    {
    document.getElementById("twitterframe").src="twitter.html"
    }

    function displayiFrameFacebook()
    {
    document.getElementById("facebookframe").src="facebook.html"
    }


    function displayiFrameLinkedin()
    {
    document.getElementById("linkedinframe").src="linkedin.html"
    }
    </script>


    Am I on the right path? Where do i go next?

    Thank you all for the help.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,907
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    See:- *** WARNING: Questions posted here will be deleted! ***.
    You will not get any reply in this forum which is intended to be used only to
    post a completed (working) script for showcasing/benefit of others.

    Where do you go next? Read the forum rules and posting guidelines.


  •  

    Tags for this Thread

    Posting Permissions

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