• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with ASP and JavaScript

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using JavaScript as the server-side scripting language for ASP. I am difficulties where on the server side I am comparing the value of a variable to be "" or "undefined".
var myFirst = Request.QueryString("Name");
<%
if(typeof(myFirst) != "undefined")
{}
%>
It is entering inside the if loop anyways, even if it is having no values in the query string.
I am being advised to use VBScript for server-side scripting rather than JavaScript?
Will it be more advantageous to do so?
Thanks in advance.
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the literal string "undefined" != undefined
you can use undefined without the quotes as long as undefined is ....not defined
ie
var undefined //do not do this,defines undefined
On the server I would use vbscript and I really like jscript.I am going to use vbscript one more time then make the move to C#
Charlie
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic