Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about 'txtwidth'

Status
Not open for further replies.

martinsafp

Technical User
Jul 10, 2001
7
0
0
NL
I have a problem,
this problem is about an 'alt' (just like with 'alt="Tek-Tips"' on an image).
In the next script (just a little piece of the whole) there is a line which begins with 'pretxt':

function mo(txt){
if(ie5) yoff=document.body.scrollTop;
if(ie||ns){
pretxt=&quot;<table width=152 cellpadding=1 cellspacing=0 border=0><tr><td><font color=\&quot;#000000\&quot; face=\&quot;Arial\&quot; size=1>&quot;;
posttxt=&quot;</font></td></tr></table>&quot;;
windowheight=Gl_get_window_height();
windowwidth=Gl_get_window_width();
mylayer.write(pretxt+txt+posttxt);
txtheight=mylayer.height;
txtwidth=mylayer.width;
if(!mov) tmr=setInterval('follow()',25);
mov=true
}
window.status=txt
}

I want to change 'width=152' (the width from the longest alt in my page) into some variable which looks at the length of the line and sets that variable to that size.
There are multiple 'alts' in my page, each one has an alternate length.

<a href=&quot; onmouseover=&quot;if(started) mo('The Alt');return true;&quot; onmouseout=&quot;if(started) mout();&quot;>

Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top