"window.document.style.opacity=0.4"??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Prisoner at War

    "window.document.style.opacity=0.4"??


    Okay, no such thing, apparently, in the DOM....

    How am I supposed to tell JavaScript "turn the whole page opaque"?

    Is there a "JavaScript/CSS dictionary" and a "JavaScript/CSS grammar"
    about??

    I've looked at several books but so far they're not exactly
    "rulebooks, " which is what I'd need...I need a rulebook that helps me
    parse English into JavaScript/CSS....

    A great part of my problem lies in not knowing what's even possible
    ("scope and depth"), and I hope the book "DOM Scripting" that's on its
    way to me will soon shed light on DOM "grammar" and "vocabulary ," but
    it's not a rulebook as such, either.

    Any rule or lawbooks on DOM/JavaScript/CSS??

    And, for now, just how am I supposed to tell JavaScript/CSS to make
    the *whole* page opaque? I can see how getElementById can work for
    images and such -- but how about the whole page??

    And then, on top of that, I need to be able to write "on top" of
    what's been veiled by the opacity...and then return to the normal
    webpage again....

    Basically, I'm trying to accomplish what a simple JavaScript
    alert("info info info") would do, only with my own visual effect and
    style.

    Is such a thing even possible??? (Again, I just don't know "scope"
    and "depth" of JavaScript-CSS-DOM nexus....)

    Here's what I'm looking to do:

    1) Make whole page opaque onClick

    2) Write on top of the page (not as an "addition" at bottom, but on
    top, similar to a dialog pop-up box)

    3) Return to normal page status onClick


    During Stage 2, the page is not accessible to the visitor, in the
    manner of a simple alert() pop-up.

    Any way, hope that makes sense (and again, this is a *technical*
    question, concerning what's possible, not an "aesthetic" one about
    what's advisable in terms of design and usability, etc. -- thanks!)....
  • Gregor Kofler

    #2
    Re: "window.do cument.style.op acity=0.4" ??

    Prisoner at War meinte:
    Okay, no such thing, apparently, in the DOM....
    >
    How am I supposed to tell JavaScript "turn the whole page opaque"?
    To see what underneath?

    Gregor


    --
    http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
    http://web.gregorkofler.com ::: meine JS-Spielwiese
    http://www.image2d.com ::: Bildagentur für den alpinen Raum

    Comment

    • david.karr

      #3
      Re: "window.do cument.style.op acity=0.4" ??

      Just to clarify terminology, I think you mean to say that you want to
      make the entire page "transparen t", not "opaque". Look up the word.
      It's amazing how often these terms are reversed in common usage.

      On Apr 30, 9:25 am, Prisoner at War <prisoner_at_.. .@yahoo.comwrot e:
      Okay, no such thing, apparently, in the DOM....
      >
      How am I supposed to tell JavaScript "turn the whole page opaque"?
      >
      Is there a "JavaScript/CSS dictionary" and a "JavaScript/CSS grammar"
      about??
      >
      I've looked at several books but so far they're not exactly
      "rulebooks, " which is what I'd need...I need a rulebook that helps me
      parse English into JavaScript/CSS....
      >
      A great part of my problem lies in not knowing what's even possible
      ("scope and depth"), and I hope the book "DOM Scripting" that's on its
      way to me will soon shed light on DOM "grammar" and "vocabulary ," but
      it's not a rulebook as such, either.
      >
      Any rule or lawbooks on DOM/JavaScript/CSS??
      >
      And, for now, just how am I supposed to tell JavaScript/CSS to make
      the *whole* page opaque? I can see how getElementById can work for
      images and such -- but how about the whole page??
      >
      And then, on top of that, I need to be able to write "on top" of
      what's been veiled by the opacity...and then return to the normal
      webpage again....
      >
      Basically, I'm trying to accomplish what a simple JavaScript
      alert("info info info") would do, only with my own visual effect and
      style.
      >
      Is such a thing even possible??? (Again, I just don't know "scope"
      and "depth" of JavaScript-CSS-DOM nexus....)
      >
      Here's what I'm looking to do:
      >
      1) Make whole page opaque onClick
      >
      2) Write on top of the page (not as an "addition" at bottom, but on
      top, similar to a dialog pop-up box)
      >
      3) Return to normal page status onClick
      >
      During Stage 2, the page is not accessible to the visitor, in the
      manner of a simple alert() pop-up.
      >
      Any way, hope that makes sense (and again, this is a *technical*
      question, concerning what's possible, not an "aesthetic" one about
      what's advisable in terms of design and usability, etc. -- thanks!)....

      Comment

      • Gregor Kofler

        #4
        Re: &quot;window.do cument.style.op acity=0.4&quot; ??

        Prisoner at War meinte:
        Okay, no such thing, apparently, in the DOM....
        >
        How am I supposed to tell JavaScript "turn the whole page opaque"?
        Something like document.body.s tyle.opacity=<v alue between 0 and 1>?
        Is there a "JavaScript/CSS dictionary" and a "JavaScript/CSS grammar"
        about??
        Plenty. Mozilla. MSDN. W3C.





        Maybe it helps to with your terminology, too.

        I've looked at several books but so far they're not exactly
        "rulebooks, " which is what I'd need...I need a rulebook that helps me
        parse English into JavaScript/CSS....
        Er... What?
        Any rule or lawbooks on DOM/JavaScript/CSS??
        What's a "lawbook"?
        And, for now, just how am I supposed to tell JavaScript/CSS to make
        the *whole* page opaque? I can see how getElementById can work for
        images and such -- but how about the whole page??
        See above. Will work in contemporary "W3C-browsers".
        Basically, I'm trying to accomplish what a simple JavaScript
        alert("info info info") would do, only with my own visual effect and
        style.
        Yes.

        Here's what I'm looking to do:
        >
        1) Make whole page opaque onClick
        >
        2) Write on top of the page (not as an "addition" at bottom, but on
        top, similar to a dialog pop-up box)
        >
        3) Return to normal page status onClick
        Easy. A "javascript modal window". Google is your friend.

        Gregor


        --
        http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
        http://web.gregorkofler.com ::: meine JS-Spielwiese
        http://www.image2d.com ::: Bildagentur für den alpinen Raum

        Comment

        • Prisoner at War

          #5
          Re: &quot;window.do cument.style.op acity=0.4&quot; ??

          On Apr 30, 12:47 pm, "david.karr " <davidmichaelk. ..@gmail.comwro te:
          Just to clarify terminology, I think you mean to say that you want to
          make the entire page "transparen t", not "opaque". Look up the word.
          It's amazing how often these terms are reversed in common usage.
          Hmmm...well, the degree something is transparent is the degree to
          which it is not opaque, and vice-versa, so it can be easy to trip up
          terms, yes....

          CSS uses an "opacity" property, so I guess I'm going along with
          that...but yeah, I like for something to be transparent *over* my
          webpage...AFAIK , it involves setting an opacity property...so, is
          there even an opacity property to the whole page? Can the whole page
          itself be addressed as an object? I know how to do it with images,
          using "this.style.opa city=0.4" but is there a way to address the page
          as a whole?

          Comment

          • Prisoner at War

            #6
            Re: &quot;window.do cument.style.op acity=0.4&quot; ??

            On Apr 30, 12:23 pm, Gregor Kofler <use...@gregork ofler.atwrote:
            >
            >
            To see what underneath?
            >
            Gregor
            To see the webpage itself...a textbox would appear, onClick, over the
            webpage. During this time, the page would be inaccessible, in the
            manner of an alert() pop-up. With another onClick, the textbox
            disappears and the page (previously) "underneath " resumes its normal
            character (scrollable, etc.).

            Is there a way to address the page as a whole in the DOM? Is there a
            way to write "on top" of the page, as opposed to only "adding to"
            what's already there?

            Is there, in effect, a way of "layering" the webpage, like with an
            onion or Photoshop image??

            Comment

            • Prisoner at War

              #7
              Re: &quot;window.do cument.style.op acity=0.4&quot; ??

              On Apr 30, 12:53 pm, Gregor Kofler <use...@gregork ofler.atwrote:
              >
              >
              Something like document.body.s tyle.opacity=<v alue between 0 and 1>?
              OMG!! That's it -- BODY!! LOL!!!
              Oh wow, thanks! Yeah, I'm going to learn a lot from these
              references...ho pe I can piece it all together mentally...that 's the
              trick...but first I need the grammar and vocabulary -- thanks!
              Er... What?
              Exactly my feelings! ;-)
              What's a "lawbook"?
              Well, you know how if you want to start a business, you gotta go to a
              lawyer who consults his lawbooks and tells you what you can and cannot
              do (for example, prostitution is legal in Rhode Island if it's done
              *indoors*! [?!])...or if you're playing "Dungeons and Dragons" and
              the DM says that according to Rules 3.2.12 you can't use your +25
              Crystal Sword of Death against a Level 99 Super Cleric from
              Hell...well, same thing with JavaScript -- I was wondering if there
              are "rulebooks" or "lawbooks" which dictate the "depth" and "scope" of
              what's possible....
              See above. Will work in contemporary "W3C-browsers".
              So kewl! Hmmm...I can already see my next few assignments: what to do
              with any older/non-JavaScript-enabled browsers!!
              Yes.
              >
              Easy. A "javascript modal window".
              Ah! A modal window! That's what that is!! Yes, "VK" had referenced
              just such a thingamajig in another thread -- http://www.subimage.com/dhtml/subModal
              -- but only now am I able to really appreciate it!

              Thanks sooooo MUCH!! Maybe I can create a font or animated cursor and
              dedicate it to you people here! ;-)
              Google is your friend.
              Actually, I wouldn't even have known the keyword...and while it's
              better than the buy.com search engine (where you could enter the exact
              title of a book and still not find it!), it still turns up a lot of
              garbage for me (then again, I sometimes look for "hard stuff" with no
              easy keyword matches)....

              Comment

              Working...