include and <script>

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?
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top