Solved

how can asp load vbscript variable

Posted on 2003-12-05
2
314 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

710 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