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"...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.