Invalid argument error in IE

S

shalinmangar

Hi,

I have created two javascript classes in the following way.

//Script tag starts here

function ClassA(textBoxID, objB) {
this.textBox = document.getElementById(textBoxID);
this.objB = objB;

//some other methods
}

function ClassB() {
this.propertyA = "some value";

//some other methods
}

var objA = null, objB = null;

function body_onLoad() {
objB = new ClassB();

objA = new ClassA("aTextBoxID", objB);
}

//Script tag ends here

This approach runs as expected in Firefox but in Internet Explorer, I
get a script error "Invalid Argument" at a line number which contains
the script's closing tag.

Can anybody enlighten me about what may be the problem with this code?

Regards,
Shalin.
 
N

Noah Sussman

When I call body_onLoad() in IE 6, I don't get an error; and objB and
objA both get defined. Perhaps you should post the complete code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top