Click to See Complete Forum and Search --> : struggling for this...pl help...


suganya
09-17-2003, 03:45 PM
i have a frameset with 3 frames.
frame1 has some buttons
frame2 will show results
frame3 is hidden

On click of button3 in frame1, i submit a form in the hidden frame frame3 and target the results to a pop-up window.

my code for this is:
in frame2 i have a function onclick:
function popupAddlColumnDialog() {

window.open("","addColumnsWindow","width=700px,height=700px,scrollbars=yes,status=no,menubar=no,toolbar=no,resizable=no,center=yes,loca tion=no");
parent.frame3.doOnClick();
}

in frame3 doOnclick():
function doOnClick() {
document.getElementById("form3name").submit();
}

all these work perfectly fine.

the problem is.....
there is a function in frame1 which i want to call in my popup...

i tried: (in my onload function of the popup)window.opener.parent.criteriaFrame.savedSearchName.value;

in the popup i have:
function performOnLoad()
{
var l_savedSearchName = window.opener.parent.criteriaFrame.savedSearchName.value;
document.addColumn.savedSearchName.value = l_savedSearchName.value;
self.focus();

}

Khalid Ali
09-17-2003, 04:00 PM
Seems like you want to call a JS function from popup???

if so then code below will do that

window.opener.parent.criteriaFrame.JSFunctionName();

it should work otherwise replace window with top
top.opener.parent.criteriaFrame.JSFunctionName();

suganya
09-17-2003, 04:09 PM
thanks for ur reply....

i tried both with window and top....they dont work...
var l_savedSearchName = top.opener.parent.criteriaHeader.getSavedSearchName();
document.addColumn.savedSearchName.value = l_savedSearchName.value;
i keep getting top.opener is null or not an object.....

am i getting this problem bcos i am submitting my form to a hidden frame and then opening up the popup?....

Khalid Ali
09-17-2003, 04:27 PM
I am hoping that in this line of code

top.opener.parent.criteriaHeader.getSavedSearchName();

criteriaHeader

is the name of the frame???

whats the error you are getting

suganya
09-17-2003, 04:33 PM
frame1 is criteriaHeader - thats where the function is....
frame2 is criteriaFrame - thats where the button is....
frame3 is hiddenFrame - thats where i submit the form

i am getting the foll error:

top.opener is null or not an object.....
or if i replace it with window then:
window.opener is null or not an object.....

thanx..

Khalid Ali
09-17-2003, 05:07 PM
My suggestionworks,however in your case its not,that means the problem might be somewhere else in your design.

post a link to the site where you have all of those frames,or zip all of the resources and upload the file so that some one can see whats wrong with which part of your code.