Hi.
I have a pop-up that has a behaves in a weird way in IE 6 and 7. The pop-up contains a form with textboxes and comboboxes and 2 buttons, reset and search. When I click on the search button, the gridview should be populated. Instead, the search and reset buttons opens the same window. The window opened by the search and reset buttons work properly. I can't figure out why the pop-up opens another pop-up.
The button that calls the first pop up:
The popup.js script:
The pop-up window:
Help would be greatly appreciated
Thanks
I have a pop-up that has a behaves in a weird way in IE 6 and 7. The pop-up contains a form with textboxes and comboboxes and 2 buttons, reset and search. When I click on the search button, the gridview should be populated. Instead, the search and reset buttons opens the same window. The window opened by the search and reset buttons work properly. I can't figure out why the pop-up opens another pop-up.
The button that calls the first pop up:
<asp:Button ID="cmdAddSkillToSkillSet" runat="server" Text="Add" OnClientClick="popup()" />
The popup.js script:
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 100;
var randomstring = '';
for (var i = 0; i < string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum, rnum + 1);
}
function popup()
{
if (document.documentElement && document.documentElement.clientHeight)
// Explorer 6 Strict Mode
{
window.showModalDialog("../PAGES/SkillSearch.aspx?=" + randomstring, "", "dialogHeight:410px;dialogWidth:600px;resizable:no");
}
else // all except Explorer
{
window.showModalDialog("../PAGES/SkillSearch.aspx?=" + randomstring, "", "dialogHeight:410px;dialogWidth:600px;resizable:0");
}
//window.location.reload(true)
}The pop-up window:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SkillSearch.aspx.cs" Inherits="PAGES_AddSkillToSkillSetSearch" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Add Skill Fields</title> <link href="../STYLESHEETS/PopUp.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="../STYLESHEETS/PopUpIE.css" /> <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script> <![endif]--> </head> <body id="searchSkills"> <form id="form1" runat="server" method="post"> <h1>Search Skills</h1> <div> <ul class="left"> <li> <asp:Label ID="lblSkillName" runat="server" Text="Skill Name" AssociatedControlID="txtSkillName" /> <asp:TextBox ID="txtSkillName" runat="server" CssClass="txt" /> </li> <li> <asp:Label ID="lblSkillCategory" runat="server" Text="Skill Category" AssociatedControlID="cboSkillCategory" /> <asp:DropDownList ID="cboSkillCategory" runat="server" CssClass="ddl" /> </li> <li> <asp:Label ID="lblSkillSet" runat="server" Text="Skill Set" AssociatedControlID="cboSkillSet" /> <asp:DropDownList ID="cboSkillSet" runat="server" CssClass="ddl" /> </li> </ul> <ul class="right"> <li> <asp:Label ID="lblVendor" runat="server" Text="Vendor" AssociatedControlID="cboVendor" /> <asp:DropDownList ID="cboVendor" runat="server" CssClass="ddl" /> </li> <li> <asp:Label ID="lblKeywords" runat="server" Text="Keywords" AssociatedControlID="txtKeywords" /> <asp:TextBox ID="txtKeywords" runat="server" CssClass="txt" /> </li> <li> <asp:Label ID="lblSkillType" runat="server" Text="Skill Type" AssociatedControlID="cboSkillType" /> <asp:DropDownList ID="cboSkillType" runat="server" CssClass="ddl" /> </li> <li> <asp:CheckBox ID="chkIncludeArchivedSkills" runat="server" Text="Include Archived Skills" /> </li> </ul> <div class="buttons"> <asp:Button ID="cmdReset" runat="server" Text="Reset" CssClass="button" onclick="cmdReset_Click" /> <asp:Button ID="cmdSearch" runat="server" Text="Search" CssClass="button" onclick="cmdSearch_Click" UseSubmitBehavior="true" /> </div> <div class="clear"></div> </div> <div class="divGV" style="max-height:159px;overflow-y:auto"> <asp:GridView ID="gvSearch" runat="server" AutoGenerateColumns="false" CssClass="gv" DataKeyNames="ID"> <Columns> <asp:TemplateField> <HeaderTemplate> <asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="true" OnCheckedChanged="chkSelectAll_CheckedChanged" /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="chkSelect" runat="server" /> </ItemTemplate> <ItemStyle CssClass="gvCell" HorizontalAlign="Center" VerticalAlign="Middle" /> <HeaderStyle CssClass="gvHeader" /> </asp:TemplateField> <asp:BoundField DataField="Name" HeaderText="Skill"> <ItemStyle CssClass="gvCell" HorizontalAlign="Left" VerticalAlign="Middle" /> <HeaderStyle CssClass="gvHeader" /> </asp:BoundField> <asp:BoundField DataField="Description" HeaderText="Description"> <ItemStyle CssClass="gvCell" HorizontalAlign="Left" VerticalAlign="Middle" /> <HeaderStyle CssClass="gvHeader" /> </asp:BoundField> </Columns> <EmptyDataTemplate> <asp:Label ID="lblNoResults" runat="server" Text="No results matching your search were found." /> </EmptyDataTemplate> <RowStyle CssClass="gvRow" /> <AlternatingRowStyle CssClass="gvAlternatingRow" /> <EmptyDataRowStyle CssClass="gvEmpty" /> </asp:GridView> </div> <div class="buttons"> <asp:Button ID="cmdAddSkills" runat="server" Text="Add Skills" OnClick="cmdAddSkills_Click" CssClass="button" /> </div> </form> </body> </html>
Help would be greatly appreciated
Thanks

Help
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Back to top








