Discussions

Expand all | Collapse all

Javascript to execute three URLs and then do a quiet jgrowl

  • 1.  Javascript to execute three URLs and then do a quiet jgrowl

    Posted 10-25-2020 10:07
    I have this code which works to execute three URLs and then refresh the page.  But the use case is a table with 1 million records and the refresh is too slow.

    "javascript: {" &
    "$.get('" & $URLONE & "');" &
    "$.get('" & $URLTWO & "');" &
    "$.get('" & $URLTHREE & "');" &
    "location.reload();" &
    "}"

    Does anyone know the equivalent code to execute three URL and pop up a green jGrowl message without refreshing the page?


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------


  • 2.  RE: Javascript to execute three URLs and then do a quiet jgrowl

    Posted 10-25-2020 16:11
    Answering my own question:


    "javascript: {" &
    "$.get('" & $URLONE & "');" &
    "$.get('" & $URLTWO & "');" &
    "$.get('" & $URLTHREE & "');" &
    "$.jGrowl('Popup message goes here', {life: 3000, theme: 'jGrowl-green'});" &
    "}"

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Javascript to execute three URLs and then do a quiet jgrowl

    Posted 10-26-2020 09:08
    Edited by Don Larson 10-26-2020 09:08
    Mark,

    The syntax of this is different than Kirk's from Magic Buttons.

    • "<a href=\"javascript:" & "$.get('" & $URL  & "', function(){" & "location.reload();" & "});" & "void(0);\">"&$IMG&"</a>"

    The old one executes upon clicking the image that holds the hyper link.    How are you embedding this new triple URL into a link to execute?


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------



  • 4.  RE: Javascript to execute three URLs and then do a quiet jgrowl

    Posted 10-26-2020 09:54
    My  button is just a formula URL. 

    As an aside I did try listing many "gets" in a row and surprisingly, there did not execute in sequence so unfortunately, I'm having to get a javascript person to code what I need.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Javascript to execute three URLs and then do a quiet jgrowl

    Posted 10-27-2020 05:08
    Hi Mark

    Sorry can I clarify - when you say they 'did not execute in sequence' do you mean they executed - but not sequentially?

    Or did only the first one execute, and the others failed?

    If the former, then I can use this where I need to call one or more URLs, but sequence is not important.





    ------------------------------
    dmlaycock2000 dmlaycock2000
    ------------------------------



  • 6.  RE: Javascript to execute three URLs and then do a quiet jgrowl

    Posted 10-27-2020 09:52
    They all executed, but I'm pretty sure not in sequence.

    I was using this syntax

    "javascript: {" &
    "$.get('" & $URLONE & "');" &
    "$.get('" & $URLTWO & "');" &
    "$.get('" & $URLTHREE & "');" &
    "$.jGrowl('Popup message goes here', {life: 3000, theme: 'jGrowl-green'});" &
    "}"

    But with about 20 of the "gets".  In my use case, the sequence mattered.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Javascript to execute three URLs and then do a quiet jgrowl

    Posted 25 days ago
    Thanks Mark - I'll be using this today!

    David

    ------------------------------
    dmlaycock2000 dmlaycock2000
    ------------------------------