[FX.php List] Encoding a link so that it'll process...
Bob Patin
bob at patin.com
Fri Jul 15 10:16:15 MDT 2016
I couldn’t find on that worked…
B
Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: bobpatin at me.com
Twitter: bobpatin
—
FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting
> On Jul 15, 2016, at 10:02 AM, Chris Hansen <chris at iViking.org> wrote:
>
> You'd have to do functionality like adding a bookmark on the users' side (with Javascript, for example.) The difficulty is that browsers are (justifiably) very careful about what javascript is allowed to do, so things that used to work are disabled over time. That said, here's a stack overflow Q&A where people have been working on a variation of what you're talking about:
>
> http://stackoverflow.com/questions/10033215/how-do-i-add-an-add-to-favorites-button-or-link-on-my-website <http://stackoverflow.com/questions/10033215/how-do-i-add-an-add-to-favorites-button-or-link-on-my-website>
>
> HTH
>
> --Chris
>
>> On Jul 14, 2016, at 6:04 PM, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
>>
>> Well... I finally got it by replacing spaces with a pipe and then replacing them BACK when the user uses the link...
>>
>> Not sure why it didn't work before but it's working now... :)
>>
>> If you go to tirms.longtermsolutions.com <http://tirms.longtermsolutions.com/>, then click on SEARCH, and then select a company with a 2-word name, you'll see the results and then a link that you can copy. I wish there were a way that I could let users save a bookmark from this link--is there any way to do that in PHP? I'm thinking not...
>>
>> Thanks,
>>
>> Bob
>>
>> Bob Patin
>> Longterm Solutions
>> bob at longtermsolutions.com <mailto:bob at longtermsolutions.com>
>> 615-333-6858
>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>> http://www.longtermsolutions.com <http://www.longtermsolutions.com/>
>> -
>> iChat: bobpatin at me.com <mailto:bobpatin at me.com>
>> Twitter: bobpatin
>> —
>> FileMaker Consulting
>> FileMaker Hosting for all versions of FileMaker
>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>
>>> On Jul 14, 2016, at 7:01 PM, Chris Hansen <chris at iViking.org <mailto:chris at iviking.org>> wrote:
>>>
>>> Bob,
>>>
>>> I think the problem has to be in the way that the page is handling the parameters and doing the query. How does the code that handles that look?
>>>
>>> Best,
>>>
>>> --Chris
>>>
>>>> On Jul 14, 2016, at 5:49 PM, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
>>>>
>>>> To explain what I'm trying to do:
>>>>
>>>> My client says that, in the old site,users often grabbed the URL from the address bar, so that they could get back to a search they did.
>>>>
>>>> So, I was trying to generate a link that they can grab, and then pass it into my jQuery site, and duplicate the search results.
>>>>
>>>> So long as the search params are single-words, my link works great, but if I do a SEARCH and select something with 2 words, the link that I'm generating won't work.
>>>>
>>>> I just don't get it... :)
>>>>
>>>>> On Jul 14, 2016, at 6:42 PM, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
>>>>>
>>>>> I did...
>>>>>
>>>>> Here's a link that works:
>>>>>
>>>>> http://tirms.longtermsolutions.com/?ql=true&cc=Acadian <http://tirms.longtermsolutions.com/?ql=true&cc=Acadian>
>>>>>
>>>>> but if I add the 2nd word in their name
>>>>>
>>>>> http://tirms.longtermsolutions.com/?ql=true&cc=Acadian <http://tirms.longtermsolutions.com/?ql=true&cc=Acadian> AgriTech
>>>>>
>>>>> it fails. The funny thing is though, I use jQuery and pass that 2-word name in the original query and it works.
>>>>>
>>>>> I also tried
>>>>>
>>>>> http://tirms.longtermsolutions.com/?ql=true&cc=Acadian%20AgriTech <http://tirms.longtermsolutions.com/?ql=true&cc=Acadian%20AgriTech>
>>>>>
>>>>> but that fails too...
>>>>>
>>>>> The question i have is, WHAT can I put between the 2 words that will get passed to my query and work?
>>>>>
>>>>> Thanks for your help,
>>>>>
>>>>> Bob
>>>>>
>>>>> Bob Patin
>>>>> Longterm Solutions
>>>>> bob at longtermsolutions.com <mailto:bob at longtermsolutions.com>
>>>>> 615-333-6858
>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>>>> http://www.longtermsolutions.com <http://www.longtermsolutions.com/>
>>>>> -
>>>>> iChat: bobpatin at me.com <mailto:bobpatin at me.com>
>>>>> Twitter: bobpatin
>>>>> —
>>>>> FileMaker Consulting
>>>>> FileMaker Hosting for all versions of FileMaker
>>>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>>>>
>>>>>> On Jul 14, 2016, at 6:34 PM, Tim 'Webko' Booth <tim.webko at gmail.com <mailto:tim.webko at gmail.com>> wrote:
>>>>>>
>>>>>> Have you tried a + instead of %20 ?
>>>>>>
>>>>>> On 15 July 2016 at 09:14, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
>>>>>> I'm generating a link on a PHP page, like this:
>>>>>>
>>>>>> http://www.site.com/test.php?cc=two <http://www.site.com/test.php?cc=two> words
>>>>>>
>>>>>> The client wants to be able to copy this link for use later, but when we do so, anytime "cc" is 2 or more words the query fails.
>>>>>>
>>>>>> I tried encoding the spaces like this
>>>>>>
>>>>>> two%20words
>>>>>>
>>>>>> but it still didn't work.
>>>>>>
>>>>>> Then I tried doing a str_replace to get something like this:
>>>>>>
>>>>>> two|words
>>>>>>
>>>>>> and then when the user gets to the page, taking the pipe and putting a space back in before the search. That failed too...
>>>>>>
>>>>>> Any thoughts?
>>>>>>
>>>>>>
>>>>>> Bob Patin
>>>>>> Longterm Solutions
>>>>>> bob at longtermsolutions.com <mailto:bob at longtermsolutions.com>
>>>>>> 615-333-6858 <tel:615-333-6858>
>>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>>>>> http://www.longtermsolutions.com <http://www.longtermsolutions.com/>
>>>>>> -
>>>>>> iChat: bobpatin at me.com <mailto:bobpatin at me.com>
>>>>>> Twitter: bobpatin
>>>>>> —
>>>>>> FileMaker Consulting
>>>>>> FileMaker Hosting for all versions of FileMaker
>>>>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>>>>>
>>>>>> _______________________________________________
>>>>>> FX.php_List mailing list
>>>>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>>>>>
>>>>>> _______________________________________________
>>>>>> FX.php_List mailing list
>>>>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>>>>
>>>>> _______________________________________________
>>>>> FX.php_List mailing list
>>>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160715/4fca67a5/attachment-0001.html
More information about the FX.php_List
mailing list