473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 1691
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Mateer | last post by:
Hi, I have been running some queries against a table in a my database and have noted an odd (at least it seems odd to me) performance issue. The table has approximately 5 million rows and...
2
by: Chris Coho | last post by:
Is there any way to get the same affect as alt text for an image on a table cell? For instance I want if someone rolls the mouse over the cell for some instructions to pop up like they do for...
1
by: Joe Conlin | last post by:
I am truncating data from an SQL database and have a script that populates a cell. The problem that I have is I have HTML tags in my database so if the data gets truncated in the middle of a tag,...
0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
2
by: Sugapablo | last post by:
Can anyone help me out with some code to change three table cells (<td>) when one is hovered over? I have a calendar grid where each day is made up of three table cells and I want all three to...
8
by: Ben | last post by:
Hi all, Just wondering how to write (using document.write) to a table cell. I have table with 3 rows and 3 colums. I want to write from within the Javascript to say third column of a first row....
31
by: Arthur Shapiro | last post by:
I'm the webmaster for a recreational organization. As part of one page of the site, I have an HTML "Calendar at a Glance" of the organization's events for the month. It's a simple table of a...
4
by: Dacian | last post by:
Hi, I´m trying to place a javascript navigation menu inside a cell of a table in my page, the problem is that the constructor of the menu object has parameters for menu positioning and size and...
3
by: Robert Mark Bram | last post by:
Hi All! In the code below, I want to add a handler to a *row* (eventually so I can change the style of a row), but the event is being generated by the TD's it seems - in Opera and IE. Is there...
3
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.