Hello,
I've got a trouble with my script, i want to show a <div> on Netscape
and it doesn't work:
Here is the script
//navigators identification
var ie4=(document.a ll && !document.getEl ementById)? true:false
var ie5=(document.a ll && document.getEle mentById)? true:false
var n4=(document.la yers)? true:false
var n6=(!document.a ll && document.getEle mentById)? true:false
// creation of three div
var links=3;
var floatinglinks=n ew Array("Flats", "leisures", "Rate");
//function which hides all the div
function menu(number)
{
for (i=0; i<links;i++)
{
if(ie4||ie5)
{
document.all[floatinglinks[i]].style.visibili ty="hidden";
}
else if(n4)
{
document.layers[floatinglinks[i]].visibility="hi de";
}
else if(n6)
{
document.getEle mentById[floatinglinks[i]].style.visibili ty="hidden";
}
}
// showing the div thanks to "number"
if(ie4||ie5)
{
document.all[floatinglinks[number]].style.visibili ty="visible";
}
if(n4)
{
document.layers[floatinglinks[number]].visibility="sh ow";
}
if(n6)
{
document.getEle mentById[floatinglinks[number]].style.visibili ty="visible";
}
}
</script>
*************** **** end of the script********* *************
Then in the body:
Access to the function in the menu with "onclick"
<td> <im g src="images/bouton_off.jpg" id="bouton_1" alt="flats"
title="flats"/> <a id="flats" class="orange" href="#"
onclick="menu(0 )">Flats</a></td>
One on the div to show
<div id="flats" style="position :relative; z-index:2; left:106px;
top:-395px;
width:250px; height:150px; visibility: hidden;">
<!--contenu-->
</div>
Here is the probleme the div doesn't work on Netscape and the
Javascript console says :
document.getEle mentById[floatinglinks[i]] has no properties
What should i change in the script or in the body ?
Thanks for your answers !
Telemak. 6 1393
I haven't looked at your code at all, except to note that
you have two different capitalizations for Flats/flats. var floatinglinks=n ew Array("Flats", "leisures", "Rate"); <div id="flats" style="position :relative; z-index:2; left:106px; top:-395px; width:250px; height:150px; visibility: hidden;">
HTH,
Csaba Gabor
Ok there is a big mistake but even i change the Flats into flats it
doesn't work anymore.
What should i do ?
thanks for your answer .
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Ok there is a big mistake but even i change the Flats into flats it
doesn't work anymore.
What should i do ?
thanks for your answer .
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Telemak wrote: Hello, I've got a trouble with my script, i want to show a <div> on Netscape and it doesn't work:
<snip>
document.getEle mentById[floatinglinks[number]].style.visibili ty="visible";
^ ^
document.getEle mentById(floati nglinks[number]).style.visibil ity="visible";
use parenthesis, not square brackets, with getElementById( ...)
<snip>
<div id="flats" style="position :relative; z-index:2; left:106px; top:-395px; width:250px; height:150px; visibility: hidden;">
Are you sure the div will be visible with "top:-395px;", maybe for
testing purposes set top:0; left:0; you've got things working.
Good Luck,
Mike
Hi,
Which Netscape? 4.x or 6?
For older Netscape you'll have to write <layer></layer>.
<div></div> doesn't get a look at <div></div>.
I cretaed a js file http://www.caoxuan.com/cxk/webart/goodies/laydiv.js
Just to modify the layers and divs for different objects. http://www.caoxuan.com/cxk/webart/go...ndexDhtml.html
Kien
gui bus <bu*****@free.f r> wrote in message news:<40******* **************@ news.frii.net>. .. Ok there is a big mistake but even i change the Flats into flats it doesn't work anymore.
What should i do ?
thanks for your answer .
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
mscir <ms***@access4l ess.com.net.org .uk> wrote in message news:<10******* ******@corp.sup ernews.com>...
Thanks for your help Mike, with parenthesis it works perfectly !!
Sincerly
guillaume. Telemak wrote: Hello, I've got a trouble with my script, i want to show a <div> on Netscape and it doesn't work: <snip> document.getEle mentById[floatinglinks[number]].style.visibili ty="visible"; ^ ^ document.getEle mentById(floati nglinks[number]).style.visibil ity="visible"; use parenthesis, not square brackets, with getElementById( ...)
<snip>
<div id="flats" style="position :relative; z-index:2; left:106px; top:-395px; width:250px; height:150px; visibility: hidden;">
Are you sure the div will be visible with "top:-395px;", maybe for testing purposes set top:0; left:0; you've got things working.
Good Luck, Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lizzy |
last post by:
I have an internet application which has a progress bar show whenever
the customer is requesting data from the server. This progress bar is
coded to work in both Netscape 4.75 and above and IE 5.0 and above.
The progress bar code is written in javascript in an external js file
(progressbar.js). The web screen is in a seperate jsp file
(Registration.jsp). The problem I'm having is that the progress bar is
not showing in Netscape 4.75 on a...
|
by: Whitney |
last post by:
On the left side of the main webpage I have some menu options that
have a drop-down feature that is controlled with javascript. You click
on the main heading and the links for that section show up. Click on
it again and they disappear. This works great in IE6 but doesn't seem
to work in Netscape 7.
I have included the main javascript code below, along with a sample of
the Menu code. What (if anything) do I need to tweak to get this to...
|
by: mscir |
last post by:
I was calling a function in a js file from an image onClick event, but
someone still using Netscape 4 (!) complained that it didn't work. I
read that img onClick doesn't work in Netscape 4, so swithced it to
"javascript:show(...);" and the code works, but I read in this group
that it was not wise to do that, here's the working version, using the
not recommended approach:
<a href="javascript:show('art_2.jpg','600','448');" target="_self">...
|
by: Dennis |
last post by:
This may be easy for most but I can't get this thing to work. I
believe I followed all the instructions but when I click on the link
no window opens just the default IE page cannot display. Here is
exactly what I entered in the link dialog:
<a
href="javascript:popImage('http://www.sambuccibros.com/carseat.jpg','New
Car Seat')">
Is this my problem? Please help.
|
by: Max |
last post by:
This instruction don't work in netscape 6
<script language="javascript" src="/pippo.js"></script>
In 4.8 /ie5/ie6 ok !!!
Can you help me ?
Thanks
| |
by: TIBM |
last post by:
Hi. I've posted this question on another newsgroup, but I haven't received any answers..
I have a login page where users input userID and password and click a Login button. Before calling the login functions, I have to check the user ID and the password for invalid data. It works well in IExplorer, but it doesn't show the validation summary (displayed in a Javascript alert box) in Netscape.
This is what I have in the asp page:
...
|
by: Don Munroe |
last post by:
This one has me stumped. I have three web applications running on two
different servers. The first that works fine is hosted by a .Net hosting
company. Everyone that uses it has no problems hitting the site. The other
two applications are running on my personal server which has Windows 2003,
IIS 6, and .Net 1.1
Most of my users can use the sites. Two have come up with a very strange
problem. They try to go to either application and...
|
by: DJG79 |
last post by:
Hi all,
I am using an open source menu that i found and it works great, except
for one thing that when the web page is not scrolled to the very top
the drop down links will not stay visible. Has anyone else had this
sort of problem with javascript? and any ideas how to fix it would be
greatly appreciated..
I have included a copy of the code below, thanks.
/**
|
by: oranoos3000 |
last post by:
hi
would you please help me
i have a online shopping center that i show pictures of the my product in home page.
in the InterExplorer pictures is shown correctly but in Firefox browser is shown properties alt in img tag istead of picture .
place of the pictures is saved in the database(my database is with mysql)
and in home page i fetch properties of the product and address of place that pictures is located
output of the code in the...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |