PDA

View Full Version : LOOK UP FORM WITH YAHOO DAILOG



zaps
3 Feb 2007, 10:16 PM
Iam using window.showdailog to load an asp.net page,child page having
an asp.net grid,when the user double click on the selected row in the grid,
i use this function to close that window and get parameters from child window
function SetWindow(id)
{
window.returnValue = id;
window.close();
}
it is working fine in normal way.

I tried with yahoo dailog, but i am unable to get the return value from dailog,
it is possible by using yahoo dialog to get the above functionality ?
how to do this by using yahoo dailog,how i get the return value from dailog

manugoel2003
4 Feb 2007, 12:38 PM
yui-ext dialog is not a new window.... it is simply a div which looks like a window.... so just declare a global variable somewhere in your page and change its value when closing the dialog box

zaps
4 Feb 2007, 8:29 PM
HOW IT POSSIBLE TO GET A VALUE,
CHILD PAGE IS LOADING IN IFRAME

manugoel2003
4 Feb 2007, 10:06 PM
you have to define some functions to get and set the variable.... something like this


var myValue = "some value";
function getValue(){
return myValue;
}
function setValue(val){
myValue = val;
}

Then call these functions from the iframe like this


var a = parent.getValue();
parent.setValue("new Value");

I think it should work

zaps
5 Feb 2007, 5:13 AM
Thanks for your help

By calling parent.functioname
raises exception "object does not this property"

i solved the problem by using parent.document.forms[0] (using hidden field to store the selected value)

how to called the function in parent,

I want to close the dailog when users double click on the grid inside loaded page in iframe

manugoel2003
5 Feb 2007, 8:50 AM
simply call dialog.hide() on the double click event of grid row.... where dialog is the dialog object....

zaps
5 Feb 2007, 8:06 PM
you know that grid is not in the same page it is in child page which is loaded in iframe in dialog

manugoel2003
5 Feb 2007, 9:07 PM
Can u plz post ur code here.... it is very difficult to suggest anything without looking at ur code.... also if possible include a link to a working sample....