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

ASP.NET

Avatar of undefined
Last Comment
mannevenu

8/22/2022 - Mon
amar31282

It possibly seems to be a bug in mozilla

mannevenu

ASKER
In Mozilla after clicking tab only it is coming.any solution for this
amar31282

I couldn't get it work i am very much sure it is a bug in mozilla
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
amar31282

hey mannevenu

 i got a workaround for this issue..

If you are there please respond

mannevenu

ASKER
yea am here
mannevenu

ASKER
Yaa I am waiting For u r response
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
amar31282

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

amar31282

do modifications carefully
amar31282

Hi mannevenu,

Did you try this one ...'

Any results ??
Your help has saved me hundreds of hours of internet surfing.
fblack61
mannevenu

ASKER
Yaa Iam Trying
amar31282

any update mannevenu
mannevenu

ASKER
Yaa.It is working fine in normal page.But in update panel it is not working.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
amar31282

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
amar31282

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mannevenu

ASKER
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