Loading ...
Sorry, an error occurred while loading the content.

Newbie Seeks Help ....

Expand Messages
  • pistolrussell
    Hello, am new to JS and of course overlib -- looking for some help, please. The script and link combo below work -- the player button, when clicked, opens
    Message 1 of 14 , Feb 2, 2006
    • 0 Attachment
      Hello, am new to JS and of course overlib -- looking for some help,
      please.

      The script and link combo below work -- the player button, when
      clicked, opens another html page that shows the correct/current
      volume level:
      ---------------------------
      var v=player.Volume;
      var mytext;
      function myFunction() {
      if(v==255) mytext='100';
      if(v==225) mytext='90';
      if(v==200) mytext='80';
      if(v==175) mytext='70';
      if(v==150) mytext='60';
      if(v==125) mytext='50';
      if(v==100) mytext='40';
      if(v==75) mytext='30';
      if(v==50) mytext='20';
      if(v==25) mytext='10';
      if(v==0) mytext='Mute is ON';

      document.write(mytext);
      }

      Link:
      a title="Volume Level" onclick="myFunction();"><img src - etc></a
      =====================================================================
      Someone please tell my why the script/link combo below, which tries
      to use overlib, doesn't work:

      var v=player.Volume;
      var mytext;
      function myFunction() {
      if(v==255) mytext='100';
      if(v==225) mytext='90';
      if(v==200) mytext='80';
      if(v==175) mytext='70';
      if(v==150) mytext='60';
      if(v==125) mytext='50';
      if(v==100) mytext='40';
      if(v==75) mytext='30';
      if(v==50) mytext='20';
      if(v==25) mytext='10';
      if(v==0) mytext='Mute is ON';

      return mytext;
      }

      Link:
      a href="javascript:;" onmouseover="return overlib(FUNCTION,myFunction
      (mytext);" onmouseout="return nd();"><img src - etc></a

      Have tried what seems like a zillion versions of the link -- nothing
      happens. All the rest of the overlib stuff on the player page works
      fine, but the code above is the only attempt at using the FUNCTION
      call. Can someone please straighten this out for me?

      And thanks, anyone who can help, of course.
    • Robert E Boughner
      ... From this snippet of code that you ve presented here, it looks as though the variables mytext and v are global variables. If v hasn t been set already you
      Message 2 of 14 , Feb 2, 2006
      • 0 Attachment
        --- In overlib@yahoogroups.com, "pistolrussell" <n@...> wrote:
        >
        > Hello, am new to JS and of course overlib -- looking for some help,
        > please.
        >
        > The script and link combo below work -- the player button, when
        > clicked, opens another html page that shows the correct/current
        > volume level:
        > ---------------------------
        > var v=player.Volume;
        > var mytext;
        > function myFunction() {
        > if(v==255) mytext='100';
        > if(v==225) mytext='90';
        > if(v==200) mytext='80';
        > if(v==175) mytext='70';
        > if(v==150) mytext='60';
        > if(v==125) mytext='50';
        > if(v==100) mytext='40';
        > if(v==75) mytext='30';
        > if(v==50) mytext='20';
        > if(v==25) mytext='10';
        > if(v==0) mytext='Mute is ON';
        >
        > document.write(mytext);
        > }
        >
        > Link:
        > a title="Volume Level" onclick="myFunction();"><img src - etc></a
        > =====================================================================
        > Someone please tell my why the script/link combo below, which tries
        > to use overlib, doesn't work:
        >
        > var v=player.Volume;
        > var mytext;
        > function myFunction() {
        > if(v==255) mytext='100';
        > if(v==225) mytext='90';
        > if(v==200) mytext='80';
        > if(v==175) mytext='70';
        > if(v==150) mytext='60';
        > if(v==125) mytext='50';
        > if(v==100) mytext='40';
        > if(v==75) mytext='30';
        > if(v==50) mytext='20';
        > if(v==25) mytext='10';
        > if(v==0) mytext='Mute is ON';
        >
        > return mytext;
        > }
        >
        > Link:
        > a href="javascript:;" onmouseover="return overlib(FUNCTION,myFunction
        > (mytext);" onmouseout="return nd();"><img src - etc></a
        >
        > Have tried what seems like a zillion versions of the link -- nothing
        > happens. All the rest of the overlib stuff on the player page works
        > fine, but the code above is the only attempt at using the FUNCTION
        > call. Can someone please straighten this out for me?
        >
        > And thanks, anyone who can help, of course.
        >

        From this snippet of code that you've presented here, it looks as
        though the variables mytext and v are global variables. If v hasn't
        been set already you need to call it as follows:

        a href="javascript:;" onmouseover="return
        overlib(FUNCTION,myFunction(200));" onmouseout="return nd();"><img src
        - etc></a>

        Your function returns the text string mytext but you need to supply
        the value of v for it to decide on what to set mytext to. If you
        still have problems, please post an URL to the page that is giving you
        problems so that we can look at it in detail.j

        bob
      • pistolrussell
        Thanks very much for the reply. As mentioned, am new to js and overlib. I found on this forum a discussion of global vs something relating to the use of
        Message 3 of 14 , Feb 2, 2006
        • 0 Attachment
          Thanks very much for the reply. As mentioned, am new to js and
          overlib. I found on this forum a discussion of global vs something
          relating to the use of overlib's FUNCTION call, but what was said
          was way over my head.

          Scripting goal is to get the current player volume level (+ and -
          buttons raise and lower the user's volume level -- v=player.Volume)
          and then have the FUNCTION call display the specific, current volume
          level when the user mouses over the player Volume Level button. Is
          this possible with overlib?

          Initially found overlib on a web search and tried it because I
          thought the info provided stated that one can call a javascript
          function with it resulting in function output string appearing in a
          custom "tooltip" popup. (Obviously, I do not know how to do this
          correctly at this point) Of course, after I installed overlib and
          redid the player page tooltips, I found overlib quite superior to
          the custom tooltip code that I had been using. Amazing, really.

          However, at my knowledge level, couldn't understand enough detail in
          the discussion referred to above. Can you point me in the right
          direction about how to do this?

          How can do I adjust this script so that it finds the current player
          volume level (it already does this), then get it to return a string
          to overlib for the link? (i.e., the link call, you said, must have a
          specific string in the FUNCTION call).

          See, am so confused I can't even describe exactly what I need to
          do. Do I need to add the "case:" thing to the script or some kind
          of "array" function or what? Sorry to be so dense about this, am
          trying to catch up. Thanks again for any and all pointers to info,
          suggestions, help.


          ======================= divider ============================
          --- In overlib@yahoogroups.com, "Robert E Boughner" <reboughner@...>
          wrote:
          >
          > --- In overlib@yahoogroups.com, "pistolrussell" <n@...> wrote:
          > >
          > > Hello, am new to JS and of course overlib -- looking for some
          help,
          > > please.
          > >
          > > The script and link combo below work -- the player button, when
          > > clicked, opens another html page that shows the correct/current
          > > volume level:
          > > ---------------------------
          > > var v=player.Volume;
          > > var mytext;
          > > function myFunction() {
          > > if(v==255) mytext='100';
          > > if(v==225) mytext='90';
          > > if(v==200) mytext='80';
          > > if(v==175) mytext='70';
          > > if(v==150) mytext='60';
          > > if(v==125) mytext='50';
          > > if(v==100) mytext='40';
          > > if(v==75) mytext='30';
          > > if(v==50) mytext='20';
          > > if(v==25) mytext='10';
          > > if(v==0) mytext='Mute is ON';
          > >
          > > document.write(mytext);
          > > }
          > >
          > > Link:
          > > a title="Volume Level" onclick="myFunction();"><img src -
          etc></a
          > >
          =====================================================================
          > > Someone please tell my why the script/link combo below, which
          tries
          > > to use overlib, doesn't work:
          > >
          > > var v=player.Volume;
          > > var mytext;
          > > function myFunction() {
          > > if(v==255) mytext='100';
          > > if(v==225) mytext='90';
          > > if(v==200) mytext='80';
          > > if(v==175) mytext='70';
          > > if(v==150) mytext='60';
          > > if(v==125) mytext='50';
          > > if(v==100) mytext='40';
          > > if(v==75) mytext='30';
          > > if(v==50) mytext='20';
          > > if(v==25) mytext='10';
          > > if(v==0) mytext='Mute is ON';
          > >
          > > return mytext;
          > > }
          > >
          > > Link:
          > > a href="javascript:;" onmouseover="return overlib
          (FUNCTION,myFunction
          > > (mytext);" onmouseout="return nd();"><img src - etc></a
          > >
          > > Have tried what seems like a zillion versions of the link --
          nothing
          > > happens. All the rest of the overlib stuff on the player page
          works
          > > fine, but the code above is the only attempt at using the
          FUNCTION
          > > call. Can someone please straighten this out for me?
          > >
          > > And thanks, anyone who can help, of course.
          > >
          >
          > From this snippet of code that you've presented here, it looks as
          > though the variables mytext and v are global variables. If v
          hasn't
          > been set already you need to call it as follows:
          >
          > a href="javascript:;" onmouseover="return
          > overlib(FUNCTION,myFunction(200));" onmouseout="return nd();"><img
          src
          > - etc></a>
          >
          > Your function returns the text string mytext but you need to supply
          > the value of v for it to decide on what to set mytext to. If you
          > still have problems, please post an URL to the page that is giving
          you
          > problems so that we can look at it in detail.j
          >
          > bob
          >
        • pistolrussell
          PS Below is the part of your reply that I don t understand: Your function returns the text string mytext but you need to supply the value of v for it to
          Message 4 of 14 , Feb 2, 2006
          • 0 Attachment
            PS Below is the part of your reply that I don't understand:

            "Your function returns the text string mytext but you need to supply
            the value of v for it to decide on what to set mytext to."

            How do I adjust the script to do this?

            Thanks again, very much and apologies for current knowledge level.

            ======================message divider===============================-
            -- In overlib@yahoogroups.com, "Robert E Boughner" <reboughner@...>
            wrote:
            >
            > --- In overlib@yahoogroups.com, "pistolrussell" <n@...> wrote:
            > >
            > > Hello, am new to JS and of course overlib -- looking for some
            help,
            > > please.
            > >
            > > The script and link combo below work -- the player button, when
            > > clicked, opens another html page that shows the correct/current
            > > volume level:
            > > ---------------------------
            > > var v=player.Volume;
            > > var mytext;
            > > function myFunction() {
            > > if(v==255) mytext='100';
            > > if(v==225) mytext='90';
            > > if(v==200) mytext='80';
            > > if(v==175) mytext='70';
            > > if(v==150) mytext='60';
            > > if(v==125) mytext='50';
            > > if(v==100) mytext='40';
            > > if(v==75) mytext='30';
            > > if(v==50) mytext='20';
            > > if(v==25) mytext='10';
            > > if(v==0) mytext='Mute is ON';
            > >
            > > document.write(mytext);
            > > }
            > >
            > > Link:
            > > a title="Volume Level" onclick="myFunction();"><img src -
            etc></a
            > >
            =====================================================================
            > > Someone please tell my why the script/link combo below, which
            tries
            > > to use overlib, doesn't work:
            > >
            > > var v=player.Volume;
            > > var mytext;
            > > function myFunction() {
            > > if(v==255) mytext='100';
            > > if(v==225) mytext='90';
            > > if(v==200) mytext='80';
            > > if(v==175) mytext='70';
            > > if(v==150) mytext='60';
            > > if(v==125) mytext='50';
            > > if(v==100) mytext='40';
            > > if(v==75) mytext='30';
            > > if(v==50) mytext='20';
            > > if(v==25) mytext='10';
            > > if(v==0) mytext='Mute is ON';
            > >
            > > return mytext;
            > > }
            > >
            > > Link:
            > > a href="javascript:;" onmouseover="return overlib
            (FUNCTION,myFunction
            > > (mytext);" onmouseout="return nd();"><img src - etc></a
            > >
            > > Have tried what seems like a zillion versions of the link --
            nothing
            > > happens. All the rest of the overlib stuff on the player page
            works
            > > fine, but the code above is the only attempt at using the
            FUNCTION
            > > call. Can someone please straighten this out for me?
            > >
            > > And thanks, anyone who can help, of course.
            > >
            >
            > From this snippet of code that you've presented here, it looks as
            > though the variables mytext and v are global variables. If v
            hasn't
            > been set already you need to call it as follows:
            >
            > a href="javascript:;" onmouseover="return
            > overlib(FUNCTION,myFunction(200));" onmouseout="return nd();"><img
            src
            > - etc></a>
            >
            > Your function returns the text string mytext but you need to supply
            > the value of v for it to decide on what to set mytext to. If you
            > still have problems, please post an URL to the page that is giving
            you
            > problems so that we can look at it in detail.j
            >
            > bob
            >
          • Robert E Boughner
            ... ... To be able to answer your questions I need to see the whole page and how things are set up. What your function does is to return a text
            Message 5 of 14 , Feb 2, 2006
            • 0 Attachment
              --- In overlib@yahoogroups.com, "pistolrussell" <n@...> wrote:
              >
              > PS Below is the part of your reply that I don't understand:
              >
              > "Your function returns the text string mytext but you need to supply
              > the value of v for it to decide on what to set mytext to."
              >
              > How do I adjust the script to do this?
              >
              > Thanks again, very much and apologies for current knowledge level.
              >
              <snip>
              =====================================================================
              > > > Someone please tell my why the script/link combo below, which
              > tries
              > > > to use overlib, doesn't work:
              > > >
              > > > var v=player.Volume;
              > > > var mytext;
              > > > function myFunction() {
              > > > if(v==255) mytext='100';
              > > > if(v==225) mytext='90';
              > > > if(v==200) mytext='80';
              > > > if(v==175) mytext='70';
              > > > if(v==150) mytext='60';
              > > > if(v==125) mytext='50';
              > > > if(v==100) mytext='40';
              > > > if(v==75) mytext='30';
              > > > if(v==50) mytext='20';
              > > > if(v==25) mytext='10';
              > > > if(v==0) mytext='Mute is ON';
              > > >
              > > > return mytext;
              > > > }
              <snip>
              To be able to answer your questions I need to see the whole page and
              how things are set up. What your function does is to return a text
              string based on the value of the variable v which is your
              player.volume. But where is this variable set. I called v and mytext
              global variables because you've defined them outside of the function
              and if they remain outside of a function they will truly be global and
              available to any other routines. Variables that are defined within
              the function by using var myVar between the opening and closing of the
              function ( { } ) are local only to the routine in which they are
              defined and won't be seen anywhere else. To get this to work in
              overlib you need to access the current setting of v and pass that to
              the "myFunction" which will act on it an return a text string. How
              that is done I can't answer until I see your complete page.

              Bob
            • Nell Bolen
              Hello, thanks again for a reply. The player.Volume is like player.GetVolume() in other media APIs -- it s part of this player s API and fetches the
              Message 6 of 14 , Feb 2, 2006
              • 0 Attachment
                Hello, thanks again for a reply.

                The "player.Volume" is like "player.GetVolume()" in other media APIs --
                it's part of this player's API and fetches the realtime volume state. It's
                available to any part of the javascripting. As said first off, works okay
                with a document.write

                Big problem for me is I'm trying to knock something together to get that
                current volume showing in the tooltip popup on mouseover without a clue as
                what's involved. Revisited the previously posted commentary about this,
                tried to understand what was going on, will now try the below or some
                variation:
                ---------------------------------------------------------------------

                function showvolume(num) {

                myvar num = player.Volume;
                myvar current = num*.4;
                myvar mytext = 'Volume Level is '+current;

                return overlib(mytext);
                }

                ---------------------------------------------------------------------
                Tried it with a document.write -- works okay. Does it have even a dim shot
                at working with overlib? If yes, please tell me what is the correct link
                call. If not, any suggestions and even MORE pointers (thank you very much
                for the help so far) are most welcome.
              • Robert E Boughner
                ... ... ... No this won t work, but try this. Define your function like this: function showvolume(num) { var current = num*.4; var mytext =
                Message 7 of 14 , Feb 3, 2006
                • 0 Attachment
                  --- In overlib@yahoogroups.com, "Nell Bolen" <n@...> wrote:
                  >
                  <snip>
                  > ---------------------------------------------------------------------
                  >
                  > function showvolume(num) {
                  >
                  > myvar num = player.Volume;
                  > myvar current = num*.4;
                  > myvar mytext = 'Volume Level is '+current;
                  >
                  > return overlib(mytext);
                  > }
                  >
                  > ---------------------------------------------------------------------
                  <snip>
                  >

                  No this won't work, but try this.

                  Define your function like this:
                  function showvolume(num) {

                  var current = num*.4;
                  var mytext = 'Volume Level is '+current;

                  return mytext;
                  }

                  and then call it as: onmouseover="return
                  overlib(FUNCTION,showvolume(player.GetVolume()));" onmouseout="nd();"

                  This is using the fact that player.GetVolume() is known to all parts
                  of javascript and will return the players volume. If so you pass that
                  as the argument to showvolume which processes it and creates the text
                  string mytext and returns that for overlib to show. There is nothing
                  in javascript call "myvar" when used within a function "var xx" just
                  means that xx will be local to that function and won't be known
                  outside of it.

                  BTW, why don't you post the URL to the page so that I can see it and
                  make more concrete examples rather than doing this round about way of
                  addressing the problem?

                  Bob
                • Nell Bolen
                  Hello, and thanks again. Didn t mean to be using a round about method -- just really don t know what in the world I AM doing. I realized some of the
                  Message 8 of 14 , Feb 3, 2006
                  • 0 Attachment
                    Hello, and thanks again. Didn't mean to be using a "round about method" --
                    just really don't know what in the world I AM doing.

                    I realized some of the formatting errors in previous post as soon as I
                    pressed the button. Oh well. Am getting skunked on this one so far.

                    Am trying to work out a noncommercial, live webcasting system for small
                    events -- video with audio. Right now, have a test stream running.
                    Streamed from here locally to a remote shoutcast server -- am using the
                    NSV stuff right now for a number of reasons -- lower encoding cpu here at
                    home, no home bandwidth consumed by viewers, and it includes an activex
                    control for webpage viewing, to mention a few.

                    The NSV activex player is open source, but was not documented very well
                    and api not formally published. Right when Nullsoft first got it all
                    going, there was a move to AOL. After that, the same people wrote another
                    activex, then open source and also using NSV. Same thing on the api, just
                    snatches found here and there on the web.

                    You can see a "dead" broadcast -- nothing visual is happening, just an
                    easy chair where the dogs loaf, and for audio, cspan commentary.

                    Test Player I: http://plankroadnetstreams.com/pr-radio/webcam/n-test.php
                    Test Player II: http://plankroadnetstreams.com/pr-radio/webcam/a-test.php

                    Thanks again for your time, the help and especially for overlib.


                    >
                    >
                    >
                    > --- In overlib@yahoogroups.com, "Nell Bolen" >n@...< wrote:
                    > snipsnip
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    > SPONSORED LINKS
                    >
                    >
                    >
                    >
                    > Basic programming language
                    >
                    >
                    > C programming language
                    >
                    >
                    > Computer programming languages
                    >
                    >
                    >
                    >
                    > The c programming language
                    >
                    >
                    > C programming language
                    >
                    >
                    > List of programming languages
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    > YAHOO! GROUPS LINKS
                    >
                    >
                    >
                    > Visit your group "overlib" on the web.
                    > To unsubscribe from this group, send an email to:
                    > overlib-unsubscribe@yahoogroups.com
                    > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                  • Robert E Boughner
                    ... method -- ... Wasn t meant to be criticizing. Its just that one can do more when we see the underlying page and what is actually going on so that we can
                    Message 9 of 14 , Feb 4, 2006
                    • 0 Attachment
                      --- In overlib@yahoogroups.com, "Nell Bolen" <n@...> wrote:
                      >
                      > Hello, and thanks again. Didn't mean to be using a "round about
                      method" --
                      > just really don't know what in the world I AM doing.
                      >

                      Wasn't meant to be criticizing. Its just that one can do more when we
                      see the underlying page and what is actually going on so that we can
                      best help you out

                      > I realized some of the formatting errors in previous post as soon as I
                      > pressed the button. Oh well. Am getting skunked on this one so far.
                      >
                      > Am trying to work out a noncommercial, live webcasting system for small
                      > events -- video with audio. Right now, have a test stream running.
                      > Streamed from here locally to a remote shoutcast server -- am using the
                      > NSV stuff right now for a number of reasons -- lower encoding cpu
                      here at
                      > home, no home bandwidth consumed by viewers, and it includes an activex
                      > control for webpage viewing, to mention a few.
                      >
                      > The NSV activex player is open source, but was not documented very well
                      > and api not formally published. Right when Nullsoft first got it all
                      > going, there was a move to AOL. After that, the same people wrote
                      another
                      > activex, then open source and also using NSV. Same thing on the api,
                      just
                      > snatches found here and there on the web.
                      >
                      > You can see a "dead" broadcast -- nothing visual is happening, just an
                      > easy chair where the dogs loaf, and for audio, cspan commentary.
                      >
                      > Test Player I: http://plankroadnetstreams.com/pr-radio/webcam/n-test.php
                      > Test Player II:
                      http://plankroadnetstreams.com/pr-radio/webcam/a-test.php
                      >
                      Neither of these pages are up any longer because I'm getting an 404
                      error when trying to access them. (That's a page not found). I was
                      going to point a few minor things but since they aren't up any longer
                      I can't do that.

                      Bob
                    • pistolrussell
                      Wasn t meant to be criticizing. Its just that one can do more when we see the underlying page and what is actually going on so that we can best help you
                      Message 10 of 14 , Feb 4, 2006
                      • 0 Attachment
                        "Wasn't meant to be criticizing. Its just that one can do more when
                        we see the underlying page and what is actually going on so that we
                        can best help you out."

                        Certainly didn't take your comments as criticism at all, just
                        helpful, thanks.

                        "Neither of these pages are up any longer because I'm getting an 404
                        error when trying to access them. (That's a page not found). I was
                        going to point a few minor things but since they aren't up any longer
                        I can't do that.

                        Bob"

                        Thanks for the reply. Was using two different versions of player
                        control javascripting, thus the "n" and the "a" pages.

                        Your suggestions were most helpful with regard to the "n" version.
                        The script below and its overlib call worked fine to show the
                        current volume on button mouseover:
                        --------------------------------------------------------------
                        function showvolume() {
                        v=nsvplayx.GetVolume()
                        var current = v*.4;
                        if(v==255) {
                        var mytext= 'Volume Level is '+current-2;
                        }
                        else
                        {
                        var mytext = 'Volume Level is '+current;
                        return mytext;
                        }
                        }
                        --------------------------------------------------------------
                        <a href="#" onmouseover="return overlib(FUNCTION,showvolume
                        (nsvplayx.GetVolume()),WRAP);" onmouseout="nd();">

                        The "nsvplayx.GetVolume()" refers to the player activex control
                        version instead of using the generic Player.GetVolume() in your
                        suggestion.
                        ----------------------------------------------------------------

                        However, when I further tested the "n" version, discovered that I
                        had various controller problems that I had been unaware of
                        previously, so temporarily scratched the "n" version until further
                        work on player control javascripting corrects its problems, which
                        are completely unrelated to overlib.

                        The "a" test version uses a similar but somewhat different activex
                        control. Have been unable to get the overlib link call to work on
                        this version, so on mouseover, the "i" button on the player controls
                        simply shows a few words of text. But the player controls work okay.
                        You can see this "a" version by going to:

                        http://plankroadnetstreams.com/pr-radio/webcam/online-survey.php

                        The page will remain on line, but at times, its player may not be
                        broadcasting. Hours for test broadcasts are approximately 3-6 pm est
                        and 8 to 11 pm est, depending on whether am working on it.

                        Thank you again, very much, for your time and help.
                      • Nell Bolen
                        Thanks again for your help. Have finally gotten the function to work with the online-survey.php version a you checked out. This js code, placed in the
                        Message 11 of 14 , Feb 4, 2006
                        • 0 Attachment
                          Thanks again for your help. Have finally gotten the function to work with
                          the online-survey.php version "a" you checked out. This js code, placed in
                          the header, works:

                          ================================================================
                          function getV() {
                          v=winampx.Volume;
                          if(v != 255) {
                          current = v*.4;
                          }
                          else
                          {
                          current = v*.3921568627450980392256862;
                          }
                          var mytext = 'Volume Level is '+current;
                          return mytext;
                          }

                          with this overlib call:

                          <a href="#" onmouseover="return overlib(FUNCTION,getV(),WRAP);"
                          onmouseout="nd();">
                          =======================================================================
                          Doesn't work if JS code is placed in the body section with other js
                          scripting. Of course, with my zero JS knowledge, I have no idea why that's
                          so.

                          Will rework the function using your most recent suggestions, and
                          sincerely, I thank you for your time, knowledge and help very much indeed.

                          PS The test "broadcast" (loafing dogs and cpan) is running tonight until
                          about midnight
                          (http://plankroadnetstreams.com/pr-radio/webcam/online-survey.php)
                        • Robert E Boughner
                          ... No problem. Glad you got it working for you. I would change your function showvolume to this: function showvolume(v) { var mytext= , current; if (v) {
                          Message 12 of 14 , Feb 4, 2006
                          • 0 Attachment
                            --- In overlib@yahoogroups.com, "pistolrussell" <n@...> wrote:
                            >
                            > "Wasn't meant to be criticizing. Its just that one can do more when
                            > we see the underlying page and what is actually going on so that we
                            > can best help you out."
                            >
                            > Certainly didn't take your comments as criticism at all, just
                            > helpful, thanks.
                            >
                            > "Neither of these pages are up any longer because I'm getting an 404
                            > error when trying to access them. (That's a page not found). I was
                            > going to point a few minor things but since they aren't up any longer
                            > I can't do that.
                            >
                            > Bob"
                            >
                            > Thanks for the reply. Was using two different versions of player
                            > control javascripting, thus the "n" and the "a" pages.
                            >
                            > Your suggestions were most helpful with regard to the "n" version.
                            > The script below and its overlib call worked fine to show the
                            > current volume on button mouseover:
                            > --------------------------------------------------------------
                            > function showvolume() {
                            > v=nsvplayx.GetVolume()
                            > var current = v*.4;
                            > if(v==255) {
                            > var mytext= 'Volume Level is '+current-2;
                            > }
                            > else
                            > {
                            > var mytext = 'Volume Level is '+current;
                            > return mytext;
                            > }
                            > }
                            > --------------------------------------------------------------
                            > <a href="#" onmouseover="return overlib(FUNCTION,showvolume
                            > (nsvplayx.GetVolume()),WRAP);" onmouseout="nd();">
                            >
                            > The "nsvplayx.GetVolume()" refers to the player activex control
                            > version instead of using the generic Player.GetVolume() in your
                            > suggestion.
                            > ----------------------------------------------------------------
                            >
                            > However, when I further tested the "n" version, discovered that I
                            > had various controller problems that I had been unaware of
                            > previously, so temporarily scratched the "n" version until further
                            > work on player control javascripting corrects its problems, which
                            > are completely unrelated to overlib.
                            >
                            > The "a" test version uses a similar but somewhat different activex
                            > control. Have been unable to get the overlib link call to work on
                            > this version, so on mouseover, the "i" button on the player controls
                            > simply shows a few words of text. But the player controls work okay.
                            > You can see this "a" version by going to:
                            >
                            > http://plankroadnetstreams.com/pr-radio/webcam/online-survey.php
                            >
                            > The page will remain on line, but at times, its player may not be
                            > broadcasting. Hours for test broadcasts are approximately 3-6 pm est
                            > and 8 to 11 pm est, depending on whether am working on it.
                            >
                            > Thank you again, very much, for your time and help.
                            >

                            No problem. Glad you got it working for you. I would change your
                            function showvolume to this:

                            function showvolume(v) {
                            var mytext='', current;
                            if (v) {
                            current = v*.4;
                            mytext+='Volume Level is ';
                            mytext += ((v==255) ? current-2 : current);
                            }
                            return mytext;
                            }

                            You're passing the volume level in already so you don't need to
                            redefine it. Here v is a dummy argument to be acted upon. First check
                            that it is defined and if it is then set your internal variables. If
                            it isn't defined then all you're returning is the null string
                            otherwise you return the volume setting. Here I'm using the tertiary
                            operator which is boolean ? if boolean is true do this : otherwise do
                            this. Its a nice shorthand way of writing code. Also notice that
                            I've only put these two variables in a var statement once because that
                            is all that you need to do.

                            Bob
                          • pistolrussell
                            Hello again, Just wanted to report that player controls on version n of the test player pages now work. It uses Bob s suggestions for JS to get the player to
                            Message 13 of 14 , Feb 5, 2006
                            • 0 Attachment
                              Hello again,

                              Just wanted to report that player controls on version "n" of the
                              test
                              player pages now work. It uses Bob's suggestions for JS to get the
                              player to show the current volume with overlib.
                              -------------------------------------------------------------------
                              Current JS code:

                              function showvolume(v) {
                              var mytext='', current;
                              if (v) {
                              current = v*.4;
                              mytext+='Volume Level is ';
                              mytext += ((v==229) ? current-1.60000000000001 : (v==255) ?
                              current-2 : current);

                              }
                              return mytext;
                              }
                              -------------------------------------------------------------------
                              Current link code:

                              <a href="#" onmouseover="return overlib('Click for current audio
                              level', WRAP);" onclick="return overlib(FUNCTION,showvolume
                              (nsvplayx.GetVolume()),WRAP);" onmouseout="nd();">
                              <img src="v-level.gif" width="16" height="15" border="0"></a>

                              -------------------------------------------------------------------

                              Apparently, the NSV activex control sets the onload volume at 229,
                              which outputs, via the js, a level of 91.60000000000001 for current
                              volume. Thanks very much for Bob's code update -- using its syntax
                              made correcting that long volume level pretty easy.

                              Now, that's it on this one -- hooray. Thanks again for all the help.
                              Am now a devoted overlib fan.
                            • Robert E Boughner
                              ... Glad that things are working well for you now. Just post back if there are any other problems. Bob
                              Message 14 of 14 , Feb 6, 2006
                              • 0 Attachment
                                --- In overlib@yahoogroups.com, "pistolrussell" <n@...> wrote:
                                >
                                > Hello again,
                                >
                                > Just wanted to report that player controls on version "n" of the
                                > test
                                > player pages now work. It uses Bob's suggestions for JS to get the
                                > player to show the current volume with overlib.
                                > -------------------------------------------------------------------
                                > Current JS code:
                                >
                                > function showvolume(v) {
                                > var mytext='', current;
                                > if (v) {
                                > current = v*.4;
                                > mytext+='Volume Level is ';
                                > mytext += ((v==229) ? current-1.60000000000001 : (v==255) ?
                                > current-2 : current);
                                >
                                > }
                                > return mytext;
                                > }
                                > -------------------------------------------------------------------
                                > Current link code:
                                >
                                > <a href="#" onmouseover="return overlib('Click for current audio
                                > level', WRAP);" onclick="return overlib(FUNCTION,showvolume
                                > (nsvplayx.GetVolume()),WRAP);" onmouseout="nd();">
                                > <img src="v-level.gif" width="16" height="15" border="0"></a>
                                >
                                > -------------------------------------------------------------------
                                >
                                > Apparently, the NSV activex control sets the onload volume at 229,
                                > which outputs, via the js, a level of 91.60000000000001 for current
                                > volume. Thanks very much for Bob's code update -- using its syntax
                                > made correcting that long volume level pretty easy.
                                >
                                > Now, that's it on this one -- hooray. Thanks again for all the help.
                                > Am now a devoted overlib fan.
                                >

                                Glad that things are working well for you now. Just post back if
                                there are any other problems.

                                Bob
                              Your message has been successfully submitted and would be delivered to recipients shortly.