Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Invalid argument error in IE

Reply
Thread Tools

Invalid argument error in IE

 
 
shalinmangar
Guest
Posts: n/a
 
      08-10-2006
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.

 
Reply With Quote
 
 
 
 
Noah Sussman
Guest
Posts: n/a
 
      08-10-2006
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?


shalinmangar wrote:
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument" Java Guy Javascript 1 10-15-2006 08:41 PM
How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument" Java Guy Java 1 10-15-2006 08:31 PM
ICallbackEventHandler and "Invalid postback or callback argument" error matsla@hotmail.com ASP .Net 2 06-27-2006 05:30 PM
ICallbackEventHandler and "Invalid postback or callback argument" error Martin ASP .Net 3 06-15-2006 01:56 PM
Got an error :Invalid postback or callback argument nitin.bajaj@rediffmail.com ASP .Net 0 11-16-2005 06:42 AM



Advertisments