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

S

sujith.bolar

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.name+
" onmouseout=hideHelp('" + monTypes.name + i +
"',event)" +
" onmouseover=showHelp('" + monTypes.name + i +
"',event)>" +
monTypes.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
 
G

Gary Hasler

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.name+
" onmouseout=hideHelp('" + monTypes.name + i +
"',event)" +
" onmouseover=showHelp('" + monTypes.name + i +
"',event)>" +
monTypes.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.name+ "'
onmouseout=hideHelp(....
 
S

sujith.bolar

Thanks for the response...

I tried that but no luck...


Gary said:
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.name+
" onmouseout=hideHelp('" + monTypes.name + i +
"',event)" +
" onmouseover=showHelp('" + monTypes.name + i +
"',event)>" +
monTypes.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.name+ "'
onmouseout=hideHelp(....
 
M

Matt Kruse

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top