I'm new to VBscript so there is probably a very simple solution to this.
Basically, I have my main page with buttons that really just act as links to other pages. In the links I wanted to pass information, so I use the standard ?variable=value like so:
<input type="button" name="saveButton" value="Save Systems" onclick="location.href='save.html?step=1'" />
<input type="button" name="loadButton" value="Load Systems" onclick="location.href='load.html?step=1'" />
I looked up how to access GET variables in vbscript and every place I looked said to use Request.QueryString("variableName")
So in my save.html page I'm trying to first print the value of step, just to make sure I'm getting it, before I start actually handling all my code. This is where I'm hung up.
<script type="text/vbscript">
document.write("<p>in the script<br>")
document.write("stepVar = ")
stepVar = Request.QueryString("step")
document.write(stepVar)
document.write(stepVar & "</p>")
</script>
... (rest of the page)
(I tried 2 different print statements just in case I was concatenating incorrectly, but neither work.) When I click my save button on the main page, leading me to save.html?step=1, it prints
in the script
stepVar =
(rest of the page)
So I guess step is coming back null? Is the reason this isn't working because I didn't submit my variable through a form? That shouldn't have anything to do with it... right? Why am I not getting my variable / how can I get the value of "step" so that I can take different actions depending on the value of my variable?