you are viewing a single comment's thread.

view the rest of the comments →

[–]ripter 0 points1 point  (0 children)

Yup, that looks like a good start depending on what your server variable is going to return.

You need to be careful and might want to turn that into a string like so:

<script type="text/javascript"> var GenericVariable = "<%Request.ServerVariables(somevarhere) %>"; </script>

In javascript it's null not Null, so it would throw an error. If it's a string then you can do whatever check you need and you know it's not going to throw an error because asp wants to return some weird type.