473,403 Members | 2,222 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,403 software developers and data experts.

Javascript issue on ie

Expand|Select|Wrap|Line Numbers
  1. Varien.Tabs = Class.create();
  2. Varien.Tabs.prototype = {
  3.   initialize: function(selector) {
  4.     var self=this;
  5.     $$(selector+' a').each(this.initTab.bind(this));
  6.   },
  7.  
  8.   initTab: function(el) {
  9.       el.href = 'javascript:void(0)';
  10.       if ($(el.parentNode).hasClassName('active')) {
  11.         this.showContent(el);
  12.       }
  13.       el.observe('click', this.showContent.bind(this, el));
  14.   },
  15.  
  16.   showContent: function(a) {
  17.     var li = $(a.parentNode), ul = $(li.parentNode);
  18.     ul.select('li', 'ol').each(function(el){
  19.       var contents = $(el.id+'_contents');
  20.       if (el==li) {
  21.         el.addClassName('active');
  22.         contents.show();
  23.       } else {
  24.         el.removeClassName('active');
  25.         contents.hide();
  26.       }
  27.     });
  28.   }
  29. }
  30. new Varien.Tabs('.tabs');


I am facing problem. I have written above code.



In FireFox and IE8 it works but in IE6-7 it gives me following error.

parent node is null
Jul 8 '11 #1
0 1058

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

Similar topics

9
by: Joe | last post by:
I'm trying to create an image preview function so that my users can preview images before they upload them. I've got my example working locally on both Firefox and IE, and from the webserver in IE....
6
by: btknorr | last post by:
The following html and javascript combination fails to execute in Internet Explorer...does anyone know why? If you change the input's attribute "name" to anything other than "item" it works just...
9
by: krismath | last post by:
Hi, I wrote this function to check the validity of the text field, StudentID if a radio button associated with it is clicked. The function does not work... function checkValidity(this) { //...
6
by: kenundrum | last post by:
Hey all, I am having an issue with XML/XSLT and JavaScript in my ASP.NET page that I am creating. I first want to apologize if i placed this in the wrong category. Since there were three different...
4
by: JimmyGiraffe | last post by:
I have some javascript written for a dropdown menu that works fine if my page is an html page, but if I save it as an aspx page it messes up. I'm using an asp grid view control, so I need it to be...
1
by: finco | last post by:
Hi all - can someone please point me in the right direction. I have pages that launch their javascript components fine if the page is loaded on its own. But when the page is loaded AJAX the...
0
by: jollyguy77 | last post by:
Hi, I am using xml to bind all the files that is present in a directory to a tree control. While doing so, if there is a file that has two blank spaces like........"Te st.txt". When i try...
1
by: a.bavdhankar | last post by:
Hi, Newbie Question: Applicable to dotnet 2.0 I am getting javasacript error message as Expected ')' but all script works fine on other machine. There is no syntax error in the script but...
1
by: bumble | last post by:
Hi Everyone I have very little knowledge of Javascript or any other language and have built the basics of my website using Dreamweaver. I have built in extra functions just by trying to follow the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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.