I am developing a web application in Struts2 (JSP).
I am using lot of Javascripts in my pages for dynamic contents like prompts, pop ups, menu bar, etc.
In most of the systems Javascript is blocked by default. This is creating problem like every time while I load my pages, I have to click on allow access to scripts.
In the pages with prompts, I have to give allow access to scripted window on each time when I open that page.
These will irritate the user who will use the application, and I have to use these prompts and scripts (which are highly required).
Is there any way to turn off the automatic script blocking by coding or by any other manner?
Actually what I want is user should not have to face the difficulty to always click allow content.
Browsers do not block scripts by default. If the user has disabled scripting or is running some script blocking software then (as a page author) you cannot bypass it.
If it was possible, the option would be “Disable scripting unless the page author really, really wants it” and lots of authors would think “I really, really want visitors to see my intrusive advertising that spins and shouts at them”. (As options go, that wouldn’t help the user much!)
You should follow the design principles of progressive enhancement and unobtrusive JavaScript.
If you are dealing with a controlled environment (which is plausible if in most of the systems java script is blocked by default) then you may be able to configure the systems to allow JS for the site. This would involve acting as a system administrator rather than a page author. How you do this would depend on the browser / third-party script blocking software. In Internet Explorer, for example, you might place the site in the Intranet Zone and allow JS for all sites in that zone.