Loading Share components with AJAX

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2013 05:59 AM
Hi guys,
Do anybody knows if is possible to load Share components/webscripts using AJAX?
If I had to answer my own question I would say NO, because as far as I know FreeMarker templates, directives, components/webscripts and client-side dependencies are processed in the server side. Perhaps somebody knows whether there exists a workaround or something like that.
Thanks in advance.
Regards.
Do anybody knows if is possible to load Share components/webscripts using AJAX?
If I had to answer my own question I would say NO, because as far as I know FreeMarker templates, directives, components/webscripts and client-side dependencies are processed in the server side. Perhaps somebody knows whether there exists a workaround or something like that.
Thanks in advance.
Regards.
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2013 06:08 AM
By the way, forgot to mention I have performing some tests in order to achieve it. If you invoke the component directly with its URL, effectively it returns the corresponding HTML code which you can append to any HTML element using JS. That's OK, the problem is that CSS styles are not applied as they should and client-side widgets are not initialized properly.
Regards.
Regards.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2013 04:11 PM
much of the Share product uses JavaScript components that work with AJAX.
You can take a service - Clone it - modify to return data as say a JSON object vs HTML.
This would be done in the template pretty much the same way.
You can take a service - Clone it - modify to return data as say a JSON object vs HTML.
This would be done in the template pretty much the same way.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2013 03:53 AM
Thanks for your answer.
I know what you say, but what I really looking for is to invoke a component using URL and append its content wherever I want. As I said before:
<cite>
By the way, forgot to mention I have performing some tests in order to achieve it. If you invoke the component directly with its URL, effectively it returns the corresponding HTML code which you can append to any HTML element using JS. That's OK, the problem is that CSS styles are not applied as they should and client-side widgets are not initialized properly.
Regards.
</cite>
I believe it should be possible to do as I understand it is what Surf is doing in the background, nevertheless I don't know how CSS and JS dependencies for each component are managed.
Regards.
I know what you say, but what I really looking for is to invoke a component using URL and append its content wherever I want. As I said before:
<cite>
By the way, forgot to mention I have performing some tests in order to achieve it. If you invoke the component directly with its URL, effectively it returns the corresponding HTML code which you can append to any HTML element using JS. That's OK, the problem is that CSS styles are not applied as they should and client-side widgets are not initialized properly.
Regards.
</cite>
I believe it should be possible to do as I understand it is what Surf is doing in the background, nevertheless I don't know how CSS and JS dependencies for each component are managed.
Regards.
