Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am having trouble when I use wind 1

Status
Not open for further replies.

lucyv

Programmer
Mar 11, 2002
152
US
I am having trouble when I use window.showmodelessdialog. I call another window using show modeless dialog, and on this window I have a combo list. Whenever I select an item from the list another window opens with the same controls on it. Can anyone please help?????

Thanks
Lucy
 
<SCRIPT lang=&quot;javascript&quot;>

function openApplicationInformation(PageName){
var ret =
window.showModalDialog(PageName,null,&quot;dialogHeight:344px;dialogWidth:468px;help:0;resizable:1;scroll:0;status:0&quot;);

return true;

}
</SCRIPT>
This is the in my html in my default form. In my ApplicationInformation page I have two buttons. One of them is Add and the other is cancel. My problem is that when the user is adding a new application I make sure that it isn't already in the database. If it is then I want to display an error message but when the form posts back to itself the page opens in anther window and the focus is set to the new window. Thank you for help!
lucy
 
Your script obviously looks fine... can we see where you are calling this code...

in particular the page load events....
 
AddApplication.Attributes.Add(&quot;onClick&quot;, &quot;return openApplicationInformation('ApplicationInformation.aspx');&quot;)

Whenever the form loads an atrribute is added to the AddApplication command button. When the user clicks on AddApplication the openApplicationInfomation function is called and the ApplicationInformation page is opened. My problem is that when the ApplicationInformation posts back to itself antoher window ApplicationInformation window opens. Thanks for your help!

-Lucy
 
I have never heard of that...what does it do?? How do I add it??

Thanks again for your help!!!

-Lucy
 
just add the SmartNavigation=true in your page directive at the top of your ASPX file.

Benefits:

eliminate any flash caused by navigation.
persist scroll position when moving from page to page.
persist element focus between navigations.

<%@ Page SmartNavigation=&quot;true&quot; %>

why it is useful in this situation is that it will fix the issue you are having with the postback because it will force your ApplicationInformation page to be render inside of an IFRAME and allow it postback properly. Let me know if this doesn't work for you.
 
ps... make sure you leave the other items in your page directive...

ie...
<%@ Page language=&quot;c#&quot; SmartNavigation=&quot;true&quot; Codebehind=&quot;ApplicationInformation.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;ApplicationInformation&quot; %>
 
I had deleted the Iframe because it didn't solve my problem but now I am re-adding
<iframe src=&quot;AddApplication.aspx&quot; scrolling=yes></iframe>
to the AddApplication.aspx page and it is coming out blank. Is there something wrong. THanks!!!!!!!!!!!!

-Lucy
 
you don't need to add the IFRAME...
adding smartnavigation to your page directive will do this for you when it renders the page.
 
Thank You so very much!!!!!!!!!!!!!!! I have been working on this for the past 2 days. It worked!! It worked!!
 
Sorry it took 11 posts to get you there... =) and your Welcome.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top