more lightbox troubles

skittle 24 Jun, 2013
I have made good progress setting up my application with the excellent Chronoengine tools. However, I am still struggling with some issues which affect the functionality of my system. I am using the latest versions of Chronoforms, Chronoconnectivity and Joomla 3.

I have a Chronoconnection frontend custom listing displaying my records. It works well. This frontend contains a custom listing in the "body" section. This frontend custom listing currently contains an edit column with a link that looks like this:
<td style='font-size:12px; text-align: left !important';><a class="modal" href="index.php?option=com_chronoconnectivity&chronoconnection=ACUtilMCMetrics&tmpl=component&task=cc_edit_data&cid=<?php echo $cfid; ?>" rel="{handler: 'iframe', size: {x: 460, y: 510}}" >Edit</a>
This link successfully opens the desired form (as defined in the Frontend Editing tab) and allows me to edit the appropriate record.

My first problem is that when I click on Submit, the form closes and is replaced by the home page of my site in the lightbox window. I then have to close the lightbox manually.

I have tried a few things to solve this problem. I have added a Load JS event to close the lightbox in the On Submit section of the form with no effect
onclick="window.parent.document.getElementById('sbox-window').close();
. I have also entered the appropriate Action Order Number in the Save Action field of my Chronoconnection. I have tried other variations of the close shadowbox code that I have seen on this forum and elsewhere on the internet. (I have used firebug to inspect my lightbox and can verify it is referred to as sbox-window.) I have had no success closing the lightbox with any of the scripts. (Currently I have no code installed to close the lightbox.) I have tried simplifying the link by removing the rel="{handler... code. This solves one problem but introduces new ones. Apparently, by removing the iframe I no longer have the issue of seeing my homepage in the lightbox after I press Submit on my form. When I click Submit (without the iframe), the lightbox closes! But of course my lightbox no longer is the right size and does not apply proper formatting to the form.

The other problem I am having is that my Chronoconnection frontend custom listing uses a variable passed via the url to show the appropriate data. When the lightbox closes automatically (with iframe removed) I am redirected to the same view without the variable and of course the view is empty. I have attempted to use a Redirect URL event in the On Submit section and entered it's Action Order Number in the Return after Save Action Order field. I have even tried to use use my edit form without the lightbox and I still have had no success in getting the form to redirect back to my filtered view. (I do have links from other areas of the system that successfully update the parameters in the URL and allow for successful navigation to the same view - I just can't seem to get it to work using redirect events in the form's On Submit area.)

Sorry for the long email. Thanks for your help!

John
This topic is locked and no more replies can be posted.