I have a problem trying to call a method in the parent window from a popup.
The problem isn't that the parent method cannot be called, but the method is either not managing to find an attribute or the ajax request it is executing is not being dealt with correctly.
The situation -
I have an object called "Event" with a method called "updateSessionDate", which runs as it should. The method uses an ajax object to execute an ajax request.
A date input field has an onchange event so that it calls the updateSessionDate method when the field is updated.
There is also an option to open up a popup with a calendar, which lists a bunch of dates, and when clicked updates the date input field.
When the date field is changed in this fashion the onchange event is not triggered. This could cause a few problems, so i have been attempting to call the updateSessionDate method from the popup window when a date is clicked.
And onto the problem...
The following code is called when a date is clicked in the calendar popup:
Now i'd expected this to work, but it does not return any data from the ajax request.
The request is still executed and the query string is sent (tried alerting the string, and it works fine), and the requestChange method is called, but no response is returned UNLESS i add the alert after the this.objRequest.send () call in the ajax post method, and everything works fine!!!
I had also tried using something along the lines of:
But an error saying that "this.objAjax has no properties" referencing the ajax setQuery method call in the updateSessionDate method is returned.
If anyone is still reading this, any help is much appreciated!