473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Firefox doPostBack (LinkButton) not working

The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an
autopostback checkbox, for that matter).

I'm aware of a problem with Netscape browsers and the postback code, but I have a workaround for
that installed (and it looks like the code generated by ASP.NET when it renders the page does the
same thing, namely, setting document<[formname> = document.forms["<formname>"]). However, the
problem still exists under firefox.

Has anyone come up with a workaround for this incompatibility?

- Mark
Nov 19 '05 #1
6 14422
Hi Mark,

Welcome to ASPNET newsgroup.
As for the ASP.NET generated autopostback scripting problem on firefox,
based on my research, for the __doPostBack script, it should works on both
IE and other popular browser in clude Mozilla or the new firefox. And I've
tested on my local environment through the latest firefox 1.7, here is the
ASP.NET page generated script for __doPostBack function:

=================
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
==================

And the script can correctly postback (submit the form) from my local test
environment(also tested through a Mozilla 1.6 client). Is it identical to
the ones on your side? Have you also tested on some other machine or client
to see whether you also encounter the same problem?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| NNTP-Posting-Date: Tue, 27 Sep 2005 10:11:34 -0500
| From: Mark Olbert <ma**@arcabama.com>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Firefox doPostBack (LinkButton) not working
| Date: Tue, 27 Sep 2005 08:11:32 -0700
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <6v********************************@4ax.com>
| X-Newsreader: Forte Agent 3.0/32.763
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 11
| X-Trace:
sv3-VZODfTr23qFJeEe4lNHKZg2IFBOUm6pzkDOvHROXEuK2qDPZM5 fpL7hT9PlSPDW8Jk/MGdxZ
o00dBYS!DVvgqilOBH/ZuVYwLkplgXmQCMGZpRuEkAXk08QMxxppuizKi72hcOCknbhC0/97/O0P
kA==
| X-Complaints-To: ab***@giganews.com
| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:127427
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| The doPostBack javascript functioning is not submitting the page when
called by linkbuttons (or an
| autopostback checkbox, for that matter).
|
| I'm aware of a problem with Netscape browsers and the postback code, but
I have a workaround for
| that installed (and it looks like the code generated by ASP.NET when it
renders the page does the
| same thing, namely, setting document<[formname> =
document.forms["<formname>"]). However, the
| problem still exists under firefox.
|
| Has anyone come up with a workaround for this incompatibility?
|
| - Mark
|

Nov 19 '05 #2
KMA
Mark,

I presume that you haven't got scripting turned off in Firefox security tab?

"Mark Olbert" <ma**@arcabama.com> wrote in message
news:6v********************************@4ax.com...
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter).

I'm aware of a problem with Netscape browsers and the postback code, but I have a workaround for that installed (and it looks like the code generated by ASP.NET when it renders the page does the same thing, namely, setting document<[formname> = document.forms["<formname>"]). However, the problem still exists under firefox.

Has anyone come up with a workaround for this incompatibility?

- Mark

Nov 19 '05 #3
Nope, it's running.

On Wed, 28 Sep 2005 10:56:46 +0200, "KMA" <km*@chum.com> wrote:
Mark,

I presume that you haven't got scripting turned off in Firefox security tab?

Nov 19 '05 #4
The only difference between the javascript functions is that the one on my page uses 'private'
instead of 'Form1'.

I checked the javascript console under Firefox when I'm on te problem page, and it turns out Firefox
does >>not<< like having properties named 'private'. Changing the name of the form element solved
the problem.

I'm not sure how the form element got named private. I can't recall ever naming a form element; I
just accept whatever default gets used when I create a page, or add one to a project.

- Mark

On Wed, 28 Sep 2005 03:10:32 GMT, st*****@online.microsoft.com (Steven Cheng[MSFT]) wrote:
Hi Mark,

Welcome to ASPNET newsgroup.
As for the ASP.NET generated autopostback scripting problem on firefox,
based on my research, for the __doPostBack script, it should works on both
IE and other popular browser in clude Mozilla or the new firefox. And I've
tested on my local environment through the latest firefox 1.7, here is the
ASP.NET page generated script for __doPostBack function:

=================
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
==================

And the script can correctly postback (submit the form) from my local test
environment(also tested through a Mozilla 1.6 client). Is it identical to
the ones on your side? Have you also tested on some other machine or client
to see whether you also encounter the same problem?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| NNTP-Posting-Date: Tue, 27 Sep 2005 10:11:34 -0500
| From: Mark Olbert <ma**@arcabama.com>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Firefox doPostBack (LinkButton) not working
| Date: Tue, 27 Sep 2005 08:11:32 -0700
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <6v********************************@4ax.com>
| X-Newsreader: Forte Agent 3.0/32.763
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 11
| X-Trace:
sv3-VZODfTr23qFJeEe4lNHKZg2IFBOUm6pzkDOvHROXEuK2qDPZM5 fpL7hT9PlSPDW8Jk/MGdxZ
o00dBYS!DVvgqilOBH/ZuVYwLkplgXmQCMGZpRuEkAXk08QMxxppuizKi72hcOCknbhC0/97/O0P
kA==
| X-Complaints-To: ab***@giganews.com
| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfe ed00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp. dca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.gigane ws.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:127427
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| The doPostBack javascript functioning is not submitting the page when
called by linkbuttons (or an
| autopostback checkbox, for that matter).
|
| I'm aware of a problem with Netscape browsers and the postback code, but
I have a workaround for
| that installed (and it looks like the code generated by ASP.NET when it
renders the page does the
| same thing, namely, setting document<[formname> =
document.forms["<formname>"]). However, the
| problem still exists under firefox.
|
| Has anyone come up with a workaround for this incompatibility?
|
| - Mark
|

Nov 19 '05 #5
So it's just a naming issue due to browser specific rules. Anyway, glad
that you've figured it out.
If there're any further issues we can help, please feel free to post here.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| NNTP-Posting-Date: Wed, 28 Sep 2005 10:04:02 -0500
| From: Mark Olbert <ma**@arcabama.com>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: Firefox doPostBack (LinkButton) not working
| Date: Wed, 28 Sep 2005 08:04:03 -0700
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <gj********************************@4ax.com>
| References: <6v********************************@4ax.com>
<uO*************@TK2MSFTNGXA01.phx.gbl>
| X-Newsreader: Forte Agent 3.0/32.763
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 104
| X-Trace:
sv3-3eEFmxjQOpk15Sa2Qh5xcYZRMV3DPMjHciTcUyxYIQLMu+doGp uwgskqHgd1FfbsOAIyIUzE
NavGuTI!X9KwVCGigAtu4iFzNWCj4xF2R/xEp/2uQQCMsW1iF2fmHSsQ9xboMj1L38NXSFOt8sNQ
pA==
| X-Complaints-To: ab***@giganews.com
| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:127709
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| The only difference between the javascript functions is that the one on
my page uses 'private'
| instead of 'Form1'.
|
| I checked the javascript console under Firefox when I'm on te problem
page, and it turns out Firefox
| does >>not<< like having properties named 'private'. Changing the name of
the form element solved
| the problem.
|
| I'm not sure how the form element got named private. I can't recall ever
naming a form element; I
| just accept whatever default gets used when I create a page, or add one
to a project.
|
| - Mark
|
| On Wed, 28 Sep 2005 03:10:32 GMT, st*****@online.microsoft.com (Steven
Cheng[MSFT]) wrote:
|
| >Hi Mark,
| >
| >Welcome to ASPNET newsgroup.
| >As for the ASP.NET generated autopostback scripting problem on firefox,
| >based on my research, for the __doPostBack script, it should works on
both
| >IE and other popular browser in clude Mozilla or the new firefox. And
I've
| >tested on my local environment through the latest firefox 1.7, here is
the
| >ASP.NET page generated script for __doPostBack function:
| >
| >=================
| ><script language="javascript" type="text/javascript">
| ><!--
| > function __doPostBack(eventTarget, eventArgument) {
| > var theform;
| > if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
| > theform = document.Form1;
| > }
| > else {
| > theform = document.forms["Form1"];
| > }
| > theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
| > theform.__EVENTARGUMENT.value = eventArgument;
| > theform.submit();
| > }
| >// -->
| ></script>
| >==================
| >
| >And the script can correctly postback (submit the form) from my local
test
| >environment(also tested through a Mozilla 1.6 client). Is it identical
to
| >the ones on your side? Have you also tested on some other machine or
client
| >to see whether you also encounter the same problem?
| >
| >Thanks,
| >
| >Steven Cheng
| >Microsoft Online Support
| >
| >Get Secure! www.microsoft.com/security
| >(This posting is provided "AS IS", with no warranties, and confers no
| >rights.)
| >
| >--------------------
| >| NNTP-Posting-Date: Tue, 27 Sep 2005 10:11:34 -0500
| >| From: Mark Olbert <ma**@arcabama.com>
| >| Newsgroups: microsoft.public.dotnet.framework.aspnet
| >| Subject: Firefox doPostBack (LinkButton) not working
| >| Date: Tue, 27 Sep 2005 08:11:32 -0700
| >| Organization: Olbert & McHugh, LLC
| >| Reply-To: ma**@arcabama.com
| >| Message-ID: <6v********************************@4ax.com>
| >| X-Newsreader: Forte Agent 3.0/32.763
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Lines: 11
| >| X-Trace:
|
sv3-VZODfTr23qFJeEe4lNHKZg2IFBOUm6pzkDOvHROXEuK2qDPZM5 fpL7hT9PlSPDW8Jk/MGdx Z
|o00dBYS!DVvgqilOBH/ZuVYwLkplgXmQCMGZpRuEkAXk08QMxxppuizKi72hcOCknbhC0/97/O0 P
| >kA==
| >| X-Complaints-To: ab***@giganews.com
| >| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
| >| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| >| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
| >complaint properly
| >| X-Postfilter: 1.3.32
| >| Path:
|TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfe ed00.sul.t-online.de!t-onl i
|ne.de!border2.nntp.dca.giganews.com!border1.nntp. dca.giganews.com!nntp.giga n
|ews.com!local01.nntp.dca.giganews.com!news.gigane ws.com.POSTED!not-for-mail

| >| Xref: TK2MSFTNGXA01.phx.gbl
| >microsoft.public.dotnet.framework.aspnet:127427
| >| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| >|
| >| The doPostBack javascript functioning is not submitting the page when
| >called by linkbuttons (or an
| >| autopostback checkbox, for that matter).
| >|
| >| I'm aware of a problem with Netscape browsers and the postback code,
but
| >I have a workaround for
| >| that installed (and it looks like the code generated by ASP.NET when
it
| >renders the page does the
| >| same thing, namely, setting document<[formname> =
| >document.forms["<formname>"]). However, the
| >| problem still exists under firefox.
| >|
| >| Has anyone come up with a workaround for this incompatibility?
| >|
| >| - Mark
| >|
|

Nov 19 '05 #6

I had Firefox 1.0.x working fine with my ASP.NET 1.1 app, but then I
upgraded to 2.0, changed all of my pages to Master Pages that are XHTML
1.1 transitional compliant, and upgraded Firefox to 1.5.x all at the
same time. And now, although Opera and Netscape (using IE rendering as
default instead of Firefox) work fine, I'm running into a problem with
any link buttons that do a postback on Firefox where nothing happens
when I click

I don't have an private variables variables, so I can't fix it that
easily. And the javascript I'm seeing generated to handle the postback
is a little different than the example you gave, e.g. mine is (see
below). So I was wondering if you had any suggestions.

theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->

--
cooplarsh
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

May 21 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Timothy Kelley | last post by:
This bug has my application crippled in I.E. 5.0. I'm calling the __doPostBack Fuction from my custom javascript function Submit(pict) It never reaches it in i.e. 5.0 I'm using 1.1 framework....
14
by: menakasrinivasagam | last post by:
my coding is working in mozilla firefox.but not working in Internet explorer.plz give suggestion to rectify this problem
1
by: Lollygag | last post by:
Hi folks. Please try not to laugh at my web design noobness, I'm a photoshop monkey, but I thought I'd have a go at updating this website to learn css & html, it's far more complex than I'd...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
2
by: sajithamol | last post by:
How can i migrate one application from IE to Mozilla Firefox. while working in IE , javascript was working perfectly . But when i used Mozilla firefox , javascript not working. How can i make one...
1
by: manojsharma | last post by:
hey can anybody tell me y my onkeyup event is not working in firefox.. it is working fine in IE... code <input type="text" name="oddteam" size="1" value="1" ...
5
by: black143 | last post by:
Hi All, i am using this below addElement() function to create the file element dynamically function addElement( filename,businessName ){ // Make sure it's a file input element //if(...
1
by: bogdanm | last post by:
Hello everyone, I am having a probleme with a issuu code when trying to insert it o my site it doesnt work in IE but in mozzila works fine the code is bellow: <div><object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.