OT non LC: cross tab/window browser communication

Mike Bonner bonnmike at gmail.com
Tue Nov 22 18:36:09 EST 2016


My problem is the same. *kinda*  Basically i'm "adding to cart" and not too
long ago.. something changed and it can take 7 or 8 seconds to decrypt the
button code.   Not that big a deal, but people like me, click once, leave
the cart tab open, and then go back to the main shopping tab and click more
stuff to add. At this point the background tab doesn't become active, and
if they click several items in quick succession, any items that don't
complete don't appear in the cart.

There are a few ways I can work around this. The first effort is similar to
what you're talking about and is what I have done so far.  Click an add to
cart button, and an overlay and progress indicator blocks further actions
for a set amount of time.  This works pretty well, but as mentioned.. if
paypal decides to be even slower, its still slightly possible for the user
to add more items before the process completes.

Another option, I could force the user to go to each individual items page,
click to add, then make them go back to the first page to then chose
another item, load a page, and click again.  I really don't want to do
this, I don't like the way things flow.

Yet another option would be to maintain my own cart, and then do an upload
to paypal of all items at once.  I think it is possible to make this work
with self hosted encrypted buttons, but would require a heavy recode, and
which I hope to avoid because it might put it beyond the current ability of
the people who may have to maintain it.  I'm working with them, but the
current setup for adding and managing items works REALLY well for them.

I didn't think it was possible to do what I wanted, but was hoping maybe
there was some "document complete" message handed back to the original
calling page.  Thanks for the input, I'll keep pondering.

The strange thing is that a month ago, everything was fine, but paypal has
rolled out a new cart page that is MUCH less responsive than the old one.
Yet a simple "view cart" button still goes to the old style page.
Apparently the new page has been rolled out in waves and it finally caught
up to us.

On Tue, Nov 22, 2016 at 1:42 PM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:

> This is strange and very insecure. You should let the tab load and
> redirect to the PayPal page after the tab has finished doing everything it
> should do.
>
> I had a similar problem though. I needed a page to give PayPal time to
> process a transaction. I did this with a fake progress bar, which waited 1
> minute and then reloaded the page. If the transaction has been completed, I
> sent the license, but if the transaction hadn't been completed, I showed a
> message saying that the license would be delivered manually at a later time
> after additional checks had been performed.
>
> Kind regards,
>
> Mark Schonewille
> http://economy-x-talk.com
> https://www.facebook.com/marksch
>
> Buy the most extensive book on the
> LiveCode language:
> http://livecodebeginner.economy-x-talk.com
>
> Op 22-Nov-16 om 21:02 schreef Mike Bonner:
>
>> I have a problem I need to solve with a web page i've set up.. On my page
>> (my domain) I have forms that submit to an external domain (paypal) and
>> open a new named tab on submission.  I need to be able to block further
>> actions until the paypal page load is complete.  Currently, I have simply
>> set up a timer with an overlay and visual feedback letting the user know
>> that "stuff is being done,"  but since the response time from paypal can
>> vary greatly, I'm hoping there is a way to know when the tab has completed
>> loading, with a backup "max time" so that if the paypal load barfs, page
>> functionality is still returned.
>>
>> Is this sort of thing possible?  I've researched, but if it can be done
>> apparently my search terms aren't the correct ones.
>>
>> Thanks in advance for any help.  I'm afraid javascript (other than very
>> basic stuff) is not one of my strengths.
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list