Hi,
How to restrict the right click and Back link of browser in the ofbiz application Regards Prasanthi |
Hello,
You can restrict your user to go back using this javascript. <script type="text/javascript"> window.history.forward(0); </script> Regards Sachin kanojiya |
Hi,
For disabling right click you can use the following code : <script type="text/javascript"> document.oncontextmenu=new Function("return false") </script> -- Thanks& Regards: Ankit Jain Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com On Wednesday 02 June 2010 05:36 PM, sachin kanojiya wrote: > Hello, > > You can restrict your user to go back using this javascript. > > <script type="text/javascript"> > window.history.forward(0); > </script> > > Regards > Sachin kanojiya > > |
Administrator
|
Thanks Ankit, Sachin,
I put your tips in the FAQ Jacques From: "Ankit Jain" <[hidden email]> > Hi, > For disabling right click you can use the following code : > > <script type="text/javascript"> > document.oncontextmenu=new Function("return false") > </script> > > -- > > Thanks& Regards: > Ankit Jain > Enterprise Software Developer > Hotwax Media Pvt. Ltd. > www.hotwaxmedia.com > > > > On Wednesday 02 June 2010 05:36 PM, sachin kanojiya wrote: >> Hello, >> >> You can restrict your user to go back using this javascript. >> >> <script type="text/javascript"> >> window.history.forward(0); >> </script> >> >> Regards >> Sachin kanojiya >> >> > > |
might also add that if your doing this to stop theft of content or
pictures it does not work against spiders and bots. only against people using a web browser ========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> Jacques Le Roux sent the following on 6/2/2010 10:30 AM: > Thanks Ankit, Sachin, > > I put your tips in the FAQ > > Jacques > > From: "Ankit Jain" <[hidden email]> >> Hi, >> For disabling right click you can use the following code : >> >> <script type="text/javascript"> >> document.oncontextmenu=new Function("return false") >> </script> >> >> -- >> >> Thanks& Regards: >> Ankit Jain >> Enterprise Software Developer >> Hotwax Media Pvt. Ltd. >> www.hotwaxmedia.com >> >> >> >> On Wednesday 02 June 2010 05:36 PM, sachin kanojiya wrote: >>> Hello, >>> >>> You can restrict your user to go back using this javascript. >>> >>> <script type="text/javascript"> >>> window.history.forward(0); >>> </script> >>> >>> Regards >>> Sachin kanojiya >>> >>> >> >> > > |
Administrator
|
If you want to specifically protect some views from theft, you may use
https://demo-trunk.ofbiz.apache.org/partymgr/control/EditSecurityGroupProtectedViews?groupId=ACCTG_FUNCTNL_ADMIN Jacques From: "BJ Freeman" <[hidden email]> > might also add that if your doing this to stop theft of content or > pictures it does not work against spiders and bots. > only against people using a web browser > > ========================= > BJ Freeman > http://bjfreeman.elance.com > Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> > Specialtymarket.com <http://www.specialtymarket.com/> > > Systems Integrator-- Glad to Assist > > Chat Y! messenger: bjfr33man > <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> > > > Jacques Le Roux sent the following on 6/2/2010 10:30 AM: >> Thanks Ankit, Sachin, >> >> I put your tips in the FAQ >> >> Jacques >> >> From: "Ankit Jain" <[hidden email]> >>> Hi, >>> For disabling right click you can use the following code : >>> >>> <script type="text/javascript"> >>> document.oncontextmenu=new Function("return false") >>> </script> >>> >>> -- >>> >>> Thanks& Regards: >>> Ankit Jain >>> Enterprise Software Developer >>> Hotwax Media Pvt. Ltd. >>> www.hotwaxmedia.com >>> >>> >>> >>> On Wednesday 02 June 2010 05:36 PM, sachin kanojiya wrote: >>>> Hello, >>>> >>>> You can restrict your user to go back using this javascript. >>>> >>>> <script type="text/javascript"> >>>> window.history.forward(0); >>>> </script> >>>> >>>> Regards >>>> Sachin kanojiya >>>> >>>> >>> >>> >> >> > |
thanks saw that but have not investigated it.
========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> Jacques Le Roux sent the following on 6/2/2010 1:49 PM: > If you want to specifically protect some views from theft, you may use > https://demo-trunk.ofbiz.apache.org/partymgr/control/EditSecurityGroupProtectedViews?groupId=ACCTG_FUNCTNL_ADMIN > > > Jacques > > From: "BJ Freeman" <[hidden email]> >> might also add that if your doing this to stop theft of content or >> pictures it does not work against spiders and bots. >> only against people using a web browser >> >> ========================= >> BJ Freeman >> http://bjfreeman.elance.com >> Strategic Power Office with Supplier Automation >> <http://www.businessesnetwork.com/automation/viewforum.php?f=52> >> Specialtymarket.com <http://www.specialtymarket.com/> >> >> Systems Integrator-- Glad to Assist >> >> Chat Y! messenger: bjfr33man >> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> >> >> >> >> Jacques Le Roux sent the following on 6/2/2010 10:30 AM: >>> Thanks Ankit, Sachin, >>> >>> I put your tips in the FAQ >>> >>> Jacques >>> >>> From: "Ankit Jain" <[hidden email]> >>>> Hi, >>>> For disabling right click you can use the following code : >>>> >>>> <script type="text/javascript"> >>>> document.oncontextmenu=new Function("return false") >>>> </script> >>>> >>>> -- >>>> >>>> Thanks& Regards: >>>> Ankit Jain >>>> Enterprise Software Developer >>>> Hotwax Media Pvt. Ltd. >>>> www.hotwaxmedia.com >>>> >>>> >>>> >>>> On Wednesday 02 June 2010 05:36 PM, sachin kanojiya wrote: >>>>> Hello, >>>>> >>>>> You can restrict your user to go back using this javascript. >>>>> >>>>> <script type="text/javascript"> >>>>> window.history.forward(0); >>>>> </script> >>>>> >>>>> Regards >>>>> Sachin kanojiya >>>>> >>>>> >>>> >>>> >>> >>> >> > > |
Thanks Jacques , BJ. :-)
HTH -- Thanks& Regards: Ankit Jain Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com On Thursday 03 June 2010 02:47 AM, BJ Freeman wrote: > thanks saw that but have not investigated it. > > ========================= > BJ Freeman > http://bjfreeman.elance.com > Strategic Power Office with Supplier Automation<http://www.businessesnetwork.com/automation/viewforum.php?f=52> > Specialtymarket.com<http://www.specialtymarket.com/> > > Systems Integrator-- Glad to Assist > > Chat Y! messenger: bjfr33man > <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> > > > Jacques Le Roux sent the following on 6/2/2010 1:49 PM: > >> If you want to specifically protect some views from theft, you may use >> https://demo-trunk.ofbiz.apache.org/partymgr/control/EditSecurityGroupProtectedViews?groupId=ACCTG_FUNCTNL_ADMIN >> >> >> Jacques >> >> From: "BJ Freeman"<[hidden email]> >> >>> might also add that if your doing this to stop theft of content or >>> pictures it does not work against spiders and bots. >>> only against people using a web browser >>> >>> ========================= >>> BJ Freeman >>> http://bjfreeman.elance.com >>> Strategic Power Office with Supplier Automation >>> <http://www.businessesnetwork.com/automation/viewforum.php?f=52> >>> Specialtymarket.com<http://www.specialtymarket.com/> >>> >>> Systems Integrator-- Glad to Assist >>> >>> Chat Y! messenger: bjfr33man >>> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> >>> >>> >>> >>> Jacques Le Roux sent the following on 6/2/2010 10:30 AM: >>> >>>> Thanks Ankit, Sachin, >>>> >>>> I put your tips in the FAQ >>>> >>>> Jacques >>>> >>>> From: "Ankit Jain"<[hidden email]> >>>> >>>>> Hi, >>>>> For disabling right click you can use the following code : >>>>> >>>>> <script type="text/javascript"> >>>>> document.oncontextmenu=new Function("return false") >>>>> </script> >>>>> >>>>> -- >>>>> >>>>> Thanks& Regards: >>>>> Ankit Jain >>>>> Enterprise Software Developer >>>>> Hotwax Media Pvt. Ltd. >>>>> www.hotwaxmedia.com >>>>> >>>>> >>>>> >>>>> On Wednesday 02 June 2010 05:36 PM, sachin kanojiya wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> You can restrict your user to go back using this javascript. >>>>>> >>>>>> <script type="text/javascript"> >>>>>> window.history.forward(0); >>>>>> </script> >>>>>> >>>>>> Regards >>>>>> Sachin kanojiya >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >> >> > |
In reply to this post by Ankit Jain-3
Hi,
I found another way of doing the same, as it(contextmenu) is an event so we can do it like below : Event.observe(window, 'contextmenu', function(event) { event.stop(); Thanks Ankit Jain On Wednesday 02 June 2010 10:01 PM, Ankit Jain wrote: > Hi, > For disabling right click you can use the following code : > > <script type="text/javascript"> > document.oncontextmenu=new Function("return false") > </script> > -- Thanks& Regards: Ankit Jain Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com |
Dear Ankit,
I want to restrict the back link click in entire ofbiz[Accounting,AP,AR] application. Where I have to add your code?. Is it global specification or module wise? Regards Prasanthi |
Hi Prasanthi,
Include the code in a js file and add that file in the main decorator, so it will everywhere in the module. -- Thanks& Regards: Ankit Jain Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com On Wednesday 16 June 2010 12:06 PM, prasanthi_ofbiz wrote: > Dear Ankit, > I want to restrict the back link click in entire ofbiz[Accounting,AP,AR] > application. Where I have to add your code?. Is it global specification or > module wise? > > Regards > Prasanthi > |
Dear Ankit,
Thanks for your reply. I have bit confusion like whether I have to create new js file or I have to add this piece of code to existing js file. If its a new file in which folder I have to add this file? If its a existing file please tell me the file name. Other wise tell me in which file I have to add that script code given in tour first reply as <script type="text/javascript"> window.history.forward(0); </script> Regards Prasanthi |
Hi Prashanti,
Search the common js file which is loading in the [Accounting, AP, AR] module then put your code in that file, take help of firebug. or you can just add a new js file in the accounting's main-decorator as given below eg. <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/popup.js" global="true"/> -- Thanks& Regards: Ankit Jain Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com On Wednesday 16 June 2010 12:53 PM, prasanthi_ofbiz wrote: > Dear Ankit, > Thanks for your reply. I have bit confusion like whether I have to create > new js file or I have to add this piece of code to existing js file. > If its a new file in which folder I have to add this file? If its a existing > file please tell me the file name. > Other wise tell me in which file I have to add that script code given in > tour first reply as > <script type="text/javascript"> > window.history.forward(0); > </script> > > Regards > Prasanthi > > |
Dear Ankit,
I have added this code in the prototype.js like onRightClick: Event.observe(window, 'contextmenu', function(event) {event.stop();}); This will restrict user on right click. But its not restrict user to click on 'Back' link of browser. How to resolve the same Regards, Prasanthi |
Administrator
|
I think it's time for you to help yourself
https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-AjaxJavascriptJson Jacques From: "prasanthi_ofbiz" <[hidden email]> > > Dear Ankit, > I have added this code in the prototype.js like > onRightClick: Event.observe(window, 'contextmenu', function(event) > {event.stop();}); > This will restrict user on right click. > But its not restrict user to click on 'Back' link of browser. > How to resolve the same > > Regards, > Prasanthi > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/How-to-disable-right-click-and-back-buttons-after-logged-in-into-ofbiz-tp2238341p2257187.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Hello Prasanthi,
I think you have to read the previous mails of the this thread, Sachin Kanojiya already replied to this. This is another way of doing the same, place "window.history.forward(0); " on window load event.like Event.observe(window, 'load', function() {...............}); And one more thing prototype.js is library file so its better to add custom code in other js file. Thanks Jacques for the link. Prashanthi please refer the link given by Jacques. -- Thanks& Regards: Ankit Jain Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com On Wednesday 16 June 2010 05:13 PM, Jacques Le Roux wrote: > I think it's time for you to help yourself > https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-AjaxJavascriptJson > > > Jacques > > From: "prasanthi_ofbiz" <[hidden email]> >> >> Dear Ankit, >> I have added this code in the prototype.js like >> onRightClick: Event.observe(window, 'contextmenu', function(event) >> {event.stop();}); >> This will restrict user on right click. >> But its not restrict user to click on 'Back' link of browser. >> How to resolve the same >> >> Regards, >> Prasanthi >> -- >> View this message in context: >> http://ofbiz.135035.n4.nabble.com/How-to-disable-right-click-and-back-buttons-after-logged-in-into-ofbiz-tp2238341p2257187.html >> >> Sent from the OFBiz - User mailing list archive at Nabble.com. >> > > |
Free forum by Nabble | Edit this page |