Click to See Complete Forum and Search --> : DHTML newbie: layers?


davekub
04-07-2003, 02:57 PM
I'm working on an application for work and am trying to determine whether DHTML will do what we're after. I'm also completely new to DHTML though I've used HTML and some Javascript in the past. What we have is a frame that will contain a graph. It *can* contain multiple graphs, each on it's own 'tab'. What I need to find out is if DHTML can be used to keep all the data that is on each tab locally, in the browser. Or would it be better if we made a trip to the server to retrieve the tab contents when a user clicks on a tab. Oh, and we're only concerned with supporting IE 5.5 and newer.

Also, can a new 'layer' (tab) be created on the fly? The way the graph function works is this:

the first graph would contain monthly data, ie: each point on the graph represents a month. There would be a 12 points on the graph. The user would then click on a month-point to view a second graph that shows data for the selected month. The data on that second graph would show a point for every day of the month. They click on a day and a third graph displays (on another tab) showing data by hour for the selected day. And so on. Does each of those layers (three in this example) already have to exist? And the contents just get filled in/changed? Or can the layer be created on the fly, as needed?

Thanx for anything you can suggest!

Dave

Osaou
04-07-2003, 04:20 PM
Yes, it is possible.
Have you studied any other programming language, like Java or C++ for example? If you have you should have been introduced to classes.
Javascript also supports classes, and therefor you could create a new instance of, oh let's say, a "Graph_Tab" class for each graph. And then that instance holds each variable for you - or your graphs really... ;)

And since you're only interested in coding for IE 5+ it shouldn't take more than a day or two to make it finished... :)

Read more about how to create javascript-classes on this (http://www.dhtmlcentral.com/) site.


Good luck, and if you need further help just post here again...!

Ali Imran
04-08-2003, 05:10 PM
I have recently posted a thread almost same to this in javascript help forum.

For example I just want to create just new layer on mouse click once not more and send load some avi in it then what to do ?