Problem with blocked popup in Firefox

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with blocked popup in Firefox

ricetrac

Hello,

 

We have a link in our forms defined like this :

<xforms:submission id=" AfficherMarche " validate="false" resource="/extranet/marchepublic/ visumarche " method="post" ref="instance('entiteChoisi')" xxforms:target="_blank" xxforms:show-progress="false"/>

 

And a trigger like this :

<xforms:trigger appearance="minimal">

                                               <xforms:label><xforms:output ref="msIdentifiant"/></xforms:label>

                                               <xforms:send submission=" AfficherMarche " ev:event="DOMActivate"/>

                                               <xforms:action ev:event="DOMActivate">

                                                               <xforms:setvalue ref="instance('entiteChoisi')/miCode" value="xxforms:context('marches')/miCode"/>

                                                               <xforms:setvalue ref="instance('entiteChoisi')/miAnnee" value="xxforms:context('marches')/miAnnee"/>

                                               </xforms:action>

                               </xforms:trigger>

 

 

When we click on that link in Firefox 3.6.13 and if the popup are blocked, we get this error :

 

Exception in client-side code.

  • Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLFormElement.submit]
  • Line number: 88

 

If the popup are unblocked, the link works fine.

 

On IE 7 and IE 8, this link works fine too.

 

We use Orbeon 3.8 release in tomcat 5.5.25 and jdk 1.6.

 

Have you an idea ?

 

Thank You.

 

Julien.

 

 


Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem with blocked popup in Firefox

Erik Bruchez
Administrator
Julien,

Good question. Browsers' popup blockers simply won't allow JavaScript code to open new windows unless that code is a direct response to a user action.

In Orbeon Forms, the opening of the new window with a submission and target is not direct: there is an Ajax request/response in between. In theory, browsers could handle that, but unfortunately they don't. So you hit the popup blocker.

In fact we just changed how the PDF buttons work in Form Runner to avoid this very problem. Our solution for this involves JavaScript doing a window.open() upon the user clicking a button. The browser issues a GET to the URL specified, to generate the PDF.

Sometimes, this can be trickier, and you have to:

* in a first phase, generate content on the server and save it to a temporary location (disk, session)
* in a second phase, have the user click a button or link to open a URL in a new window (with JavaScript or an <a>)

-Erik

On Tue, Mar 1, 2011 at 12:39 AM, Bittard, Julien <[hidden email]> wrote:

Hello,

 

We have a link in our forms defined like this :

<xforms:submission id=" AfficherMarche " validate="false" resource="/extranet/marchepublic/ visumarche " method="post" ref="instance('entiteChoisi')" xxforms:target="_blank" xxforms:show-progress="false"/>

 

And a trigger like this :

<xforms:trigger appearance="minimal">

                                               <xforms:label><xforms:output ref="msIdentifiant"/></xforms:label>

                                               <xforms:send submission=" AfficherMarche " ev:event="DOMActivate"/>

                                               <xforms:action ev:event="DOMActivate">

                                                               <xforms:setvalue ref="instance('entiteChoisi')/miCode" value="xxforms:context('marches')/miCode"/>

                                                               <xforms:setvalue ref="instance('entiteChoisi')/miAnnee" value="xxforms:context('marches')/miAnnee"/>

                                               </xforms:action>

                               </xforms:trigger>

 

 

When we click on that link in Firefox 3.6.13 and if the popup are blocked, we get this error :

 

Exception in client-side code.

  • Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLFormElement.submit]
  • Line number: 88

 

If the popup are unblocked, the link works fine.

 

On IE 7 and IE 8, this link works fine too.

 

We use Orbeon 3.8 release in tomcat 5.5.25 and jdk 1.6.

 

Have you an idea ?

 

Thank You.

 

Julien.

 

 


Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws