rundellt2000
05-02-2003, 07:59 AM
Does anyone know a code that can
[list=a]
Make a div like an I Frame (being able to click a link outside the div and the page will appear inside the div or
move an I-frame anywhere on a page and change its scrollbar color.
[/list=a]
I have seen the first idea on http://swamyway.com. PLEASE help!
starlet
05-02-2003, 02:01 PM
1. No, you cannot target divs.
2. Position Iframe (http://www.lissaexplains.com/forum//search.php?s=&action=showresults&searchid=63811&sortby=lastpost&sortorder=descending) + you need to use CSS (http://www.lissaexplains.com/css.shtml) and change them the way you would any other scrollbars. This thread (http://www.lissaexplains.com/forum//showthread.php?s=&threadid=29012&highlight=iframe+scrollbars) may help.
COBOLdinosaur
05-03-2003, 05:28 PM
Actually you can target a div -- just use XMLHTTP:
<html>
<head>
<script language='JavaScript'>
function include(url,target) // must be a fully qualified URL, I don't know why.
{
var xml = new ActiveXObject("Microsoft.XMLHTTP");
xml.Open( "GET", url, false );
xml.Send()
target.innerHTML=xml.responseText;
}
</script>
</head>
<body>
<a href="#"
onClick="include('http://domain.page.html',document.getElementById('somediv ')); return false;"> click to load layer</a>
<div id="somediv" style="height:300px;width:80%;overflow:auto"> </div>
</body>
</html>
sebluver
05-03-2003, 06:16 PM
I've always wanted to know-if you add a height on DIVs, will it scroll, or will it just be oh-so-annoying and stop at the end of the height.
Xiphias
05-03-2003, 06:52 PM
If you don't add overflow: auto; to the tag it will just stop.