Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how can asp load vbscript variable

Posted on 2003-12-05
2
Medium Priority
?
319 Views
Last Modified: 2006-11-17
<script language="VBScript" type="text/VBScript">
sub changdishes()
Dim dishes,Fdishes,t,ss
t=""
dishes=Array("pop","dd","sport")
Fdishes=Array("italy","vitam","france","german")
if Document.form1.R_Dishes_Type.value=0 then
for i=0 to ubound(dishes,1)
t=t&"<option>"&dishes(i)&"</option>"
next

msgbox(t)
else
t=Fdishes
end if
end sub
</script>

<input type=button onclick="changedishes">
<select name="dishes" >
t  //is here

i want click button  load vbscript,and then get result "t ",i want to put Result "t" to  my select compnent,how can i
0
Comment
Question by:wlj_sh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Macorc earned 400 total points
ID: 9881693
Seems to me that you are using a server-side script and what you really want is some client-side capabilities ... so you cannot do it this way.

Try with Javascript instead of ASP and give a look at these pages to find out how to update the option list of your select field dynamically:

http://members.blue.net.au/felgall/jstip37.htm

http://www.mattkruse.com/javascript/dynamicoptionlist/source.html

http://www.xs4all.nl/~ppk/js/options.html

or just check this threat on this same site: http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20769881.html
0
 

Author Comment

by:wlj_sh
ID: 9886459
thank you

It's great useful
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question