By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,516 Members | 1,148 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,516 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.