Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if nothing selected geturl 1

Status
Not open for further replies.

thompom

Technical User
Dec 4, 2006
395
GB
hi,

have a combo - when an option is selected and a search button is clicked it goes to a page, however if nothing is selected i want it to go to another url

this is the code for the button

thanks MG

Code:
on(release)
{
makeselect = makecombo.selectedItem;
priceselect = pricecombo.selectedItem;
                   
if (makeselect.data == "undefined") {
getURL("3coltemp.asp?pagesetupid=2&cmd=resetall", "_self");
} else {
getURL("3coltemp.asp?pagesetupid=2&x_make="+ makeselect.data +"&z_make=%3D%2C%27%2C%27&x_price="+priceselect.data, "_self"); 
}
}
 
if (makeselect.data == undefined) {

no quotes around undefined as its not a string
 
thanks v much
can you tell me why i get this error

Code:
**Error** Symbol=page 1, layer=searchbut, frame=1:Line 17: Left side of assignment operator must be variable or property.
     if (priceselect.data = undefined && makeselect.data = undefined) {

on this line

Code:
if (priceselect.data = undefined && makeselect.data = undefined) {
usedurl = usedurl + "&cmd=resetall"
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top