function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Boulder MikeBoulder Mike 

A really basic question about using the AJAX toolkit

Okay, I give up. I'm playing with the new AJAX toolkit and I'm not sure how to use the Hello World example as an s-control. (I've only created URL-based s-controls before, not "real" s-controls.) So this is a really basic question about how to create the s-control .

When defining the s-control, do I paste the (entire) HTML file directly into the HTML Body field? (Of course I tried this, but the Custom Link doesn't appear to work.)

Or do I use the file selection tool to select the HelloWorld.htm file? If so, what do I put into the HTML Body field to refer to the HelloWorld.HTM file?

Thanks much.
adamgadamg
Paste the contents of the HTML into your s-control body.

You may need to modify the login call to pass the appropriate merge fields (although hard coding the login username/pass will technically work, its not a good idea..)
Boulder MikeBoulder Mike
Thanks Adam.

I guess it's puzzling to me that the field is labeled "HTML Body", which to me, implies that an entire HTML file contents wouldn't go there (including the [head] section).

So now my question is, wouldn't you expect Dave's "HelloWorld" example from the AJAX toolkit to work straight-away?

I've literally just pasted the contents of his file into an s-control, created the link to the s-control and added that to an Account profile. When I click the link, it trys hard, but does nothing. Eventually, FireFox says that the window is non-responsive.

Let's see if I can get this thing to work...

Michael
Boulder MikeBoulder Mike
Okay, it's working now.

The problem I was experiencing appears to related to the number of contacts in the Contact table and a Firefox feature to notify you about unresponsive windows.

Maybe it's the call to "toHTMLString" that takes so long that Firefox tries to intervene.

Anyway, it's definitely working and I'm thrilled to dive in deeper. This AJAX toolkit is fantastic... definitely made it worth attending DreamForce!
adamgadamg
Glad you found both the toolkit and Dreamforce useful!