| | |
Best way to check a condition?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2007
Posts: 7
Reputation:
Solved Threads: 0
What would be the best way to check and see if 27 diff conditions were true before executing a statement? This is the code block I'm needing to add this to. The var objAddress.CountryCode needs to have 27 poss values that the code should be checking before executing.
if not isnothing(objGW) then
if objGW.Load(objToken, objShipGateway.ShipGateway_ID) then
if objAddress.CountryCode <>"AR" then
if objGW.Activated then
'get services and output here'
xmlShipRates = objGW.RateShop(objToken, objShipment)
colRates = xmlShipRates.documentElement.selectNodes("Service")
if colRates.Count > 0 AND objShipGateway.Name = "UPS" then
blnOnlineUPS = True
end if
for each objRate in colRates
sServiceName = cbXML.GetElementValue(objRate, "ServiceName")
if (not blnOnlineUPS) And (Left(sServiceName,4) = "UPS ") then
sServiceName = sServiceName & "**"
blnCustomUPS = True
end if
Response.Write("<input type=radio")
if Not bFoundShipper Then
Response.Write(" checked")
bFoundShipper = True
End If
Response.Write(" name=selShipMeth" & i & " value=""" & objShipGateway.ShipGateway_ID & "|" & cbXML.GetAttributeValue(objRate, "Code") & "|" & Replace(sServiceName,"""",""") & """>" & sServiceName & " (" & cbLocale.FormatCurrency(cbXML.GetElementValue(objRate, "Rate"), objStore.Currencies.DefaultItem) & ") <br>" & vbcrlf)
next
end if
end if
objGW.Dispose()
end if
objGW = nothing
end if
if not isnothing(objGW) then
if objGW.Load(objToken, objShipGateway.ShipGateway_ID) then
if objAddress.CountryCode <>"AR" then
if objGW.Activated then
'get services and output here'
xmlShipRates = objGW.RateShop(objToken, objShipment)
colRates = xmlShipRates.documentElement.selectNodes("Service")
if colRates.Count > 0 AND objShipGateway.Name = "UPS" then
blnOnlineUPS = True
end if
for each objRate in colRates
sServiceName = cbXML.GetElementValue(objRate, "ServiceName")
if (not blnOnlineUPS) And (Left(sServiceName,4) = "UPS ") then
sServiceName = sServiceName & "**"
blnCustomUPS = True
end if
Response.Write("<input type=radio")
if Not bFoundShipper Then
Response.Write(" checked")
bFoundShipper = True
End If
Response.Write(" name=selShipMeth" & i & " value=""" & objShipGateway.ShipGateway_ID & "|" & cbXML.GetAttributeValue(objRate, "Code") & "|" & Replace(sServiceName,"""",""") & """>" & sServiceName & " (" & cbLocale.FormatCurrency(cbXML.GetElementValue(objRate, "Rate"), objStore.Currencies.DefaultItem) & ") <br>" & vbcrlf)
next
end if
end if
objGW.Dispose()
end if
objGW = nothing
end if
![]() |
Similar Threads
- how to select null values in condition (MySQL)
- wat is flag??pls...can someone explain it to me!! (C)
- newbie c++ help (C++)
- help me out!!!!!!!!! (C)
- getting a "missing operating system" please help!!!! (Troubleshooting Dead Machines)
- how to display value to textbox (HTML and CSS)
- Windows XP Plug N Play problem (Windows NT / 2000 / XP)
- plz tell me wherez my mistake in dis program!! (C++)
Other Threads in the HTML and CSS Forum
- Previous Thread: windows script host - help me pls
- Next Thread: login control
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





