.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Cannot get OnClick, OnMouseOver, etc. functions to work in Firefox (but they work just fine in IE)

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net

I am adding the following VB event handler code to my GridView's RowDataBound event:

If (e.Row.RowType = DataControlRowType.DataRow) Then
e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';this.style.textDecoration='underline';")
e.Row.Attributes.Add("onmouseout", "this.style.textDecoration='none';")
e.Row.Attributes.Add("onclick", ClientScript.GetPostBackClientHyperlink(Me.GridView1, "Select$" + e.Row.RowIndex.ToString()))
End If

This code works just fine in Internet Explorer, but not in Firefox. The If statement returns true, but none of the On... events get fired. What is blocking this in Firefox? 

View Complete Post

More Related Resource Links

onunload does not work in firefox when only one tab

The following script as added to the header of a web page, when the firefox browser is closed, i would expect the alert to fire.  This works if using IE and Firefox when closing a tab when there is more than one tab.  <script type="text/javascript">        window.onunload = function() {            alert('dologging');        }       </script>This is required as i would call a web service logging method instead of firing an alert, onbeforeunload is not possible as i would like to something like belowwindow.onbeforeunload = function() {                       if (confirm("Are you sure")) {                alert("dologging");                self.close();            }            return null;        }BUT, there is no way to stop the unload as if you do not return a message it will c

Why sum function work fine in infopath and not in web browser

Hi,   I used the sum function in infopath, it work fine in infopath client, but the same open in web browser it not working correctly, it show the double the value. why it happen?

onclick on control with eval dosn't work

Hi, I have an aspx control with works perfectly:<asp:HyperLink ID="lnkSeekJob" runat="server" Text="Søgt job" NavigateUrl='<%# "SeekJob.aspx?id=" + Eval("companyPId")%>' Target="SeekJob" name="SeekJob" onClick="wopen('SeekJob.aspx?id=3', 'popup', 600, 480); return false;" /> The problem is that the id isn't always 3 - so I have to get the rows id - I try this with eval:<asp:HyperLink ID="lnkSeekJob" runat="server" Text="Søgt job" NavigateUrl='<%# "SeekJob.aspx?id=" + Eval("companyPId")%>' Target="SeekJob" name="SeekJob" onClick='<%# "wopen('SeekJob.aspx?id=" + Eval("companyPId") + ", 'popup', 600, 480); return false;"%>' /> But I then get the error: The server tag isn't weel formed. I think (I'm pretty sure) it's because of the "/' . They aren't set correctly. Can anyone help me - so I set these correctly? Kind regards, simsen :-)

i have tested the same coding with dropDownlist but its working fine..I don't know why its not work

Dear Members,              I have used the following to bind the data from database into Ajax comboBox...but it's not working...             Actually i have tested the same coding with dropDownlist but its working fine..I don't know why its not working with Ajax ComboBox..          DropDownList Coding  private void LoadDropDownCatetory() { string connectionString = ConfigurationManager.AppSettings.Get("mcrmdb"); dropDownListTest.DataSource = ProductDataAccess.FillProductCategory(connectionString); dropDownListTest.DataTextField = "CATEGORY"; dropDownListTest.DataValueField = "CATEGORY"; dropDownListTest.DataBind(); } AjaxComboBox Codingprivate void LoadProdutCategory() { string connectionString = ConfigurationManager.AppSettings.Get("mcrmdb"); comboBoxProductCategory.DataSource = ProductDataAccess.FillProductCategory(connectionString); comboBoxProductCategory.DataTextField = "CATEGORY"; comboBoxProductCategory.DataValueField = "CATEGORY"; comboBoxProductCategory.DataBind(); } Design

removeChild() Wont work on Mozilla FireFox ?


Hey, Here is my code:

function removeFlaskLeakInIE(id) {
    var obj = document.getElementById(id);
    if (obj) {
        for (var i in obj) {
            if (typeof obj[i] == "function") {
                obj[i] = null;



This code works on IE and Chrome, But doesn't work on FF... =\

Any ideas?

div not work on firefox


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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" >
<script type="text/javascript">
function showMe2(it,txtid,msg)
document.getElementById(it).style.display = "block";
document.getElementById(it).innerHTML = msg;//document.getElementById(txtid).parentElement.offsetTop ;
e.style.top= document.getElementById(txtid).parentElement.offsetTop+35;
e.align = "left";
//document.getElementById(it).style.top  =document.getElementById(txtid).style.top ;
function hide(it)
document.getElementById(it).style.display = "none";


    <form id="form1" runat="server">


Get the value of hiddenField HTML control not work properly in FireFox


Hi Guys,

I'm trying to access the the value of Hidden field as follows:

var empID= document.getElementById('HiddenField1').value;

It works well in IE but gives null in FireFox

onclick() of PopupControlExtender's target control does not work.


I am wondering if anyone could shed some light on why onclick of the target control does not work. 

I am asking this mainly out of curiosity because replacing onclcick with onfocus achieves what I need.

Ckeditor will not work in FireFox.


I'm using ckeditor in my page and it's work fine, except when I'm sending email. The mailbody is empty in FireFox, in IE it works fine. What can it be? Here is my code

protected void btnSend_Click(object sender, EventArgs e)
        string senderMail = txtSenderMail.Text;
        string subject = txtSubject.Text;
        string mess = Request.Form["editor1"];
        mess = HttpUtility.HtmlEncode(mess);

        bool isValid = Utilities.CheckString("^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$", senderMail);

        if (!isValid)
            lblMailStatus.Text = "<ul><li>Din epost stämmer inte!</li></ul>";
            lblMailStatus.CssClass = "boldText redText";
            bool success = Utilities.SendMail(txtSenderMail.Text, SiteConfig.MailReceiver, txtSubject.Text, Request.Form["editor1"]);

            if (success)
                lblMailStatus.Text = "<p></p>Ditt meddelande är skickat och vi kommer att svara så fort vi kan.<p></p>Tack för du använder vår hemsida<br />ImmWebb.se";
                lblMailStatus.CssClass = "boldText greenText";
                lblMailForm.Visible = false;

SqlClient Connection Works Fine with XP, will not work on Windows 7


Hello, I am programming in VS2010 wirting a simple windows forms program. I am using the System.data.SqlClient for a connection. My data Connection code:

'Used for reading data only



Public Function O

Sorting function does not work fine -- Please help



          We have few SSRS 2008 reports.Some of the reports are plain simple table reports and few reports are grouped reports ( table reports). The issue is, sorting function works fine in simple reports whereas its not working good in the reports where grouping is involved. Could you please help me to resolve it?

UpdatePanel don't work with Google Chorme or Mozilla Firefox.


Hi I am using update panels with Update mode conditional in by aspx page. The page is functioning properlly in the IE.8.0 but the page content is not posting when i open it in the Google Chrome or Mozilla Firefox.

FYI I am using Update panels for drop down lists and buttons and in the triggers also i am using similar controls

Pls can you suggest a way to get this out.



Is it possible to disable all javascript functions which are set to work after a certain time, after


Is it possible to disable all javascript functions which are set to work after a certain time, after update panel asynchronous postback

as you alread know you can set certain functions to get executed after a certain time with setTimeout method

i want to disable all setTimeout method setuped functions after update panel asynchronous postback

is this possible

thank you

"Old" Views work fine, "New" Views throw an error


I have a very weird problem with Analysis Services 2008 R2.  When I add an existing View to the DSV then it works fine.  I can add a dimension and process it with no errors.

When I create a new View and add this to the DSV then everything looks okay, I can explore the data and this looks good.  But when I try to create a dimension from the new View then it fails when processing saying, "Invalid object name 'dbo.vwTest'" for example.

I am using a domain user account for Impersonation and this account has sysadmin rights on the database in question.  I also checked the GRANTs were the same on both views and they are.  In fact I ended up checking everything on the Property pages to ensure they were identical for the working and non-working View.

As far as I can tell there is no difference between existing Views and ones I create so why should this be happening? 

Excel 2010 Functions with SQL2008 don't work


Hi all,

it seems that with the following configuration Excel Functions don't work, because AS doesn't recognize it.

OS: WIN 2008R2

SQL: SQL2008 sp2 x64

Office: Office 2010 x86


Does somebody experienced the same issue?

I would need excel function NORMSINV..





RadioButton inside GridView, How to get it work as normal

Did you tried before to drag a RadioButton control inside a Gridivew templatefield, and then you attempt to select these RadioButtons , you will notice that the behavior of RadioButton control will be changed and it will work just like the behavior of checkbox control! the user will be able to select more than one radiobutton in the grid!

Looking for guidance: wanting to work with AJAX architecture



I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend