473,320 Members | 1,950 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,320 software developers and data experts.

unable to get id in javascript function for mozilla 3.6 but working fine for IE.

Expand|Select|Wrap|Line Numbers
  1. function VisibleDiv(obj) {
  2.            if (obj == BaseLog) {
  3.                 var objStyle = document.getElementById('DivCalls').style;
  4.                 if (objStyle.display == "block")
  5.                     objStyle.display = "none";
  6.                 else
  7.                     objStyle.display = "block";
  8.             }
  9.             else if (obj == ViewReports) {
  10.                 var objStyle = document.getElementById('DivReports').style;
  11.                 if (objStyle.display == "block")
  12.                     objStyle.display = "none";
  13.                 else
  14.                     objStyle.display = "block";
  15.             }
  16.             else if (obj ==Management) {
  17.             var objStyle = document.getElementById('DivManage').style;
  18.                 if (objStyle.display == "block")
  19.                     objStyle.display = "none";
  20.                 else
  21.                     objStyle.display = "block";
  22.             }
  23.  
  24. <a href="#" id="BaseLog" class="TextHeader"  onclick="VisibleDiv(this)">Base Log </a>
in the above code is working in IE but not working in mozilla 3.6.
I have checked that obj==BaseLog is not working in the above code.
I have tried many options like
event.srcelement
window.event.srcelement
but all in vain.
when I debug the code ,I found that obj is having complete value for IE but
the same obj is having all the names .ie. the name of tag,id and class for "Base Log" seperated by #. i.e a#BaseLog#TextHeader#
Please suggest what shoud I do?
May 22 '10 #1
2 1794
gits
5,390 Expert Mod 4TB
so what do you really want to check? the obj's id? ... then just use:
Expand|Select|Wrap|Line Numbers
  1. if ( obj.id == 'BaseLog' ) {
  2. }
kind regards
May 22 '10 #2
@anandjuventus
cool.. thanks buddy..
May 22 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: lordslayer | last post by:
Helo! I have a little problem. My whole page (index.html) is based on one big table and an iFrame. In this iFrame one of the pages is a picture-thumbnail page. I found a javascript to open...
0
by: Prescott | last post by:
I want to execute a javascript function that will set a value in the parent window from the child widow where its called and then post the form to the server. I seem to be able to execute one or...
2
by: Jim Hammond | last post by:
The script function in the code below works fine when it is JavaScript, but when I try to use C#, the function doesn't get executed. <body MS_POSITIONING="GridLayout"> <form id="Form1"...
2
by: Sergio Cossa | last post by:
Hello to all! I need to accede to webservice from a Javascript function. I have read on the possibility of using webservice.htc, but Microsoft no lon ger supports it. Can somebody say me how I...
1
by: Andrew | last post by:
Hello, friends, I have a .aspx page, which may change label text based on a user's selection. For example, if a user select Visitor from a drop-down HTML control, corresponding label will be...
1
by: ddtraveller | last post by:
Hello, I have a web page that loads up an xml and an xsl page with javascript and displays it. When the user clicks on a link the table is re-sorted according to date or name, etc. I use the same...
1
by: trevors_decoy | last post by:
Hi, apologies if this sort of query pops up all the time - I did spend a while searching the archives first... My website tries to protect my email address from the spam harvesters by...
1
by: virendral | last post by:
I am using this function it works fine in IE but not in Mozilla function checkALLType(t) { document.getElementById('tik').click(); } for this anchor tag. I call this fucntion from a...
1
by: skyy | last post by:
Hi... i wanted to print some message with javascript. The following works well with IE but the tab was not produced in mozilla... <script language="javascript"> function pritnmsg() { ...
3
by: ravitunk | last post by:
hi..i have a javascript function which uses window.open() function to open another window... as below... <script language ="JavaScript"> function openWin(url) { ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.