PDA

View Full Version : Dreamweaver...Linking Images Help


fanalejr
03-05-2005, 01:24 AM
Hey guys, i had a problem a lil while back and i asked for help, and i got a response just hours later...so i gotta say this is the fastest most helpful forum ive ever been on...so thanks, anyway, i figured id give it another shot...im using dreamweaver to create a gallery style page...framed with top/left/and main..the left frame has a menu of pictures and when you click on the little picture on the left, the jpeg loads in the main page, i got that to work. The problem is, that the page background is black, but when it loads a jpeg image in the mainframe, the mainframe background turns white? is there a way to fix this, without having to make an individual page for each picture and loading that into the mainframe? i hope that makes sense, im not too good at wording these kinds of questions
thanks
jim

_Aerospace_Eng_
03-05-2005, 03:20 AM
sorry would have gotten you a solution sooner but me being in the current state that i am i failed to realize that IE doesn't like it when u try to document.write to a page that has an src in it that you have no control over it, rather than making a new page, let javascript do what its capable of doing :) anyways here it is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script type="text/javascript">
function writeimg(what,which,describe){
parent.mainFrame.document.open();
parent.mainFrame.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"');
parent.mainFrame.document.write('"http://www.w3.org/TR/html4/loose.dtd">');
parent.mainFrame.document.write('<head>');
parent.mainFrame.document.write('<title>'+what+'</title>');
parent.mainFrame.document.write('<style type="text/css">');
parent.mainFrame.document.write('body {background:#000000;color:#FFFFFF}');
parent.mainFrame.document.write('h1{text-align:center;}');
parent.mainFrame.document.write('div{text-align:center;}');
parent.mainFrame.document.write('p{text-align:center;font-size:20px;}');
parent.mainFrame.document.write('</style>');
parent.mainFrame.document.write('</head>');
parent.mainFrame.document.write('<body>');
parent.mainFrame.document.write('<h1>'+what+'</h1>');
parent.mainFrame.document.write('<div><img src="'+which+'" alt="'+what+'"></div>');
parent.mainFrame.document.write('<p>'+describe+'</p>');
parent.mainFrame.document.close();
}
</script>
</head>
<body>
<a href="example.png" onclick="writeimg('the title is here','yourimagegoeshere.png','the description goes here');return false"><img src="example.png" border="0" width="50" height="50"></a>
</body>
</html>
if you need help understanding it, just post back its pretty self explanatory, this is the page that will have your "thumbnails" on it