T
Tumurbaatar S.
I added some methods to the String object like this:
String.prototype.custom_method = function()
{
....
}
and use them both at a server and a client side. A server script
uses include directive and client one - <SCRIPT...SRC="...">.
But this way requires to maintain 2 files which are almost identical.
So to use only one file, I included server side file with <SCRIPT...
SRC="..." RUNAT=SERVER>. In this case above prototype functions
causes JScript error like 'the object has not this method'. The other
functions and variables in this file have no problem. Why?
String.prototype.custom_method = function()
{
....
}
and use them both at a server and a client side. A server script
uses include directive and client one - <SCRIPT...SRC="...">.
But this way requires to maintain 2 files which are almost identical.
So to use only one file, I included server side file with <SCRIPT...
SRC="..." RUNAT=SERVER>. In this case above prototype functions
causes JScript error like 'the object has not this method'. The other
functions and variables in this file have no problem. Why?