It is currently Sat Aug 30, 2014 4:16 am Advanced search

getExpander and refresh parent window

Technical support, bug reports, feature requests and more.

getExpander and refresh parent window

Postby cruzzzz » Tue Jan 24, 2012 7:09 pm

HI
I am working with an application that uses jqgrid and highslide...

My problem is when I open the highslide popup and submit an action i have to reload some tables to refresh de info added but if I open the popup and close it with out apply any change I dont need to refresh my tables in the background

Code: Select all
hs.Expander.prototype.onAfterClose = function() {

   //alert(console.log);
   var deploID = $('input[name="HiddenDID"]').val();
        var clienID = $('input[name="HiddenCID"]').val();
 
        $('#deploymentTable').load('deploymentTable.php?client_id=' + clienID);
        $('#hostTable').load('hostsTable.php?deployment_id=' + deploID);
        $('#availablesTable').load('availablesTable.php?deployment_id=' + deploID);
        $('#list').jqGrid('setSelection', deploID );
        $('input[name="updateSubmitted"]').val('N');
             
}


In this way I m always executing after submit of closing the popup.. What is the way to FIRE or get the action CLOSE only?

I was trying a lot of ways... but i dont have a direct control from the popup to the parent to change values...

My scritp have to be something like that

If (Submit()) then execute my action
else (only close the popup and do anything)


Thank you
cruzzzz
 
Posts: 3
Joined: Tue Jan 24, 2012 6:59 pm

Re: getExpander and refresh parent window

Postby cruzzzz » Fri Jan 27, 2012 5:01 pm

any help for me?? :(
cruzzzz
 
Posts: 3
Joined: Tue Jan 24, 2012 6:59 pm

Re: getExpander and refresh parent window

Postby torstein.honsi » Mon Feb 13, 2012 11:45 am

Shouldn't you listen to the form.submit event instead? So that on form submit your values are changed. Or alternatively, use a global JavaScript variable, formChanged, that is set to true on submit, then do the actual update in the Highslide onAfterClose event.
Torstein Hønsi
CTO, Founder
Highsoft Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9197
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: getExpander and refresh parent window

Postby cruzzzz » Tue Feb 14, 2012 10:22 pm

Thank you for your tips...

Finally I took option #2 global var to control inside of onAfterClose..

var formControl = false;

by default is false and submit the form change by true

. but...I figured out (sorry for my ignorance) the only way to change the current value "false" by "true" in the popup highslide is writing in this way

parent.window.formControl = true;

If not the value continue being "false"

Regards :)
cruzzzz
 
Posts: 3
Joined: Tue Jan 24, 2012 6:59 pm


Return to Highslide JS Usage

Who is online

Users browsing this forum: No registered users and 3 guests

cron