CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   ColdFusion (http://www.codingforums.com/forumdisplay.php?f=45)
-   -   coldfusion: onclick to pass a value to display in an iframe (http://www.codingforums.com/showthread.php?t=216346)

thevamps 01-26-2011 01:56 AM

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).

http://img97.imageshack.us/img97/280/iframe.jpg

please help me. thanks.

Gjslick 01-27-2011 03:16 AM

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


All times are GMT +1. The time now is 11:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.