Could you confirm the jive version? Are you in a simple HTML Widget?
Im using Jive SBS 188.8.131.52 6c4, and yes its a simply HTML widget as part of a group homepage
Have you tried the non shortcut version?
You can also try wrapping your jquery and make use of the $ shorthand.
Yes ive tried both -- no luck!
and jQuery('#homepage_get_doc1').html("<b>Hello</b>"); yields the same error message? I don't have any experience with Jive 6, but the error message you're getting seems to suggest that jQuery hasn't been loaded yet. You might want to investigate where and how jquery is being included on the page.
I just put up a Jive 6 environment and noticed I'm getting the same errors. It looks like HTML widgets are now part of an iframe, and the iframe doesn't have any knowledge of the embedded jQuery that Jive is using.
I was able to get the widget working, by embedding the generated js file within its HTML, but need to figure out a better way to reference the internal jQuery file.
Also since its an iframe, the height of the iframe will also be affected, I'm working on a new version of the HTML Widget: How to Create a Content Slider for Jive 6, I'll post it as soon as I can.
2 people found this helpful
Got HTML widgets working with script tags, basically you just have to add the following to the top of your HTML Widget:
var $j = jQuery.noConflict();
Since its in an iframe, the HTML height may not be passed back to the dashboard properly, if so you have to increase the height of the HTML widget by doing something like below. Just make sure you change "containerName" to the outermost div, and change the height to a number that is slightly larger then your HTML page height.
OMG, don't know you but I could kiss you!!
I don't even want to say how long I've been trying to figure this out.
FYI, What you proposed fixed my problem without having to add the following system property:
Lots of people seem to try to change that property to fix this kind of issue, but at least for me, the setting of that property had nothing to do with it.
But this fixed it.
Thanks so much!!!
Your welcome glad it helped. Depending on what's in your widget, you may need to have it resize the iframe after jquery actions are performed.
You can use this snippet to resize the iframe (it calls an internal jive function, and puts a delay on the call in milliseconds). You may need to tweek the milliseconds to get it to render correctly. J Tran can help you as I've worked with her alot in the past.
I believe you've got the wrong system property. The system property you want is: html.widget.safemode.enabled = false
Thanks Dave, this resolved my issue.