[Javascript] Non-Scrolling Titles

Cutter Bl cutterbl at hotmail.com
Thu Jan 31 08:25:44 CST 2002


Somebody stop me if I'm wrong here, but I think if you cell contents were 
within a span (<td><span id="spCellA1">contents</span></td>) then you could 
change the contents by writing to the span. Here is some code generated by 
Installshield for it's "Install From The Web" page:

/* Used to replace static text on page */
function writeText(id, str) {
	var strTag = '<FONT face="Verdana, Arial, Helvetica" size="2" 
color="#ea9b02"><B>' + str + '</B></FONT>';

	if (document.all)
		document.all[id].innerHTML = strTag;
	else
	if (brw == 'nav406up')
		with (document[id].document)
			{open();
			write(strTag);
			close();}
}

Just a suggestion...

Cutter
http://www.falcon-knives.com

----Original Message Follows----
From: pd <pd4953 at myrealbox.com>
Reply-To: javascript at LaTech.edu
To: javascript at LaTech.edu
Subject: Re: [Javascript] Non-Scrolling Titles
Date: Wed, 30 Jan 2002 23:08:15 -0500

Thank you all for the input.  It has been very helpful.  I've worked with
it some more and almost have it working in a top an bottom frame I
think.  The top frame has the single row of titles and no vertical scroll
bar for that frame.  The bottom frame has the body of the table with the
vertical scroll bar enabled.

I used your scaling logic to adjust the width.  My problem is that after it
adjusts the width and goes on to the next <TD> in the title table it
sometimes changes the width of the frame it just adjusted.  I saw this by
using "alert" function in the loop that adjusts width.

I think my solution is to create one more row below the table titles and
use a spacer .gif to adjust the width.  I can then hide it by letting it go
over the edge to just show the top row.

My question is this.  Is there a DOM method to change the content of a <TD>
cell in an existing table?    I noticed you used the method - z.style.width
= x; - to change the width of the cell.  How do you change the contents of
a table <tr> cell?

I'd like the end result to be interpreted something like this:
<td width=x ><IMG src="images/spacer.gif"  width=x height="1"></td>

Thanks again.

Paul



At 11:33 AM 1/22/2002 +0000, Peter-Paul Koch wrote:

>>Sorry.  I see now that you already have the scrolling part covered
>>too.  I didn't notice the "sticky menu" part at first script.  Is there a
>>way to smooth out the jumping a little more?  Would it be very hard to
>>put the headers in a top frame and keep it aligned horizontally with the
>>table in the bottom frame?  That way it would only have to jump when it
>>went left or right.
>
>Set less milliseconds in the timeout. I use 500 milliseconds between
>checks for reasons explained on the page.
>
>As to frames, I suppose it's possible but I don't have a script handy.
>You'd have to rewrite the script so that it doesn't get its information
>from the table in the page but from the table in parent.framename
>
>ppk
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the Javascript mailing list