Solved

how can asp load vbscript variable

Posted on 2003-12-05
2
306 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
2 Comments
 
LVL 1

Accepted Solution

by:
Macorc earned 100 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

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 information …
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 video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now