Plz give the vb script for the following scenerio.
In travel booking we have to select from delhi to mumbai
from the combobox The prices will be display in another
combo box .But i have to select the lowest price for it and
submit it

Answer Posted / satyanj

<Obj Hierch>.WinComboBox("From").Select "Delhi"
<Obj.Hier>.WinCombobox("TO").Select "Mumbai"
Itmscnt = <Obj.Hier>.WinComboBox("Price").GetItemsCount
val = <obj.Hier>.WinComboBox("Price").GetItem(0)
For itm = 1 to Itmscnt-1
itmval = <Obj.Hier>.WinComboBox
("Price").GetItem(itm)
If cint(Val) < cint(itmval) then
msgbox "Val is less than itmval"
else
val = itmval
end if
Next
msgbox "Lowest price is: "&val
<Obj.Hier>.WinComboBox("Price").Select val
<Obj.Hier>.WinButton("Submit").Click

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is the use of exit do or exit for statements within loops discouraged?

650


How will you get the last occurrence of one string within another string using vbscript?

805


What is the difference between vb debugger and the script debugger?

684


Both Static and dynamic arrays are handled by VB script. Is it true?

699


How can constants be declared in the vbscript language?

647






wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1578


How to create a cookie using vbscript?

683


What are class properties?

743


write any ttest cases using check points and parameterization

1915


How to Enter Values on the Command promt using VB script

1616


What is the difference between a dictionary and an array?

661


What purpose does ‘on error resume next’ serves?

643


What is variant in vb script?

730


Mention what is the main difference between function and sub-procedure?

635


Which operator can be used to check if two numbers are equal or not in vbscript?

760