Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1248 | Replies: 3
![]() |
•
•
Join Date: Mar 2007
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Hi All.
Do any body know how to call built in function of object like substr from overridden version. I am trying following example but the function called itself recursively not the function being overridden.
String.prototype.substr= function(str)
{
return str.substr(0,5);
}
I shall be very thankful if some one could give me some hints.
Sultan Wadood.
Do any body know how to call built in function of object like substr from overridden version. I am trying following example but the function called itself recursively not the function being overridden.
String.prototype.substr= function(str)
{
return str.substr(0,5);
}
I shall be very thankful if some one could give me some hints.
Sultan Wadood.
I don't think its possible to revert to the old function unless you save it somewhere.
eg:
eg:
String.prototype._substr = String.prototype.substr;
String.prototype.substr= function()
{
return this._substr(0,5);
} www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode