PDA

View Full Version : New windows with frames



rah111
07-08-2002, 07:43 AM
Hi all.

Is the keyword "target" specific only to frames?

I have a table set up with each <td> being an onMouseover and I'd like to output different data to the screen based on which <td> is selected by the user. If I do this without frames then a new window is automatically opened up when the user clicks on an option.

Because I don't want this to happen, I have introduced a frameset with two frames, one containing the table with all of the <td> onMouseover options, and one for the display of data. This works ok (ie. it doesn't open a new window) except that it mucks up the formatting of the original screen and doesn't look as good.

Is there any way I can go without the frameset option but still output data beneath the <td> options without a new window?

Thanks in advance.

Russell.

justame
07-08-2002, 12:08 PM
rah...
/me doesnt just a use® 'em 'cept /me thinks you need to just a look® for something called...
iframe orrr something like tooltips where just a nother® 'window' opens containing the information...n' then just a disappears® when you onmouseout ???

edgework
07-08-2002, 02:40 PM
You can control your pop-up windows sufficiently that they might yet be an option. Fixed size, no navigation buttons, scrollbars if needed, but nothing for the user to do with them other than read them and close them. You can set your script to first check if the last window was left open, and, if so, to load the next page into it instead of littering the screen with a bunch of windows. But then, I try to do everything possible to avoid frames, so handy informational pop-ups work well for me. It's a matter of preference.

Another option would be to have the page drawn each time by JavaScript code. (This is theory here, I don't have a full implementation).

But lets say your page is created entirely by a series of document.write() commands that generate your html code. The variable data sections could each be placed into a series of files, each of which creates a variable that writes out the code for that particular section.

If a user selection caused the appropriate file name (or variable name) to be written to a cookie, and if the script than reloaded the page, and if, at the point where the variable data was to be written, the script made a call to the cookie first to see if there was information there, at which point the file name would be retrieved and translated into an appropriate document.write() command, and if the last thing the script did before closing out the document.write() stream was to kill the cookie so that it would be clear for the next selection, you could do whatever you want in terms of both content and design. Your options would be limited only by the number of tablecells you can cram into a page. You'd probably want to make the variable area a <DIV> with a fixed position and size that is scrollable, to allow for different amounts of content. Might sound complex, but you have to write the html code anyway, no matter where you put it. It's not that big a step to feed each line into javaScript format.

boxer_1
07-08-2002, 04:40 PM
Originally posted by rah111
Hi all.

Is the keyword "target" specific only to frames?

I have a table set up with each <td> being an onMouseover and I'd like to output different data to the screen based on which <td> is selected by the user. If I do this without frames then a new window is automatically opened up when the user clicks on an option.

Because I don't want this to happen, I have introduced a frameset with two frames, one containing the table with all of the <td> onMouseover options, and one for the display of data. This works ok (ie. it doesn't open a new window) except that it mucks up the formatting of the original screen and doesn't look as good.

Is there any way I can go without the frameset option but still output data beneath the <td> options without a new window?

Thanks in advance.

Russell.

Just taking a guess here, but are you looking for something like this: http://www.dynamicdrive.com/dynamicindex5/linkinfo.htm . Of couse the script could be modified so the text could appear elsewhere on the page and the text could be displayed onMouseover of your table cell as opposed to onMouseover of links, such as in the example. Just a thought, but it sounds like all you're after is a way to display textual description in a different area of the page onMouseover??? Or am I way off the mark of wht you're after ;) ?

rah111
07-09-2002, 12:01 AM
Thanks justame, edgework and boxer_1.

I may not have explained myself very clearly.

I guess I'm just becoming aware of the possible limitations of frames, and was asking whether I could display a whole lot of text in the main part of the document without using "target" along with frames.

Thanks to edgework for your detailed response. I think I might try something like that actually. The only thing that concerned me was the fact that I'd be continually reloading the "static" part of the page, and maybe that wouldn't look good.

Anyway, I'll give it a go.

Thanks again.

Russ.