Calling Web Service method from javascript on Page load and rendering a button based on the value re

We are trying to render a button on page load where we need to call some web service method and render button based on the value returned by the method (In this case User Record Access object as return type)

So,  here is a quick sketch. 

You will create an inline resource that will perform your webservice call and then update the CSS on a partiular class based on the outcome,  or update a variable with text based on that outcome. 

Then your button will either use the CSS Class you updated,  or will run a custom snippet to load the text associated with the varialbe you set. 

There are quite a few posts on the community about webservice calls or custom Apex inclusion etc.  Search around…