for loop and create class using Javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gundam
    New Member
    • May 2010
    • 1

    for loop and create class using Javascript

    I need to use Javascript in classic ASP for a project. However, I seem to have problem using javascript combined with ASP. Here are the questions:
    1) ERROR to create class, see code below:
    Code:
    <%@ Language = JavaScript %>
    <html>
    <body>
    <%
    Class vehicle {
    }
    %>
    </body>
    </html>
    however, I have no problem creating class in pure html javascript. I thought it is because of the version. I am using IE 8 in vista and the javascript version 1.3.

    2) I try to list out querystring using for in loop using javascript instead of vbscript and it doesn't work.
    Code:
    <%@ Language=Javascript %>
    <%
    	var strName = Request.QueryString("textbox3")
    	Response.write (strName)
    
    	for (var strList in Request.QueryString)
    	{
    		Response.write (strList)
    	}	
    %>
    
    
    
    <%@ Language=Javascript %>
    <%
    	for (var strList in Request.QueryString)
    	{
    		Response.write (strList)
    	}	
    
    %>
    Last edited by jhardman; May 19 '10, 12:17 AM. Reason: added code tags. please use code tags in the future
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    let me get this straight, you are writing an ASP page using javascript as the server-side scripting language, right? This has nothing to do with the browser you use, the script should be done and gone by the time the browser gets it. It will be affected by the server version. I assume you are using IIS, which version?

    Jared

    Comment

    Working...