Link to home
Create AccountLog in
Avatar of mannevenu
mannevenu

asked on

In Mozilla Tabing

I have one dropdownlist.In that I select any item, gridview is coming.Using Mouse click grid view coming In mozilla.But using Up and down arrows grid view is not coming when i select item in drop down list.It is working fine in IE.But Problem in mozilla.
protected void ddlCourse_SelectedIndexChanged(object sender, EventArgs e)
    {
        string bn = Request.Browser.Browser;
        if (bn.Equals("Firefox"))
        {
            this.ScriptManager1.SetFocus(gvBatch);
        }
        else
        {
            this.ScriptManager1.SetFocus(gvBatch);
        }
        if (ddlCourse.SelectedItem.Text == "-Select-")
        {
 
            ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "ClientScript", "{debugger; alert('Select the course'); }", true);
            this.ScriptManager1.SetFocus(ddlCourse);
            gvBatch.Visible = false;
        }
        else
        {
            Session["Course_Id"] = ddlCourse.SelectedValue;
           
            gvBatch.Visible = true;
            fillBatchGrid();
        }
    }

Open in new window

Avatar of amar31282
amar31282
Flag of India image

It possibly seems to be a bug in mozilla

Avatar of mannevenu
mannevenu

ASKER

In Mozilla after clicking tab only it is coming.any solution for this
I couldn't get it work i am very much sure it is a bug in mozilla
hey mannevenu

 i got a workaround for this issue..

If you are there please respond

yea am here
Yaa I am waiting For u r response
Try this one
in aspx page 
 
    <asp:DropDownList ID="DropDownList1"  AutoPostBack="true" runat="server" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
        <asp:ListItem Selected="True">item1</asp:ListItem>
        <asp:ListItem>item2</asp:ListItem>
        <asp:ListItem>item3</asp:ListItem>
    </asp:DropDownList>
    <asp:TextBox ID="TextBox1"  runat="server"></asp:TextBox>
    <div style="display:none;">
    <asp:TextBox ID="hidden"  runat="server"></asp:TextBox>
    </div>
 
In code bind
 
   protected void Page_Load(object sender, EventArgs e)
    {
        DropDownList1.Attributes.Add("onkeyup", "document.getElementById('hidden').focus();document.getElementById('DropDownList1').focus();");
        DropDownList1.Attributes.Add("onkeydown", "document.getElementById('hidden').focus();document.getElementById('DropDownList1').focus();");
    }
 
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        TextBox1.Text = DropDownList1.SelectedItem.Text;
        DropDownList1.Focus();
    }

Open in new window

do modifications carefully
Hi mannevenu,

Did you try this one ...'

Any results ??
Yaa Iam Trying
any update mannevenu
Yaa.It is working fine in normal page.But in update panel it is not working.
This is not fare why didn't you tell earlier  that you are  using update panel...

Let me see why it is not working  for update panel.

it would be better if you paste the code here including mine one i don't want to write the code :)
ASKER CERTIFIED SOLUTION
Avatar of amar31282
amar31282
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
yeah amar its working but it has limitation too
i can only select it first time through keyboard down arrow or up arrow, when i press more times its not getting, its coming on for the first time, but my requirement is different