Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

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 01-26-2011, 01:56 AM   PM User | #1
thevamps
New to the CF scene

 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
thevamps is an unknown quantity at this point
coldfusion: onclick to pass a value to display in an iframe

hello.

i'd like to ask for help/advice from anyone out there.

what i am doing right now is to display a list of documents in one page. when a user select (click) to one of the list, they will be able to view the PDF file in the iframe beside that list. The question is: How to pass a value to an iframe in the same page? (picture below explains how it should work).



please help me. thanks.
thevamps is offline   Reply With Quote
Old 01-27-2011, 03:16 AM   PM User | #2
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
Try giving the iframe an ID, and then you can tell it what to load. Ex:

Code:
<iframe id="myIframe"></iframe>
<a href="#" onclick="document.getElementById('myIframe').src='somepdf.pdf'; return false;">Load PDF</a>
-Greg
Gjslick is offline   Reply With Quote
Reply

Bookmarks

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:06 PM.


Advertisement
Log in to turn off these ads.