Date: Tue, 19 Dec 2006 01:16:07 -0500
Reply-To: Eivind Heioghaa <x47x@CODANMARINE.NO>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Eivind Heioghaa <x47x@CODANMARINE.NO>
Subject: Re: Calling SAS Macro from HTML onClick() event
Thanks for good feedback!
You're right Don, I'm using the Stored Process Server. I have a Stored
Process holding not only the job to be run, but also the code for
generating a web GUI. This works just fine, and I'm building a GUI with
chained/dependent drop down menus and various other inputs. Each section of
the GUI is wrapped up in a macro, so that I can better control when and in
which cases to display the specific parts of the GUI.
Similarly the job that is taking this input as parameters, is also wrapped
up in a macro. This job also runs without errors. The only problem is that
I can't make it wait until the user is done performing the input, so it's
only running for the default values provided in the GUI. As soon as my
Stored Process sees the macro call that I've placed in the HTML for a
button, it goes ahead and performs the work. Hence the user doesn't get to
provide any inputs before my overly eager job is executing.
As you pointed out, the macro is run as the HTML is generated. It seems
like SAS finds the macro call which I've put inside the onClick event, and
executes it as soon as it's working on that section of the SAS code
(without waiting for an actual onClick event to occcur).
It seems like all the pieces of the puzzle are working together as
intended, but I just can't seem to find a way for the user to tell the
Stored Process when to execute.
Any pointers on how to let the users kick of the macro in the Stored
Process would me much appreciated!
Looking at the title of your upcoming book, I'll be heading to amazon to
preorder it :-)