PDA

View Full Version : Can you Correct this code for me plz ...


melissa
06-20-2009, 10:22 AM
hi every one

i have 1 listbox with 2 item on it and 1 combobox also with 2 item on it

when i choose 1 item from the listbox and 1 item from a combobox and i press

the button a web site will open

and i am using this code :

selectedsite = ListBox.GetSelected("site");

selectedservice = ComboBox.GetSelected("service");
address = "";

if (selectedsite == 1) then

if (selectedservice == 1) then
File.OpenURL("http://www.google.co.uk", SW_SHOWNORMAL);

elseif (selectedservice == 2) then
File.OpenURL("http://www.yahoo.co.uk", SW_SHOWNORMAL);

elseif (selectedservice == 3) then
File.OpenURL("http://www.altavista.com", SW_SHOWNORMAL);

elseif (selectedservice == 4) then
File.OpenURL("http://www.yahoo.fr", SW_SHOWNORMAL);
end
end

can you corect it from me please

or the project is attached with this post with no code

longedge
06-20-2009, 12:40 PM
I'm not quite sure why you have both a listbox and combobox but is it something like the amended example that you want ?