Syntax problem
Varen Swaab
varen at veggio.com
Fri May 6 01:50:45 EDT 2005
Thanks Sarah
I don't think I understand your reply. The variable "theLink" holds a
well-formed url. I'm looking to add to that url by adding the contents of
another variable "subID"
Example:
variable theLink holds "http://www.google.com"
variable subID holds a number such as "44568"
I'm looking for a way to combine both variables so the result is:
http://www.google.com/44568
I have been trying to combine the values of both the variables like this:
get URL(&theLink&"/"&subID&)
and nothing will work that I've tried. Given the fact that all the other
code in my example works fine and all I want to do is append an existing url
with the variable subID I thought the code would work as my example above.
In your example you're showing how to match a url sting and a variable but
I'm trying to combine two variables, one of which holds a url and the other
a number. I have no idea of the correct syntax to do that.
Thanks for helping.
Varen
On 5/5/05 9:59 PM, "Sarah Reichelt" <sarahr at genesearch.com.au> wrote:
>> I'm trying to create a url to connect to an http server. If I use this
>> code:
>>
>> get theLink
>>
>> then, everything works fine. The variable "theLink" contains a fully
>> formed
>> url such as:
>>
>> "http://www.server.com/path/path.
>>
>> I'm trying to extend this url by adding the value of another variable
>> "subID" which is entered by the user. This additional value needs to be
>> added to the original url without breaking it and then initiate a get
>> command.
>>
>> So, the end result will be:
>>
>> http://www.server.com/path/path/uservalue
>>
> OK, I see now. What you need to do is work out the exact URL that you
> would need if entering it into a browser address.
> For example, to search Google for RunRev, you need the following URL:
> <http://www.google.com/search?q=RunRev>.
> If I was allowing a user to do a Google search by clicking on a linked
> word or phrase in a field from my program, I would have something like
> this:
>
> on linkClicked pLink
> put "http://www.google.com/search?q=" & URLencode(pLink) & ">" into
> tURL
> get tURL
> -- do stuff with it
> end linkClicked
>
> Test the links in a browser first and look at the address bar to see
> the exact format that the particular site needs. Have you script "put"
> the text it is going to use for getting the URL and keep testing that
> text in a browser until it does what you want. Then switch to using Rev
> to "get" the page.
>
> Cheers,
> Sarah
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
> Varen Swaab
More information about the use-livecode
mailing list