Forum Discussion

MarkShnier__You's avatar
MarkShnier__You
Icon for Qrew Legend rankQrew Legend
4 years ago

Javascript to execute three URLs and then do a quiet jgrowl

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
------------------------------

8 Replies

  • 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
    ------------------------------
    • DonLarson's avatar
      DonLarson
      Qrew Commander
      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
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        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
        ------------------------------
  • Mark,

    Do you know if you can perform both, the reload AND the jgrowl (in that order?) 

    I tried simply adding the reload line before the jgrowl with no luck. I realize we are at the end of the life cycle for this, but seeing as how it wont break int he future, i figure id get one last use out of it lol.



    ------------------------------
    Mike Tamoush
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      There is a way that will survive the end of JavaScript. We we will have to take that off line. It's more complicated now.

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