Link to home
Start Free TrialLog in
Avatar of willsherwood
willsherwood

asked on

HTML <iframe> - how to change URL based on link clicked from the same page

I want to achieve somewhat of a old style of frames, but using <iframe>

how to make an <a href> link tag to control the source of an <iframe> on the same page?

<a href="DisplayPortal1" onClick="myIframe.iframe.src='DisplayPortal1.php';"> Display 1 </a>
<a href="DisplayPortal2" onClick="myIframe.iframe.src='DisplayPortal2.php';"> Display 2 </a>

<iframe src="" ID="myIframe" >  </iframe>
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of willsherwood
willsherwood

ASKER

thanks for the great input, really appreciated!
Thanks for the points!