How to disable right click and back buttons after logged in into ofbiz

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

How to disable right click and back buttons after logged in into ofbiz

prasanthi_ofbiz
Hi,
How to restrict the right click and Back link of browser in the ofbiz application

Regards
Prasanthi
Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

sachin kanojiya
Hello,

You can restrict your user to go back using this javascript.

<script type="text/javascript">
        window.history.forward(0);
</script>

Regards
Sachin kanojiya
Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Ankit Jain-3
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
>
>    


Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Jacques Le Roux
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
>>
>>    
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

BJ Freeman
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
Linkedin
<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
>>>
>>>    
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Jacques Le Roux
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
> Linkedin
> <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
>>>>
>>>>    
>>>
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

BJ Freeman
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
Linkedin
<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
>> Linkedin
>> <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
>>>>>
>>>>>    
>>>>
>>>>
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Ankit Jain-3
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
> Linkedin
> <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
>>> Linkedin
>>> <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
>>>>>>
>>>>>>
>>>>>>              
>>>>>
>>>>>            
>>>>
>>>>          
>>>        
>>
>>      
>    

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Ankit Jain-3
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

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

prasanthi_ofbiz
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
Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Ankit Jain-3
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
>    
Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

prasanthi_ofbiz
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
Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Ankit Jain-3
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
>
>    

Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

prasanthi_ofbiz
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
Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Jacques Le Roux
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.
>


Reply | Threaded
Open this post in threaded view
|

Re: How to disable right click and back buttons after logged in into ofbiz

Ankit Jain-3
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.
>>
>
>