10-09-2015 01:45 AM
Hi,
I'm trying to make a simple Gadget based on the Embeded WebApp Sample Gadget but I'm getting a syntaxerror, function statement requires a name
Here is the code of the Gadget:
var finesse = finesse || {};
/** @namespace */
finesse.modules = finesse.modules || {};
finesse.modules.EmbeddedWebGadget = (function($)
{
/** @scope finesse.modules.EmbeddedWebGadget */
return
{
init: function ( urlToLoad, contentID, iframeID )
{
$(contentID).html('');
$(contentID).html('<iframe src="' + urlToLoad + '" id="'+ iframeID +'" ></iframe>');
gadgets.window.adjustHeight();
}
};
}(jQuery));
I also tried
return
{
init: function ( urlToLoad, contentID, iframeID )
{
$(contentID).html('');
$(contentID).html('<iframe src="' + urlToLoad + '" id="'+ iframeID +'" ></iframe>');
gadgets.window.adjustHeight();
}();
};
without any positive result.
Any ideas?
Solved! Go to Solution.
10-12-2015 10:30 AM
Very tricky issue!
For me, I move the bracket next to the 'return' like this...
return {
instead of ...
return
{
That worked when I ran a similar structured script.
10-12-2015 10:30 AM
Very tricky issue!
For me, I move the bracket next to the 'return' like this...
return {
instead of ...
return
{
That worked when I ran a similar structured script.
10-13-2015 04:46 AM
Uhh, well, thanks a lot, that was the right answer.
Quite strange ... Head-->Table
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide