homepage Welcome to WebmasterWorld Guest from 23.23.22.200
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
access vbscript variable in javascript within .hta file
interstate




msg:4401014
 8:43 pm on Dec 23, 2011 (gmt 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.

 

jalarie




msg:4402471
 8:34 pm on Dec 30, 2011 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved