Tables and Targets

liunx

Guest
Okay...I am mucking around with Dreamweaver and I want to try something but don't know if it will work.<br />
<br />
On my test page I have a table whereas I have the menu in on column and in the other is where I want the selected material to appear such as a user chosen image...can this be done with tables or only with frames?:D<!--content-->It can be done with either one, and it can work in IE, Netscape 4+.<!--content-->I see...but how would I do that with tables??<br />
<br />
Hey Jona..I was trying to get to GT but it is down again..go figure.<!--content-->OK, this will be done in Javascript. Here is some code:<br />
<br />
Goes in your <HEAD> tag:<br />
<br />
<br />
<script type="text/javascript"><br />
<!--<br />
var ie = document.all;<br />
var dom = document.getElementById;<br />
<br />
function writeInfo(elem, theInfo){<br />
if(!dom && ie){<br />
document.all[elem].innerHTML = theInfo;<br />
} else if(!ie && dom){<br />
document.getElementById(elem).innerHTML = theInfo;<br />
} else if(navigator.appName=="Netscape" && parseInt(navigator.appVersion==4)){<br />
document.layers[elem].document.open();<br />
document.layers[elem].document.write(theInfo);<br />
document.layers[elem].document.close();<br />
} else {return;}<br />
}<br />
// --><br />
</script><br />
<br />
<br />
In the link you want to use to change the inner HTML of the table:<br />
<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"default.html" onClick="writeInfo('myData', 'Hey, there this is some new text. <img src=http://www.webdeveloper.com/forum/archive/index.php/\"someFile.gif\"> An image can go in here, too!'); return false;">Click here</a><br />
<br />
<br />
This is assuming that in your table you have this (example):<br />
<br />
<br />
<table width="100%"><br />
<tr><br />
<td id="myData">This is the original text that will change when you click the link.<br />
</td></tr><br />
</table><br />
<br />
<br />
I don't know what is up with GT, but it looks like Mike isn't online right now so I have no idea when it will be back up.<!--content-->AARRGGHH!!!<br />
<br />
Too much java talk...I was hoping it would be easier than that....I wonder when Dreamweaver will come up with Javascript generator that makes javascript for you...just like it makes HTML code?<!--content-->Well, that would take a lot more work than you'd think. Also, just FYI, it's JavaScript, not Java. If they do come up with a JavaScript generation addition, I will more than likely purchase the program... Just to criticize it... lol ;)<!--content-->Yeah,yeah...JavaSCRIPT!<br />
<br />
Ya happy now?:D <br />
<br />
I am not really into typing in all of that script manually though...gets too confusing.<!--content-->lol, ok, suit yourself. ;)<!--content-->I am not the "programmer" type....just wanna do it with as little pain as possible.<!--content-->If you upload the page to a Web site, I can provide you with an updated version of the same page with the JavaScript installed. If you'd like that.<!--content-->Well...I haven't uploaded anything yet...if ever but thanks for the offer.<br />
<br />
I am just messing around a little...besides, I have nothing really worthwhile to show, heh. :D <br />
<br />
Sorry...was eating some soup a minute ago.<!--content-->No biggie. I'm cool. ;) Here's an example of what you could do with the script I gave you--although mine is shorter: <!-- m --><a class="postlink" href="http://walshak.tk/">http://walshak.tk/</a><!-- m --> is a site I made for my (now deceased) grandfather. Anyhow, the coding in the left frame is what you should look at.... Please don't look at too many of the pics because the host has very little bandwidth! ;) Talk to you later. Bye!<!--content-->Thanks...but none of the pics showed up...just little squares with red x's in them.<br />
<br />
Laters<!--content-->Well, I didn't upload the pictures, yet but the example (left frame) was pretty nice, wasn't it? Of course, it doesn't do the "cool" style thing in any browser other than IE, so unless you viewed it in IE, you didn't get the "full effect" of it. lol<!--content-->Yes, yes the menu does have a nice effect...very neatly organized.<br />
<br />
But why, oh why did you tell me about the pics and not to view too many of them? :D<!--content-->Because the host hasn't enough bandwidth to serve all those who visit it. So I don't want the site to go down for a month because of that, I'm looking for a good free host (I've found a few but haven't moved it yet) to use instead. But until then, I don't want all the bandwidth used up. ;)<!--content-->I see...<br />
<br />
By the way..GT is STILL down...must be something major.<!--content-->Yes, it's still down. Excellfire says she doesn't know when Mike will get on again, so we're not sure when it will get fixed.<!--content-->Hmmm...I hope it is soon though....thanks for the update<br />
<br />
Problem is that even Luna is down too.<!--content-->I don't go to Luna much, because they let you use bad words, and people abuse that..<br />
<br />
BTW, we need to stop talking from one forum to the other! lol<!--content-->Okay.<!--content-->
 
Back
Top