By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

for loop and create class using Javascript

P: 1
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:
Expand|Select|Wrap|Line Numbers
  1. <%@ Language = JavaScript %>
  2. <html>
  3. <body>
  4. <%
  5. Class vehicle {
  6. }
  7. %>
  8. </body>
  9. </html>
  10.  
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.
Expand|Select|Wrap|Line Numbers
  1. <%@ Language=Javascript %>
  2. <%
  3.     var strName = Request.QueryString("textbox3")
  4.     Response.write (strName)
  5.  
  6.     for (var strList in Request.QueryString)
  7.     {
  8.         Response.write (strList)
  9.     }    
  10. %>
  11.  
  12.  
  13.  
  14. <%@ Language=Javascript %>
  15. <%
  16.     for (var strList in Request.QueryString)
  17.     {
  18.         Response.write (strList)
  19.     }    
  20.  
  21. %>
May 18 '10 #1
Share this Question
Share on Google+
1 Reply


jhardman
Expert 2.5K+
P: 3,405
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
May 19 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.