Solved

how can asp load vbscript variable

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using AJAX to call classic ASP function 4 82
SMS AddAttachment Protocol Error Classic ASP 10 36
sql to convert to date IF entry is in date format 4 74
Time/Date Query 11 37
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 was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

943 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

7 Experts available now in Live!

Get 1:1 Help Now