• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to create a service using servlets to embed widgets on any foreign server/website  RSS feed

 
Devanshu Kashyap
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its required to create a service to embed widgets on any foreign website(server), using servlets where i'll pass encrypted widgetId and in turn i will get html for displaying it on screen. Also a refresh button with the embedded widget is to be provided so as to fetch updated computed data. The point is that user should copy some html/script code and place it on his website.

I am thinking of following approach.

An empty span with id, followed by a js script to make ajax call to the server to get widget HTML.

Any better approach to this problem?
Kindly ask for clarifications if required.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66149
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the problems with mixing your own content into the same document is that your elements are subject to the CSS and script of the page. If this could be an issue, one way to isolate your elements is to display them in an iframe which will contain its own document.
 
Devanshu Kashyap
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear,
Yes I did the same and it worked. and regarding the refresh problem to get updated computed value i used meta tag.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!