469,923 Members | 1,605 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

IE issue : td cell in a table with a title which includes '-'(dash)

This is IE issue only. Firefox and mozilla doe not have this problem.

td cell in a table with a title which includes '-'(dash). If I add a
dash between Time-Time. IE intrepets as new line os somethig and the
title is displayed in 2 line like:
Time-
Time

instead of Time-Time.
Below is snippet of the code.

function genHeader(mt,monTypes)
{
var pmHtml = "<table class='ctbl' border='1' rules=all
cellpadding='2' cellspacing='1' bordercolordark='black'><tr
class=hd><td width=120>Time-Time</td>";

//loop through and set up heading
for(var i = 0; i < mt.length; i++) {
pmHtml += "<td width=120><div id=" + monTypes[i].name+
" onmouseout=hideHelp('" + monTypes[i].name + i +
"',event)" +
" onmouseover=showHelp('" + monTypes[i].name + i +
"',event)>" +
monTypes[i].name + "</div></td>";
}
pmHtml += "</tr>";
return pmHtml;
}

Note the table end tag in done by the calling function.

I would appreciate any help on this as I am stuck

Thanks
Sujith

Dec 1 '06 #1
3 1584
su**********@gmail.com wrote:
>
This is IE issue only. Firefox and mozilla doe not have this problem.

td cell in a table with a title which includes '-'(dash). If I add a
dash between Time-Time. IE intrepets as new line os somethig and the
title is displayed in 2 line like:
Time-
Time

instead of Time-Time.
Below is snippet of the code.

function genHeader(mt,monTypes)
{
var pmHtml = "<table class='ctbl' border='1' rules=all
cellpadding='2' cellspacing='1' bordercolordark='black'><tr
class=hd><td width=120>Time-Time</td>";

//loop through and set up heading
for(var i = 0; i < mt.length; i++) {
pmHtml += "<td width=120><div id=" + monTypes[i].name+
" onmouseout=hideHelp('" + monTypes[i].name + i +
"',event)" +
" onmouseover=showHelp('" + monTypes[i].name + i +
"',event)>" +
monTypes[i].name + "</div></td>";
}
pmHtml += "</tr>";
return pmHtml;
}

Note the table end tag in done by the calling function.

I would appreciate any help on this as I am stuck

Thanks
Sujith
Don't know if this is the cause, but shouldn't your table cell id's be
quoted?...ie:
pmHtml += "<td width=120><div id='" + monTypes[i].name+ "'
onmouseout=hideHelp(....
Dec 1 '06 #2
Thanks for the response...

I tried that but no luck...
Gary Hasler wrote:
su**********@gmail.com wrote:

This is IE issue only. Firefox and mozilla doe not have this problem.

td cell in a table with a title which includes '-'(dash). If I add a
dash between Time-Time. IE intrepets as new line os somethig and the
title is displayed in 2 line like:
Time-
Time

instead of Time-Time.
Below is snippet of the code.

function genHeader(mt,monTypes)
{
var pmHtml = "<table class='ctbl' border='1' rules=all
cellpadding='2' cellspacing='1' bordercolordark='black'><tr
class=hd><td width=120>Time-Time</td>";

//loop through and set up heading
for(var i = 0; i < mt.length; i++) {
pmHtml += "<td width=120><div id=" + monTypes[i].name+
" onmouseout=hideHelp('" + monTypes[i].name + i +
"',event)" +
" onmouseover=showHelp('" + monTypes[i].name + i +
"',event)>" +
monTypes[i].name + "</div></td>";
}
pmHtml += "</tr>";
return pmHtml;
}

Note the table end tag in done by the calling function.

I would appreciate any help on this as I am stuck

Thanks
Sujith

Don't know if this is the cause, but shouldn't your table cell id's be
quoted?...ie:
pmHtml += "<td width=120><div id='" + monTypes[i].name+ "'
onmouseout=hideHelp(....
Dec 1 '06 #3
su**********@gmail.com wrote:
td cell in a table with a title which includes '-'(dash). If I add a
dash between Time-Time. IE intrepets as new line os somethig and the
title is displayed in 2 line like:
Time-
Time
instead of Time-Time.
Below is snippet of the code.
Your code doesn't include a title tag in a td. Do you mean content instead
of title?

If I is wrapping Time-Time to Time-\nTime, then just add a style of
white-space:nowrap to the td.
But that's a CSS issue, not a JS issue.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Dec 1 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Chris Coho | last post: by
1 post views Thread by Joe Conlin | last post: by
8 posts views Thread by Ben | last post: by
3 posts views Thread by Robert Mark Bram | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.