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!

Search results for query: *

  1. isporter

    functions in a <script runat=server> work, but not variables - why?

    A more informative example: 4:undefined2: undefined3:local1global Is produced by the following code: ------------------------------------------------------- <%@ language="javascript"%> <script language="javascript" runat="server"> var global = 'global'; Response.Write('1' + global)...
  2. isporter

    functions in a &lt;script runat=server&gt; work, but not variables - why?

    You can, yes - so long as you don't call server specific object (i.e. Response) on the client-side, or client-specific objects (i.e. document) on the server, there's no reason you can't use the same code, because it's the same language. So you might define a general object that you include in...
  3. isporter

    functions in a &lt;script runat=server&gt; work, but not variables - why?

    I'm trying to do this because I want to declare classes in a .js file that I can then include on both the Server and Client sides. Thus, I can write HTML on the server side (readable by search engines), and update that HTML client-side, using the same class definition. Is there a way I can do...
  4. isporter

    functions in a &lt;script runat=server&gt; work, but not variables - why?

    Hi Chopstik, I'm not sure that's valid - why would a string suddenly require use of a value property to access it's value? I tested your suggestion to be sure, but no luck! Thanks anyway. Any other thoughts?
  5. isporter

    functions in a &lt;script runat=server&gt; work, but not variables - why?

    Hi, throw the following example into a text file, save with an ASP extension, and execute it in IIS6/7. Can anyone explain why Test 1 works fine, and Test 2 returns undefined? Is it something to do with variable scope? Thanks, Iain <%@ language="javascript"%> <script type="text/javascript"...
  6. isporter

    Help with AJAX and Authentication

    I'm developing an eCommerce application. A page's content is written to the page from the server, to ensure the search engines see it. On the client-side, I add event handlers to various elements on the page. Some of these event handlers should only be present if the user is logged in - i.e...
  7. isporter

    &lt;script runat=server&gt;&lt;/script&gt; produces vars being undefined - why?

    Lee, thanks for your response. I'm concerned I didn't make myself clear, so let me expand. Assume a test.js file with function Product () {} in it. You can include this script in an ASP page as follows: <%@ language="javascript"%> <script language="Javascript" src="test.js"...
  8. isporter

    &lt;script runat=server&gt;&lt;/script&gt; produces vars being undefined - why?

    I plan to create an object in a javascript file, and then use that object and it's methods on both the server and the client side. Assume an ASP file with the code 'var product = new Product();' The following declaration in the javascript file works fine: function Product () {} function...
  9. isporter

    OOP, object literal notation, and the 'new' operator

    Adam, cheers for responding to my question. I'm not entirely sure what I want, but let me explain: I have an application, with various functionalities. Thus, I have: application={ interfaceCount:0, init: function() { } registration: { init: function() { }...
  10. isporter

    OOP, object literal notation, and the 'new' operator

    parent is not a reserved word, although apparantly it is best to avoid it, as it may be a name of a client-side object, method, or property in Netscape Navigator or Internet Explorer (http://www.javascripter.net/faq/reserved.htm). However, if I change the identifier, I still don't understand...
  11. isporter

    OOP, object literal notation, and the 'new' operator

    How do you have multiple child objects of a parent object? Consider the following object declaration: var parent={ childCount: 0, child: { id:false, init: function() { alert(this.id); parent.childCount++; this.id = parent.childCount...

Part and Inventory Search

Back
Top