R
Robert Hogan
Hello,
These are probably a silly questions but I can't get my head around
what is going wrong with this...
I have a asp page, which is primarily written in VBScript (I come from
a VB background so for the moment it's easier to do most of it in
vbscript, I will use JScript when I have some spare time to learn more
about it).
However I'm using bits of Java script in the code to achieve certains
things Eg,
onchange="javascript:document.forms[1].submit();"
which works fine. However I want to set a hidden input value on the
click of the button so I tried using
<form name="GlossaryForm" action="glossary.asp" method="put">
<input type="button"
onclick="javascript:document.GlossaryForm.GetResults.value=True;document.forms[1].submit()"
value="Get Results!">
<input type="hidden" name="GetResults" value="false">
</form>
THere is some vbscript at the beginning of the page that gets the
hidden value and redirects the page accordingly. The problem is that
the button click produces an error and doesn't set the hidden value.
The other weird thing that I noticed while I was trying various things
was that when I did the following,
<html>
<SCRIPT LANGUAGE="Javascript">
vartest = "Hello"
Response.Write("HEllo")
</SCRIPT>
<%
response.write vartest & " World"
%>
</html>
All I get is the " World", Does this mean that you can't pass
variables between JScript and VBScript at all? I guess this makes
sense but why doesn't the response.write in the JScript section
produce any result?
Hope this muddled mess of a post makes sense, I've been staring at
this screen to long trying to get this to work - Please help!
Thanks in advance,
Bob.
These are probably a silly questions but I can't get my head around
what is going wrong with this...
I have a asp page, which is primarily written in VBScript (I come from
a VB background so for the moment it's easier to do most of it in
vbscript, I will use JScript when I have some spare time to learn more
about it).
However I'm using bits of Java script in the code to achieve certains
things Eg,
onchange="javascript:document.forms[1].submit();"
which works fine. However I want to set a hidden input value on the
click of the button so I tried using
<form name="GlossaryForm" action="glossary.asp" method="put">
<input type="button"
onclick="javascript:document.GlossaryForm.GetResults.value=True;document.forms[1].submit()"
value="Get Results!">
<input type="hidden" name="GetResults" value="false">
</form>
THere is some vbscript at the beginning of the page that gets the
hidden value and redirects the page accordingly. The problem is that
the button click produces an error and doesn't set the hidden value.
The other weird thing that I noticed while I was trying various things
was that when I did the following,
<html>
<SCRIPT LANGUAGE="Javascript">
vartest = "Hello"
Response.Write("HEllo")
</SCRIPT>
<%
response.write vartest & " World"
%>
</html>
All I get is the " World", Does this mean that you can't pass
variables between JScript and VBScript at all? I guess this makes
sense but why doesn't the response.write in the JScript section
produce any result?
Hope this muddled mess of a post makes sense, I've been staring at
this screen to long trying to get this to work - Please help!
Thanks in advance,
Bob.