We've upgraded our Forums to Active Forums
Old Forums can still be accessed here for reference

Forum

Subject: Launch LiveContent from a javascript function
Prev Next
You are not authorized to post a reply.

AuthorMessages
RayUser is Offline

Posts:32

05/02/2008 3:00 PM  

I am a new user. I have been trying to launch a LiveContent popup from a javascript function. I agree with others that live content is a really impressive module.  I would even call it a work of art. But for obvious reasons, being able to launch it from a javascript function would further enhance what can be done with it.Â

In my case, javascript launch would allow me to use it with dynamic modules and programs that decide whether to show a window (and a link) on the fly. Also, it would allow me to launch it from modules that employ ajax (because they generate their content on the fly without refreshing the entire page). Live content does not seem to be able to be launched from links that are created or refreshed without refreshing the entire page (is that right?). And, of course, I could use it as the popup handler for javascript routines (as soon as run script on open/close feature is ready)... the uses are endless.

By putting a #LiveContent link somewhere on my page and putting an ID in an anchor, Ive been able to use call the onclick() event for the link and launch live content from a javascript function.  Unfortunately, this only works in IE, because it seems firefox wont allow me to click on an anchor tag via getElementByID

... is that wrong? Is there a way to click on a link programmatically in firefox?

Mandeeps is clearly not around for a while, but does anyone else have any ideas?

Mandeeps.comUser is Offline

Posts:478

05/03/2008 9:26 PM  
Hi Ray,
That should work for IE and Firefox...

For firefox,
try this:

var something = getElementByID('someid').onClick();

You need to assign the results to some var otherwise it won't work in firefox.
Mandeeps.comUser is Offline

Posts:478

05/03/2008 9:27 PM  
Also,
Live Content does expose a Javascript API...a detailed documentation will be included with v2.0
RayUser is Offline

Posts:32

05/03/2008 10:02 PM  
 2.0 !!! 2.0 !!!

Is that coming out tomorrow?....

But seriously, I havent noticed any beta's being announced or anything, yet, so we are talking about after the summer some time?Â

Any predictions?
RayUser is Offline

Posts:32

05/03/2008 10:02 PM  
 2.0 !!! 2.0 !!!

Is that coming out tomorrow?....

But seriously, I havent noticed any beta's being announced or anything, yet, so we are talking about after the summer some time?Â

Any predictions?
Mandeeps.comUser is Offline

Posts:478

05/03/2008 10:16 PM  
We're targeting mid-June now...

JavaScript API is even in current release...we just don't have the resources to support it at the moment. If you can't wait, then please open a support ticket and we'll get you started :)
RayUser is Offline

Posts:32

05/04/2008 1:12 PM  
FYI:

After reading your response and playing around, I was indeed able to click on a link  from javascript in  firefox.  Unfortunately, it turns out that in firefox the only thing you can execute when you do that is an onclick function in the link.  That doesnt work to launch live content.

However,  Im sure one of the following options will pan out soon with some work:

The javascript API ( I have submitted a support request ).Â

or...

Run script before/after will help a lot! But Im not sure if that is going to be in version 1.5, or not till 2.0.


Mandeeps.comUser is Offline

Posts:478

05/21/2008 9:54 PM  
Ray,
did you receive our reply?
RayUser is Offline

Posts:32

05/21/2008 10:28 PM  
Thank you for sending the instructions. It was surprisingly simple to popup a window from javascript, and its really cool!

Unfortunately, once the script shows the window, nothing else after that executes as far as I can tell. So I cant easily use this method to fill fields in a popup once it has opened.

Nevertheless, I will continue to play with it. I think I may be able to do a lot with this capability, particularly, once version 1.5 is released with it's persistence feature.

... until then :)
You are not authorized to post a reply.
Forums > Modules > Live Content > Launch LiveContent from a javascript function



ActiveForums 3.7