Click to See Complete Forum and Search --> : Tables and Targets


Dark Dragon
05-19-2003, 06:26 PM
Okay...I am mucking around with Dreamweaver and I want to try something but don't know if it will work.

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

Jona
05-19-2003, 07:41 PM
It can be done with either one, and it can work in IE, Netscape 4+.

Dark Dragon
05-19-2003, 07:50 PM
I see...but how would I do that with tables??

Hey Jona..I was trying to get to GT but it is down again..go figure.

Jona
05-19-2003, 08:05 PM
OK, this will be done in Javascript. Here is some code:

Goes in your <HEAD> tag:


<script type="text/javascript">
<!--
var ie = document.all;
var dom = document.getElementById;

function writeInfo(elem, theInfo){
if(!dom && ie){
document.all[elem].innerHTML = theInfo;
} else if(!ie && dom){
document.getElementById(elem).innerHTML = theInfo;
} else if(navigator.appName=="Netscape" && parseInt(navigator.appVersion==4)){
document.layers[elem].document.open();
document.layers[elem].document.write(theInfo);
document.layers[elem].document.close();
} else {return;}
}
// -->
</script>


In the link you want to use to change the inner HTML of the table:


<a href="default.html" onClick="writeInfo('myData', 'Hey, there this is some new text. <img src=\"someFile.gif\"> An image can go in here, too!'); return false;">Click here</a>


This is assuming that in your table you have this (example):


<table width="100%">
<tr>
<td id="myData">This is the original text that will change when you click the link.
</td></tr>
</table>


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.

Dark Dragon
05-19-2003, 08:13 PM
AARRGGHH!!!

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?

Jona
05-19-2003, 08:19 PM
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 ;)

Dark Dragon
05-19-2003, 08:27 PM
Yeah,yeah...JavaSCRIPT!

Ya happy now?:D

I am not really into typing in all of that script manually though...gets too confusing.

Jona
05-19-2003, 08:37 PM
lol, ok, suit yourself. ;)

Dark Dragon
05-19-2003, 08:40 PM
I am not the "programmer" type....just wanna do it with as little pain as possible.

Jona
05-19-2003, 08:40 PM
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.

Dark Dragon
05-19-2003, 08:54 PM
Well...I haven't uploaded anything yet...if ever but thanks for the offer.

I am just messing around a little...besides, I have nothing really worthwhile to show, heh. :D

Sorry...was eating some soup a minute ago.

Jona
05-19-2003, 08:57 PM
No biggie. I'm cool. ;) Here's an example of what you could do with the script I gave you--although mine is shorter: http://walshak.tk/ 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!

Dark Dragon
05-19-2003, 09:06 PM
Thanks...but none of the pics showed up...just little squares with red x's in them.

Laters

Jona
05-19-2003, 09:50 PM
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

Dark Dragon
05-20-2003, 07:50 AM
Yes, yes the menu does have a nice effect...very neatly organized.

But why, oh why did you tell me about the pics and not to view too many of them? :D

Jona
05-20-2003, 12:27 PM
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. ;)

Dark Dragon
05-20-2003, 12:35 PM
I see...

By the way..GT is STILL down...must be something major.

Jona
05-20-2003, 12:46 PM
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.

Dark Dragon
05-20-2003, 01:05 PM
Hmmm...I hope it is soon though....thanks for the update

Problem is that even Luna is down too.

Jona
05-20-2003, 01:07 PM
I don't go to Luna much, because they let you use bad words, and people abuse that..

BTW, we need to stop talking from one forum to the other! lol

Dark Dragon
05-20-2003, 01:09 PM
Okay.