Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Supporting arguments.length on IE v5 and below

Functions

Supporting arguments.length on IE v5 and below

by  BillyRayPreachersSon  Posted    (Edited  )
Support to query arguments.length was only introduced in IE 5.5. To support it in versions prior to v5.5, this code will set the arguments.length property for you.

Code:
if (typeof(arguments.length) == 'undefined') {
    var argCount = 0;
    while (typeof(arguments[argCount]) != 'undefined') argCount++;
    arguments.length = argCount;
}

Dan


[link http://www.coedit.co.uk/][color #00486F]Coedit Limited[/color][/link][color #000000] - Delivering standards compliant, accessible web solutions[/color]

[tt]Dan's Page [blue]@[/blue] Code Couch
http://www.codecouch.com/dan/[/tt]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top