Re: <a href="javascript:document... Is not supported by Firefox browser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: <a href="javascript:document... Is not supported by Firefox browser

Paul Foxworthy
>
> Le 18/06/2019 à 16:06, [hidden email] a écrit :
>


> > Today I see one problem is Firefox browser does not support this command
> "<a href="javascript:document...".
> > So have anyone have solution for this issue.
>

Stack Overflow discusses the issue here:
https://stackoverflow.com/questions/38856853/a-href-javascriptfunction-in-firefox-not-working


Thanh, can you give us an example where this occurs? Is there an error
message in the FIrefox developer console when the problem occurs?

It seems some ftl templates have JavaScript hrefs - for example, the Help
at top right calls a JavaScript function. That's working for me with
Firefox 60.

 A quick fix might be to change

<a href="javascript:document...

to

<a href="javascript:void(document...)

Better would be to attach an event handler rather than have inline
JavaScript.

Cheers

Paul Foxworthy

--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [hidden email]
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: <a href="javascript:document... Is not supported by Firefox browser

thanhnguyen0202lk@gmail.com
Hi Paul Foxworthy,

I want to print PDF on Sales Quote.

On Google Chrome it is work fine, but on firefox it can not print, 

Here is code after ofbiz generate into HTML


And here is menu standard code from Ofbiz.

So do you have any solution on it, please help?

On Wed, Jun 19, 2019 at 8:43 AM Paul Foxworthy <[hidden email]> wrote:
Le 18/06/2019 à 16:06, [hidden email] a écrit :
 
> Today I see one problem is Firefox browser does not support this command "<a href="javascript:document...".
> So have anyone have solution for this issue.


Thanh, can you give us an example where this occurs? Is there an error message in the FIrefox developer console when the problem occurs?

It seems some ftl templates have JavaScript hrefs - for example, the Help at top right calls a JavaScript function. That's working for me with Firefox 60.

 A quick fix might be to change

<a href="javascript:document... 

to

<a href="javascript:void(document...)

Better would be to attach an event handler rather than have inline JavaScript.

Cheers

Paul Foxworthy

--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: <a href="javascript:document... Is not supported by Firefox browser

Paul Foxworthy
Hi Thanh,

On the demo website I went to https://demo-stable.ofbiz.apache.org/ordermgr/control/ViewQuote?quoteId=CQ0001 and clicked the PDF button, and it worked in Firefox 60.

Is there an error message on your Firefox developer console?

Cheers

Paul Foxworthy

On Wed, 19 Jun 2019 at 12:44, Thanh Nguyen <[hidden email]> wrote:
Hi Paul Foxworthy,

I want to print PDF on Sales Quote.

On Google Chrome it is work fine, but on firefox it can not print, 

Here is code after ofbiz generate into HTML


And here is menu standard code from Ofbiz.

So do you have any solution on it, please help?

On Wed, Jun 19, 2019 at 8:43 AM Paul Foxworthy <[hidden email]> wrote:
Le 18/06/2019 à 16:06, [hidden email] a écrit :
 
> Today I see one problem is Firefox browser does not support this command "<a href="javascript:document...".
> So have anyone have solution for this issue.


Thanh, can you give us an example where this occurs? Is there an error message in the FIrefox developer console when the problem occurs?

It seems some ftl templates have JavaScript hrefs - for example, the Help at top right calls a JavaScript function. That's working for me with Firefox 60.

 A quick fix might be to change

<a href="javascript:document... 

to

<a href="javascript:void(document...)

Better would be to attach an event handler rather than have inline JavaScript.

Cheers

Paul Foxworthy

--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [hidden email]


--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [hidden email]
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: <a href="javascript:document... Is not supported by Firefox browser

Jacques Le Roux
Administrator
In reply to this post by thanhnguyen0202lk@gmail.com

Please Thanh ,

Your message has been moderated again.

You sent direct emails to me and Paul. That's not a good practice. We prefer to exchange through the official OFBiz MLs.

Please (again) subscribe to the user ML for such questions and then use your email client
See also why here http://ofbiz.apache.org/mailing-lists.html

Jacques

Le 19/06/2019 à 04:44, Thanh Nguyen a écrit :
Hi Paul Foxworthy,

I want to print PDF on Sales Quote.

On Google Chrome it is work fine, but on firefox it can not print, 

Here is code after ofbiz generate into HTML

image.png

And here is menu standard code from Ofbiz.
image.png

So do you have any solution on it, please help?

On Wed, Jun 19, 2019 at 8:43 AM Paul Foxworthy <[hidden email]> wrote:
Le 18/06/2019 à 16:06, [hidden email] a écrit :
 
> Today I see one problem is Firefox browser does not support this command "<a href=<a class="moz-txt-link-rfc2396E" href="javascript:document...">"javascript:document...".
> So have anyone have solution for this issue.


Thanh, can you give us an example where this occurs? Is there an error message in the FIrefox developer console when the problem occurs?

It seems some ftl templates have JavaScript hrefs - for example, the Help at top right calls a JavaScript function. That's working for me with Firefox 60.

 A quick fix might be to change

<a href="<a class="moz-txt-link-freetext" href="javascript:document">javascript:document... 

to

<a href="<a class="moz-txt-link-freetext" href="javascript:void(document...)">javascript:void(document...)

Better would be to attach an event handler rather than have inline JavaScript.

Cheers

Paul Foxworthy

--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [hidden email]

  



	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: <a href="javascript:document... Is not supported by Firefox browser

Jacques Le Roux
Administrator

BTW, you attached images. Most of the time (almost 99%) they don't get through to MLs. That's an ASF policy, else the transport would be too heavy. You can get an idea about the volume here: https://projects.apache.org/

I don't know if someone is able to read them, I doubt.

Better to use another way and to reference HTML links to images.

Jacques

Le 19/06/2019 à 14:04, Jacques Le Roux a écrit :

Please Thanh ,

Your message has been moderated again.

You sent direct emails to me and Paul. That's not a good practice. We prefer to exchange through the official OFBiz MLs.

Please (again) subscribe to the user ML for such questions and then use your email client
See also why here http://ofbiz.apache.org/mailing-lists.html

Jacques

Le 19/06/2019 à 04:44, Thanh Nguyen a écrit :
Hi Paul Foxworthy,

I want to print PDF on Sales Quote.

On Google Chrome it is work fine, but on firefox it can not print, 

Here is code after ofbiz generate into HTML

image.png

And here is menu standard code from Ofbiz.
image.png

So do you have any solution on it, please help?

On Wed, Jun 19, 2019 at 8:43 AM Paul Foxworthy <[hidden email]> wrote:
Le 18/06/2019 à 16:06, [hidden email] a écrit :
 
> Today I see one problem is Firefox browser does not support this command "<a href=<a class="moz-txt-link-rfc2396E" href="javascript:document..." moz-do-not-send="true">"javascript:document...".
> So have anyone have solution for this issue.


Thanh, can you give us an example where this occurs? Is there an error message in the FIrefox developer console when the problem occurs?

It seems some ftl templates have JavaScript hrefs - for example, the Help at top right calls a JavaScript function. That's working for me with Firefox 60.

 A quick fix might be to change

<a href="<a class="moz-txt-link-freetext" href="javascript:document" moz-do-not-send="true">javascript:document... 

to

<a href="<a class="moz-txt-link-freetext" href="javascript:void(document...)" moz-do-not-send="true">javascript:void(document...)

Better would be to attach an event handler rather than have inline JavaScript.

Cheers

Paul Foxworthy

--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [hidden email]