Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: open

Message Too Old, No Replies

access vbscript variable in javascript within .hta file

     
8:43 pm on Dec 23, 2011 (gmt 0)

New User

joined:Dec 23, 2011
posts:1
votes: 0


I need to get javascript to recognize a vbscript variable and it's currently not working for me within an HTA application.


<script type="vbscript">

Dim variable
variable = test

</script>

<script type="text/javascript">

var variable = <%= variable%>;

</script>


The code above doesn't carry the original vbscript variable over. I've also tried


var variable = '<%= variable %>';


However this just populates the value within the quotes into the javscript variable

Any help would be appreciated. Thank you.
8:34 pm on Dec 30, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:June 17, 2003
posts: 159
votes: 0


Perhaps you could use VBScript to store it in a hidden form field and then retrieve it in JavaScript.