HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 15th, 2004, 08:48 AM
jacque jacque is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 11 jacque User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 41 m 27 sec
Reputation Power: 0
ASP inside Javascript

I am using ASP inside my javascript and I am having a little trouble calling the value of a combobox. Here is the code inside my javascript tags:

Code:
         <% 	
        Dim i 	
        Dim count 	
        for i = 0 to ubound(ServiceTypes,2) - 1 
        If ServiceTypes(0,i) = request("TrackNum") Then %>
    document.shipInsurance.CarrierCode.options[<%= i %>].value = "<%= ServiceTypes(0,i)%>";
 document.shipInsurance.CarrierCode.options[<%= i %>].text = "<%= ServiceTypes(1,i)%>"; 			
        <% 		
        End If 				
        count = count + 1 			 
        next 	
        %>
         


ServiceTypes is a multidim array that has the values that I want to dynamically add to a combobox. When the program is loaded 'Carrier' combobox is populated with some values (DHL,UPS, FedEx). The 'CarrierCode' comobox is populated with data associated with what is selected in the 'Carrier' combobox. If the user selects a different 'Carrier' the 'CarrierCode' combobox needs to reflect that change. It seems that everything is working like I want it to if I hardcode
Code:
 If ServiceTypes(0,i) = request("TrackNum") Then

with
Code:
If ServiceTypes(0,i) = "DHL" Then

I have tried to use javascript in calling the value but I get an error. How can I do this?

Reply With Quote
  #2  
Old September 15th, 2004, 11:58 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Can you post your code and the error message you get?

MK

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > ASP inside Javascript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway