473,587 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,mo nTypes)
{
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=hide Help('" + monTypes[i].name + i +
"',event)" +
" onmouseover=sho wHelp('" + 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 1694
su**********@gm ail.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,mo nTypes)
{
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=hide Help('" + monTypes[i].name + i +
"',event)" +
" onmouseover=sho wHelp('" + 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=hide Help(....
Dec 1 '06 #2
Thanks for the response...

I tried that but no luck...
Gary Hasler wrote:
su**********@gm ail.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,mo nTypes)
{
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=hide Help('" + monTypes[i].name + i +
"',event)" +
" onmouseover=sho wHelp('" + 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=hide Help(....
Dec 1 '06 #3
su**********@gm ail.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
5214
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 includes the following columns: DocID (INTEGER, PRIMARY KEY, CLUSTERED) IsRecord (INTEGER, NONCLUSTERED)
2
17078
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 images when you have alt text. I know how to do mouse over effects and onmousein and onmouseout. I just dont know how to get the same text box style...
1
1846
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, then my page goes...well, you know. What I am looking for is a way that I can contain ANY data (i.e. characters, tags, etc.) directly in that cell....
0
2720
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 anyway to stop this...??? <HTML> <HEAD> <title>Conform Inbox</title> <meta content="False" name="vs_snapToGrid">
2
11251
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 change color when any of the three are hovered over. I would prefer to do this with pure CSS if possible, but if Javascript is the only way...so be...
8
17893
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. How do I do it? I think one way is to write the entire table out in document.write("<table>...) but I'd like to know if it is possible to access...
31
5682
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 calendar, 7 across by whatever needed down, and I manually create it each month - not a big deal. Every day I go in and darken the background color of...
4
2430
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 when the window is rezised the menu stands at the same position and with the same size. My question is: is there a way to modify those...
3
1464
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 another way to assign a handler, making sure the event will come from the row and not a TD, or is this simply a box model issue I cannot work around...
3
4743
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
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8349
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.