Page 1 of 1

address in local or global not working?

Posted: Wed Jun 24, 2015 8:52 pm
by sphere
Hi,

just a short question which i don't understand.

Why is this working

Code: Select all

put URL "http://website/script.php" into varResults
and this not

Code: Select all

put quote & gIP & "/script.php" & quote into tGetshow
answer tGetshow
put URL tGetdata into varResults
i created a field where a user can input the webaddress or IP address, that is put into gIP
the answer command is giving me the correct address with quotes

So you might think it is correct
but the put URL command does not put the received information into varResults but the webaddress
in better words, the results should be put in a field, but instead of the result the webaddress is shown

so http:// is known and also the scriptname.php is known
just the address or IP address can change

can anyone help me in the right direction?

thanks very very much!

Re: address in local or global not working?

Posted: Wed Jun 24, 2015 8:56 pm
by FourthWorld
URLs don't include quotes. LiveCode needs those when putting the things between the quotes into a variable, but the variable itself should not include them.

Re: address in local or global not working?

Posted: Wed Jun 24, 2015 9:04 pm
by sphere
wow ! that was blazingly simple .....
I was thinking tooooooooooooooooooooooo difficult

i removed the quotes and it worked :) :D :mrgreen:

Thanks a lot FourthWorld! --> Richard !