This discussion is archived
11 Replies Latest reply: Nov 20, 2012 5:43 AM by AshPatel2 RSS

Disabling Javascript

AshPatel2 Newbie
Currently Being Moderated
Application Express 4.1.1.00.23
Internet Explorer - 8
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

Hi, wondering if someone can help, I am new to APEX so please forgive any lack of knowledge. I am about to embark on my first APEX development and have got far as the login screen. I disabled javascript just to see what would happen if someone had it disable, it turned out by disabling javascript the whole login region dissapeared. I am wondering how to develop the application so it works when javascript is disabled. Can anyone help it seems the theme uses javascript by default I think. I am using the cloudy theme. Not sure how to develop the application as its got to work with javascript disabled.

Thanks and regards
Ash
  • 1. Re: Disabling Javascript
    Scott Oracle ACE Director
    Currently Being Moderated
    Ash,

    Why is your requirement to disable JavaScript? Like most modern websites, APEX makes heavy use of JavaScript & jQuery, and disabling it will cause many issues.

    Thanks,

    - Scott -

    http://spendolini.blogspot.com
    http://www.enkitec.com
  • 2. Re: Disabling Javascript
    AshPatel2 Newbie
    Currently Being Moderated
    Hi Scott

    At our work place there is a requirement that web applications published online need to work if JavaScript is disabled, that's the requirement not sure why this is necessary but it's a rule we have to follow which I don't agree with. Is there a way round this?

    Thank an regards
    Ash
  • 3. Re: Disabling Javascript
    Krunal Explorer
    Currently Being Moderated
    In that case you will have to create login page manually.
  • 4. Re: Disabling Javascript
    VC Guru
    Currently Being Moderated
    AshPatel2 wrote:
    Hi Scott

    At our work place there is a requirement that web applications published online need to work if JavaScript is disabled, that's the requirement not sure why this is necessary but it's a rule we have to follow which I don't agree with. Is there a way round this?

    Thank an regards
    Ash
    You can develop an application without using JS and with only semantic HTML, BUT you cannot utilize the rapidness of APEX for developing it.

    Follow the rule outlined here - http://stackoverflow.com/questions/2491239/what-happens-to-my-web-application-if-javascript-is-disabled
  • 5. Re: Disabling Javascript
    Scott Oracle ACE Director
    Currently Being Moderated
    VC,

    The problem with that approach is that APEX is a framework, that includes JavaScript. To eliminate JavaScript from APEX is technically possible, but you will have to severely limit which features your application to the point where it will be limited in what it can do. You will also end up re-creating stuff for built-in components such as buttons, as most buttons in APEX call a JS function to submit the page.

    I know that it's easy for me to say this requirement should be questioned a bit more, as it's not my requirement, but I would be curious as to what the reason for its existence is. My guess is that perhaps it's trying to eliminate applications where all validation logic is built with JavaScript, so that if a user did disable it, they would be able to submit data that would otherwise not be allowed. This can be combatted with APEX validations - and I have always recommended that for every JS or DA based validation, there should be a corresponding APEX validation as a backup.

    Hope this helps.

    Thanks,

    - Scott -

    http://spendolini.blogspot.com
    http://www.enkitec.com
  • 6. Re: Disabling Javascript
    VC Guru
    Currently Being Moderated
    Scott,

    You are absolutely correct and that's why I mentioned +(cannot utilize the rapidness of APEX)+. that means we have to manually create some of the components and face few challenges.

    As you mentioned the server-side validation is most important and APEX is very good at that and I will be surprised if anyone adds a JS/DA validation and doesn't implement an APEX validation, because it is a fundamental flaw and they are not following the standards.

    Thanks,
    Vikram
  • 7. Re: Disabling Javascript
    AdamMartin Pro
    Currently Being Moderated
    >
    At our work place there is a requirement that web applications published online need to work if JavaScript is disabled, that's the requirement not sure why this is necessary but it's a rule we have to follow which I don't agree with. Is there a way round this?
    Either the requirement is misunderstood or management is ignorant and stubborn. I believe there is some miscommunication taking place here.

    Sometimes there is a requirement that web applications be secure even if javascript is disabled. It is secure despite javascript being turned off, but the application only truly functions properly with javascript enabled.

    For example, there may be some client-side validation to ensure only certain values can be entered into an input field. When javascript is enabled, maybe users can only enter letters of the alphabet (no numbers or symbols). Someone could disable javascript to circumvent this control and put numbers and symbols into the field. This is always a possibility, which is why javascript cannot be relied upon alone.

    It could be that the requirement is something along the lines of ensuring application security or data integrity if javascript is disabled.

    I highly doubt that in modern web development there would be a requirement that irrationally bans the use of javascript.
  • 8. Re: Disabling Javascript
    Scott Oracle ACE Director
    Currently Being Moderated
    Vikram,

    Another argument that you can use to combat this is that anything custom that you have to do will technically be "unsupported", or at least custom enough that other developers would have a learning curve in order to maintain it. Thus, all of your applications will be non-standard, and require much more maintenance and cost over the short and long term.

    Hope that you get past this, as it does seem like either an old or short-sighted requirement.

    Thanks,

    - Scott -

    http://spendolini.blogspot.com
    http://www.enkitec.com
  • 9. Re: Disabling Javascript
    fac586 Guru
    Currently Being Moderated
    VC wrote:

    As you mentioned the server-side validation is most important and APEX is very good at that and I will be surprised if anyone adds a JS/DA validation and doesn't implement an APEX validation, because it is a fundamental flaw and they are not following the standards.
    I wouldn't be surprised in the slightest. This forum is overrun with people whose desire to implement JavaScript bells and whistles outstrips their actual understanding of how APEX (and the web in general) actually work.
  • 10. Re: Disabling Javascript
    VC Guru
    Currently Being Moderated
    @Scott

    Excellent point!

    @Paul

    Yes it is, I agree.

    I would recommend OP to reconsider what they are trying to do and review the requirements by taking all these inputs into consideration
  • 11. Re: Disabling Javascript
    AshPatel2 Newbie
    Currently Being Moderated
    Thank you all for your feedback, I have understood what you are all saying and it makes sense. Thankyou so much.

    Regards
    Ash

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points