473,465 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Will work in IE but not NN - any help please?

Hi - could anyone please tell me why this line:
<td width="116" height="22" nowrap id="toptSearch" class="mtTabOnTop"
onClick="changeLoc('fixit_proceduresresultstick.as p','search')">Search
<img src="images/mt_srch.gif" width="16" height="16" border="0"
align="absmiddle"></td>

...will work in IE6, but not in NN6.2.

It does not recognize the nowrap, the width attribute, or the onClick.

I need to convert something for NN as soon as possible, and would
appreciate any help,

Many thanks,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
7 1350
In article <3f*********************@news.frii.net>, an*******@devdex.com
enlightened us with...
Hi - could anyone please tell me why this line:
<td width="116" height="22" nowrap id="toptSearch" class="mtTabOnTop"
onClick="changeLoc('fixit_proceduresresultstick.as p','search')">Search
<img src="images/mt_srch.gif" width="16" height="16" border="0"
align="absmiddle"></td>

..will work in IE6, but not in NN6.2.

Not work?
Well, if the function isn't working, we'd need to see the function. And
we'd need to know what it is supposed to do and what it is actually
doing.
It does not recognize the nowrap, the width attribute, or the onClick.


Run the file through an HTML validator. I bet it catches something.
--
--
~kaeli~
What do they use to ship styrofoam?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2
Mark wrote:
Hi - could anyone please tell me why this line:
<td width="116" height="22" nowrap id="toptSearch" class="mtTabOnTop"
onClick="changeLoc('fixit_proceduresresultstick.as p','search')">Search
<img src="images/mt_srch.gif" width="16" height="16"
border="0" align="absmiddle"></td>

..will work in IE6, but not in NN6.2.

It does not recognize the nowrap, the width attribute, or the onClick.


When using a doctype declaration, NN goes into strict mode, which means that
attributes must have values (`nowrap="nowrap"` instead of `nowrap`) and
their names must be lowercased (`onclick` instead of `onClick`).

While at it, learn yourself to use css instead of the old HTML tag
attributes, e.g.:

<td style="white-space:nowrap;width:116px;height:22px" id="toptSearch"
class="mtTabOnTop"
onclick="changeLoc('fixit_proceduresresultstick.as p','search')">Search
<img src="images/mt_srch.gif"
style="width:16px;height:16px;border:none;text-align:middle" /></td>

Of course most (if not all) properties in the style attribute's value should
be moved to the specified class...
JW

Jul 20 '05 #3
Janwillem Borleffs wrote:
When using a doctype declaration, NN goes into strict mode, which
means that attributes must have values (`nowrap="nowrap"` instead of
`nowrap`) and their names must be lowercased (`onclick` instead of
`onClick`).


The above is depending on the used doctype, check w3.org for details.
JW

Jul 20 '05 #4
Hi - sorry, it appears the onclick works - but the following javascript
does not work in NN (ok in IE):

function changeLoc(loc,tab){
parent.frames['mainFrame'].location.href=loc;
changeTab(tab);
}

function changeTab(tab)
{
if (tab == "search" || tab == "newsearch" ){
toptSearchb.className="mtTabOnB"
toptQuicklinksb.className="mtTabOffB"
toptAdminb.className="mtTabOffB"
toptOtherb.className="mtTabOffB"
toptSearch.className="mtTabOnTop"
toptQuicklinks.className="mtTabOff"
toptAdmin.className="mtTabOff"
toptOther.className="mtTabOffns"
<% if session("browsol")="1" then %>
toptBrowseb.className="mtTabOffB"
toptBrowse.className="mtTabOff"
<% end if %>

}
else if (tab == "quicklinks"){
toptSearchb.className="mtTabOffB"
toptQuicklinksb.className="mtTabOnB"
toptAdminb.className="mtTabOffB"
toptOtherb.className="mtTabOffB"
toptSearch.className="mtTabOff"
toptQuicklinks.className="mtTabOnTop"
toptAdmin.className="mtTabOff"
toptOther.className="mtTabOffns"
<% if session("browsol")="1" then %>
toptBrowseb.className="mtTabOffB"
toptBrowse.className="mtTabOff"
<% end if %>
}
else if (tab == "admin"){
toptSearchb.className="mtTabOffB"
toptQuicklinksb.className="mtTabOffB"
toptAdminb.className="mtTabOnB"
toptOtherb.className="mtTabOffB"
toptSearch.className="mtTabOff"
toptQuicklinks.className="mtTabOff"
toptAdmin.className="mtTabOnTop"
toptOther.className="mtTabOffns"
<% if session("browsol")="1" then %>
toptBrowseb.className="mtTabOffB"
toptBrowse.className="mtTabOff"
<% end if %>
}
else if (tab == "other"){
toptSearchb.className="mtTabOffB"
toptQuicklinksb.className="mtTabOffB"
toptAdminb.className="mtTabOffB"
toptOtherb.className="mtTabOnB"
toptSearch.className="mtTabOff"
toptQuicklinks.className="mtTabOff"
toptAdmin.className="mtTabOff"
toptOther.className="mtTabOnTop"
<% if session("browsol")="1" then %>
toptBrowseb.className="mtTabOffB"
toptBrowse.className="mtTabOff"
<% end if %>
}
else if (tab == "browse"){
toptSearchb.className="mtTabOffB"
toptQuicklinksb.className="mtTabOffB"
toptAdminb.className="mtTabOffB"
toptOtherb.className="mtTabOffB"
toptSearch.className="mtTabOff"
toptQuicklinks.className="mtTabOff"
toptAdmin.className="mtTabOff"
toptOther.className="mtTabOff"
<% if session("browsol")="1" then %>
toptBrowseb.className="mtTabOnB"
toptBrowse.className="mtTabOnTop"
<% end if %>

}
else {
toptSearchb.className="mtTabOffB"
toptQuicklinksb.className="mtTabOffB"
toptAdminb.className="mtTabOffB"
toptOtherb.className="mtTabOnB"
toptSearch.className="mtTabOff"
toptQuicklinks.className="mtTabOff"
toptAdmin.className="mtTabOff"
toptOther.className="mtTabOnTop"
toptBrowseb.className="mtTabOffB"
toptBrowse.className="mtTabOff"
}
}

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5
"Janwillem Borleffs" <jw@jwscripts.com> writes:
When using a doctype declaration, NN goes into strict mode, which means that
attributes must have values (`nowrap="nowrap"` instead of `nowrap`) and
their names must be lowercased (`onclick` instead of `onClick`).
Nope (I assume NN refers to Netscape 6+ (i.e., Mozilla)).

Even in HTML 4.01 Strict, attribute names are not case sensitive, so I
seriously doubt that Mozilla will not understand "onClick". Only in XHTML
are attribute names case sensitive.

Also, the nowrap attribute is simply not applicable to a TD in HTML
4.01 Strict, so it is at most ignored. Shorthand attributes *are*
valid, so, e.g., <select multiple> is valid, and is understood by
Mozilla.

With this DOCTYPE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
Mozilla FB 0.7 accepts any case of attribute names and the boolean
attribute "multiple". Actually (just checked), it accepts "nowrap" as
well, and honors it, even though it is deprecated and therefore
shouldn't be in HTML 4 Strict.
While at it, learn yourself to use css instead of the old HTML tag
attributes, e.g.:


That is always true :)
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #6
Mark <an*******@devdex.com> writes:
Hi - sorry, it appears the onclick works - but the following javascript
does not work in NN (ok in IE): .... toptSearchb.className="mtTabOnB"


I assume "toptSearchb" is the id of some element on the page.
Only IE makes global variables of the same name to refer to
such elements. Generally, you should use:

document.getElementById("toptSearchb").className=" mtTabOnB";
etc.

If it is important that your page works in IE 4, which doesn't
have document.getElementById, you can test for its existence,
and then use document.all if getElementById doesn't exist.

From what you are doing (dynamically changing the style class),
I doubt it should work in Netscape 4. otherwise there are even
more hoops to go through.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #7

Hi - thank you for all of the help so far.

I have now changed it to parent.frames[1].location.href - which works -
not sure why the other way didn't.

However, changeing the cssclass does not -

I had:

toptSearchb.className="mtTabOnB"

...which did not work. I changed it to:

document.getElementById("toptSearchb").className=" mtTabOnB";

...but that still does not work in NN7.

Any ideas?

Thanks and happy new year.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Zheng Da | last post by:
Will the following class work well? If it can not work correctly in some situation, could you help me to fix it? Thank you. //the class will work like the reference in java //when you create a...
5
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your...
0
by: faktujaa | last post by:
XML Comment tags (except summary, remarks, param and returns) don't work in my small trial program. The comment tags i want to work are see, seealso, exception, etc. But none of them work. I tried...
11
by: ricolee99 | last post by:
Hi everyone, I'm trying to invoke my .exe application from a remote server. Here is the code: ManagementClass processClass = new ManagementClass ("\\\\" +"RemoteServerName" +...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
3
by: musosdev | last post by:
Hi guys Okay, I've setup my projects to open and compile fine in VS2005 using FPSE and remote web, but it's *really* slow. So I thought I'd have a go at doing it the normal way, by loading from...
5
by: jacquesvdz | last post by:
Hi Hope you guys can help me with this? I live in a house with 10 people.In the beginning wehn there were only two people, I gave them my password for the use of my pc. But since I got...
1
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database -...
0
by: U S Contractors Offering Service A Non-profit | last post by:
This Sunday the 26th 2006 there will be Music @ Tue Nov Inbox Reply Craig Somerford to me show details 9:54 pm (26 minutes ago) #1St "CLICK" HeAt frOm A blanket...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
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 ...

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.