Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Widgets 1

Status
Not open for further replies.

spperl

Programmer
Mar 29, 2005
34
0
0
GB
Hi,

I'm looking to create web widgets using perl so that other sites can easily integrate them. I've looked at the perl module JSON however I've had trouble implementing across different domains.

Ideally I would want its usage to be like that of integrating google maps etc... i.e. a javascript / AJAX call and bingo everything you want is there.

From reading this you can tell that I am no expert however I'm really just looking for pointers on where to look and get started. I would start off with a simple hello world widget and move on from there!

Any help would be appreciated and thanks for reading this,
spperl

 
Ajax won't work cross-domain due to browser security restrictions.

Have you tried something like this: have the users of your widget paste a JavaScript link to your domain? e.g.

theirdomain.com pastes code:
Code:
<script type="text/javascript" src="[URL unfurl="true"]http://yourdomain.com/widget.cgi?params=values"></script>[/URL]

And the 'widget.cgi' on your server accepts query string parameters (for instance, if you were making a map widget, it could accept an address or latitude/longitude coordinates)... your widget CGI works its magic, and eventually writes out some JavaScript code, that would create HTML elements so that your widget could be inserted onto the user's page.

Cuvou.com | My personal homepage
Code:
perl -e '$|=$i=1;print" oo\n<|>\n_|_";x:sleep$|;print"\b",$i++%2?"/":"_";goto x;'
 
Thank you for this info... have a star !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top