Note that there are some explanatory texts on larger screens.

plurals
  1. POcan we run javascript with rendering disabled?
    primarykey
    data
    text
    <h1>Context</h1> <p>I am working on a pretty complex web site framework which includes a lot of client side manipulation of forms with dynamic look and feel being available for switching on the fly (a lot of code runs on page load and unload).</p> <p>I need to be able to change the disabled state of many inputs (or read-only, when available) of various types on the fly.</p> <h1>The problem</h1> <p>The core design of many HTML form input types are screwed up (very inconsistent at the very least) and when coupled with a server running asp.net, it gets even weirder.</p> <p>More specifically, as some of you know, doing disabled="true" on any input will kill the postback since its effectively not posted when form is submitted.</p> <h1>A possible solution</h1> <p>on page unload I can pretty easily remove the disabled state of every control which uses it, ... this solves the "data integrity" issue... </p> <p><em><strong>But there is a BIG caveat:</em></strong></p> <p>The whole display flashes while the unload terminates (since all controls instantly go back to enabled), and then the page is left in a less than nominal state while the server replies.</p> <h1>The Killer question</h1> <p>is there a way for onbeforeunload or unload events to run in a way that whatever manipulations they do to the DOM isn't refreshed on screen?</p> <p>OR is there a way for the visuals to show a control <em>AS</em> if it where disabled, but its still actually posted to the server?</p> <p>OR does anyone have ideas which might nudge me towards a solution?</p> <p>thanks in advance!</p> <p><em><strong>[Edit] I have the chance of needing to support only chrome, so this may open up avenues of solution for some of you chrome geniuses.</em></strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload