Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Should be getting my book, Programming LiveCode for the Complete Beginner in about a week.
In the meantime...I'm still having issues wrapping my head around a good portion of LC. Example below, in which I'm having issues and don't see where I'm going wrong.
on mouseUp
if fld fldEmail = "fldEmail" then // i have an input box named fldEmail and in my db i have the same field with an email in it.
go to stack url "http://domain/1.livecode"
else
go to stack url "http://domain/5.livecode"
end if
end mouseUp
There is nothing syntactically wrong with your handler, though I would always put object references in quotes (fld "fldEmail")
The handler did not download a stack, though. Is that what you are asking about? The dictionary states that:
If you specify a URL, the stack is downloaded from that URL and displayed. The stack must be in stack file format (that is, not compressed or archived). Stacks opened in this way are treated as unsaved stacks; the long name of such a stack is the same as its abbreviated name, until the stack is saved on a local disk. The downloaded stack is a copy: changes you make to the stack are not automatically made on the server the stack came from. To change the stack on the server, you must save the stack file locally and re-upload it.
on mouseUp
if fld "fldEmail" is "fldEmail" then
go to stack url "http://domain/1.livecode"
else
go to stack url "http://domain/5.livecode"
end if
end mouseUp
It might work - or not!
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
on mouseUp
if fld "fldEmail" is "fldEmail" then
go to stack url "http://domain/1.livecode"
else
go to stack url "http://domain/5.livecode"
end if
end mouseUp
It might work - or not!
Same thing. Always goes to 1.livecode. No matter what the email. In the database I have two different emails, one for each card. Doesn't matter what I put in the field always 1.livecode.
Hi, try adding an extra field "EmailfromDatabase" so you can see better what is being retrieved from the database then compare the two fields.
on mouseUp
put fldEmail into fld "EmailfromDatabase" // add new field for testing so that you can see what is actually being retrieved from the database.
if fld "fldEmail" = fld "EmailfromDatabase" then // i have an input box named fldEmail and in my db i have the same field with an email in it.
go to stack url "http://domain/1.livecode"
else
go to stack url "http://domain/5.livecode"
end if
end mouseUp
All the time you are checking the content (text) of your field "fldEmail" againt the STRING (text) "fldEmail"
but you aren't referencing the actual value from that field in your database!