?
Solved

Page with iframe ?

Posted on 2003-02-26
5
Medium Priority
?
227 Views
Last Modified: 2011-04-14
I have a page with an iframe in it and the outer part of the page has a button that I want to when clicked modify the contents of the iframe.

The iframe statement I have is
    <!-- <p class="headlines" style="margin-bottom: 2px">  -->
      <iframe src="inc_sitelist.asp" width="100%" height="100%" frameborder="1" name="news" style="padding-right: 0px" marginheight="5" marginwidth="5">      </iframe>
    <!-- </p> -->    

The the button is clicked I would like the contents to change to inc_adminlist.asp.  

Any thoughts?

Thanks
0
Comment
Question by:pinkstonm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:third
ID: 8029958
try this just change the page sources

<iframe src="http://www.google.com" width="100%" height="100%" frameborder="1" id="newsid" name="news" style="padding-right: 0px" marginheight="5" marginwidth="5">      </iframe>
<input type="button" name="btn" value="Click" onclick="document.getElementById('newsid').src='http://www.yahoo.com';">
0
 

Author Comment

by:pinkstonm
ID: 8030347
<a href=_blank class="grey" onclick="document.getElementById('newsid').src='inc_adminlist.asp';" onmouseover="return overlib('Site List Master administrative functions including security', BGCOLOR, '878787', FGCOLOR, 'E6E6E6', CAPCOLOR, 'FFFFFF', CAPTION,  'administrative functions');" onmouseout="return nd();">admin</a>

I tried to put in a _blank but that does not work if I remove the href it works but distorts the look of the value becuase of css values.

Anythoughts
0
 
LVL 30

Accepted Solution

by:
third earned 200 total points
ID: 8030996
should be,

<a href="#" class="grey" onclick="document.getElementById('newsid').src='inc_adminlist.asp';return false;" onmouseover="return overlib('Site List Master administrative functions including security', BGCOLOR, '878787', FGCOLOR, 'E6E6E6', CAPCOLOR, 'FFFFFF', CAPTION,  'administrative functions');" onmouseout="return nd();">admin</a>

0
 
LVL 19

Expert Comment

by:webwoman
ID: 8034094
If the button is in the main part of the page and you want to change the iframe contents, all you need is to add a target to a regular link. iFrames work just like regular frames.
0
 

Author Comment

by:pinkstonm
ID: 8034165
Thanks works nice
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question