WebDialogBox close error

17 replies. Last post: December 24, 2010 1:30 AM by Frank Bruce
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Frank BruceMember

When  I call js code: sendRuquest(),it show a  WebDialogBox1,however,when I click 'X' to close,it cause JS error:URI: http://localhost:1202/Evget_EMS/ISRes.axd?D/WebDesktopManager.js/307200311     

how to sovle  it ???????thank you .all the code below

                                                          

jS:









function sendRuquest() {
    var grid = ISGetObject("WebGrid2");  
    grid.SendCustomRequest();
}


html:
<ISWebDesktop:WebDialogBox ID="WebDialogBox1" runat="server" Height="420px" Width="410px" DialogBoxImage="None"> <WindowSettings> <WindowStyle> <Normal BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" Font-Names="Tahoma" Font-Size="8pt"> </Normal> <Active BaseStyle="Normal" BorderColor="Gray"> </Active> </WindowStyle> <CaptionStyle> <Normal Cursor="Default" BackColor2="Gainsboro" BackColor="Gray" Font-Bold="True" Font-Names="Tahoma" Font-Size="10pt" ForeColor="White"> <Padding Top="2px" Left="2px" Right="2px" Bottom="2px"></Padding> </Normal> <Active BackColor2="192, 192, 255" BaseStyle="Normal" BackColor="Navy"> </Active> </CaptionStyle> <CaptionButtonStyle> <Normal Overflow="Hidden" OverflowY="Hidden" OverflowX="Hidden" BorderColor="White" BorderStyle="Solid" BorderWidth="1px" Height="17px"> </Normal> <Over BaseStyle="Normal"> <BorderSettings> <Bottom Color="Gray"></Bottom> <Right Color="Gray"></Right> </BorderSettings> </Over> <Active BaseStyle="Normal"> <BorderSettings> <Left Color="Gray"></Left> <Top Color="Gray"></Top> </BorderSettings> </Active> </CaptionButtonStyle> <ContainerStyle BackColor="White" Font-Names="Tahoma" Font-Size="8pt" Height="100%" Width="100%"> <Padding Top="4px" Left="4px" Right="4px" Bottom="4px"></Padding> </ContainerStyle> <CommandButtonStyle> <Normal BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False"> </Normal> <Over BaseStyle="Normal" BackColor="#C5C2AF"> </Over> <Active BaseStyle="Normal" BackColor="#8A887B" ForeColor="White"> </Active> </CommandButtonStyle> <CommandButtonDisabledStyle BackgroundImage="" CustomRules="" BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False" ForeColor="Gray"> </CommandButtonDisabledStyle> </WindowSettings> <ContentTemplate> <table width="375px"> <tr> <td width="45px"> 关键字 </td> <td> <ISWebInput:WebInput Width="116px" ID="WebInput1" runat="server"> </ISWebInput:WebInput> </td> <td> <ISWebDesktop:WebButton ID="WebButton2" runat="server" Height="20px" Text="查找" Width="50px" OnClientClick="sendRuquest" AutoPostback="true" PostBackMode="FlyPostBack"> </ISWebDesktop:WebButton> </td> <td width="162px"> </td> </tr> <tr> <td colspan="4"> <ISWebGrid:WebGrid ID="WebGrid2" runat="server" Height="315px" UseDefaultStyle="True" Width="371px" DefaultStyleMode="Elegant" OnInitializeDataSource="WebGrid2_InitializeDataSource" OnInitializePostBack="WebGrid2_InitializePostBack"> <LayoutSettings AlternatingColors="false" AllowContextMenu="False"> <ClientSideEvents OnCellDblClick="DbclickAutoFill()" /> <SelectedRowStyle BackColor="#FFBD69" /> </LayoutSettings> <RootTable DataKeyField="tradecode"> <Columns> <ISWebGrid:WebGridColumn Caption="商品编号" DataMember="tradecode" Name="tradecode" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="商品名称" DataMember="fullname" Name="fullname" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="商品单位" DataMember="unit" Name="unit" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="库存数量" DataMember="qty" DataType="System.Double" Name="qty" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="单价/元" DataFormatString="##,###.00" DataMember="price" DataType="System.Double" Name="price" Width="70px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> </td> </tr> </table> </ContentTemplate> </ISWebDesktop:WebDialogBox>
c#
    protected void WebGrid2_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e)
    {
        if (e.Action == ISNet.WebUI.WebGrid.PostBackAction.Custom)
        {
            WebGrid2.ClientAction.Refresh();       
        }
    }
    protected void WebGrid2_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
    {
        e.DataSource = dbcon.getStockByName(WebInput1.Text);

    }


 

 

1 attachment
All times are GMT -5. The time now is 1:40 PM.
Previous Next