window.showDialog
-
in my cs file of the page i have added Button1.Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=edit',null, 'status:no;dialogWidth:570px;dialogHeight:500px;di alogHide:true;help:no;scroll:no')"); this works quite gud................. lookup page opens as a dialog But i have two buttons on Lookup page,,,, when i click any the lookup page is opened as a web page not as a dialog.......... i dont need to open it again ........ i have simply added some functionality to the onclick events.... why the dialog button opens web page instead of refreshing itself Thanx
-
in my cs file of the page i have added Button1.Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=edit',null, 'status:no;dialogWidth:570px;dialogHeight:500px;di alogHide:true;help:no;scroll:no')"); this works quite gud................. lookup page opens as a dialog But i have two buttons on Lookup page,,,, when i click any the lookup page is opened as a web page not as a dialog.......... i dont need to open it again ........ i have simply added some functionality to the onclick events.... why the dialog button opens web page instead of refreshing itself Thanx
In the lookup page's design view give the below tag inside head tag.
<base target="_self" />
Then try again.arun
-
In the lookup page's design view give the below tag inside head tag.
<base target="_self" />
Then try again.arun
i did so but i still have the same problem........this donot solve it
-
In the lookup page's design view give the below tag inside head tag.
<base target="_self" />
Then try again.arun
it works .........there was an error in my code due to which the statement was not working
-
In the lookup page's design view give the below tag inside head tag.
<base target="_self" />
Then try again.arun
now i am facing another problem i open the dialog form Page1.aspx using LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')"); Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write window.opener.document.getElementById('TextBox1').value='ads'; i get the error document.opener.document is null or not an object i have also tried window.opener.parent but it also gives error How can i do this
-
now i am facing another problem i open the dialog form Page1.aspx using LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')"); Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write window.opener.document.getElementById('TextBox1').value='ads'; i get the error document.opener.document is null or not an object i have also tried window.opener.parent but it also gives error How can i do this
Instead of opener use
window.dialogArguments
. LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')"); Pass the value of textbox in place ofnull
in the showModalDialog method(second argument).And then usewindow.dialogArguments
from dialog.Arun J