| Author |
Can I get a VBScript generated value in my JSP code?
|
Mark Lau
Ranch Hand
Joined: Dec 15, 2001
Posts: 120
|
|
Say, I have a VBScript code like this in my JSP file: <HTML> <HEAD> <TITLE>A VBScript Test</TITLE> <SCRIPT language="VBScript"> <!-- ' Declare a string. Dim strN ' Build the strN. strN = "A string of no meaning" --> </SCRIPT> </HEAD> Can I get the value of the string strN outside the VBScript code? Following the above code, I tried this: <body> <H3>See if we can get strN defined in the VBScript code</h3> <h5>The string is: <%= strN %></h5> </body> </HTML> It did not work. The compiler says that strN is not defined, and this is true in the JSP part of this file. So, how can I get the value of strN outside the VBScript code please? Thanks a lot!
|
 |
Yuriy Fuksenko
Ranch Hand
Joined: Feb 02, 2001
Posts: 411
|
|
Only on a next turn Your java running on a server, VBScript - in a browser. The order is, dependless of their order in a text, java first, vb second. So, if you generated value with VB, you need to submit it to a server - with a form, for example, and this is where it will be used. So you could either reload a page, or You can use a frame (or iframe), wich will be invisible, to submit a request with your value to a certain servler or jsp. This servlet or jsp could produce vbscript (or javascript), that will change content of your page.
|
 |
 |
|
|
subject: Can I get a VBScript generated value in my JSP code?
|
|
|