Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-21-2010, 04:47 AM   PM User | #1
Camwii
New to the CF scene

 
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Camwii is an unknown quantity at this point
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.
Camwii is offline   Reply With Quote
Old 06-25-2010, 07:56 AM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,037
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
See:- http://www.codingforums.com/showthread.php?t=17515.
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.
Philip M is online now   Reply With Quote
Reply

Bookmarks

Tags
click events, hidden, iframe, visibility

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:20 AM.


Advertisement
Log in to turn off these ads.