Passing a value from jscript to html

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jake G

    Passing a value from jscript to html

    I have a flash word verification doohickey running on a page that
    submits an email (problem with a spammer).

    The code for the flash is......

    <td width="109"<div id="flashconten t">
    <object classid="clsid: d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://fpdownload.macr omedia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,0,0"
    width="80" height="40" id="accesscode " align="middle">
    <param name="allowScri ptAccess" value="sameDoma in" />
    <param name="movie" value="accessco de.swf?gifFile= 123456"/>
    <param name="quality" value="high" />
    <param name="bgcolor" value="#000000" />
    <embed src="accesscode .swf" quality="high" bgcolor="#fffff f" width="80"
    height="40" name="accesscod e" align="middle"
    allowScriptAcce ss="sameDomain " type="applicati on/x-shockwave-flash"
    pluginspage="ht tp://www.macromedia. com/go/getflashplayer" />
    </object>

    I need to pass it the currently hardcoded 123456 number. I want to
    pass it something like

    <script type="text/javascript">
    var numbers = Math.round(Math .random()*99999 );
    </script>
    I cannot just set gifFile = numbers, it is null.
    How do I pass the variable numbers to the flash program?

  • Randy Webb

    #2
    Re: Passing a value from jscript to html

    Jake G said the following on 11/7/2006 10:09 AM:
    I have a flash word verification doohickey running on a page that
    submits an email (problem with a spammer).
    >
    The code for the flash is......
    >
    <td width="109"<div id="flashconten t">
    <object classid="clsid: d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://fpdownload.macr omedia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,0,0"
    width="80" height="40" id="accesscode " align="middle">
    <param name="allowScri ptAccess" value="sameDoma in" />
    <param name="movie" value="accessco de.swf?gifFile= 123456"/>
    <param name="quality" value="high" />
    <param name="bgcolor" value="#000000" />
    <embed src="accesscode .swf" quality="high" bgcolor="#fffff f" width="80"
    height="40" name="accesscod e" align="middle"
    allowScriptAcce ss="sameDomain " type="applicati on/x-shockwave-flash"
    pluginspage="ht tp://www.macromedia. com/go/getflashplayer" />
    </object>
    >
    I need to pass it the currently hardcoded 123456 number. I want to
    pass it something like
    >
    <script type="text/javascript">
    var numbers = Math.round(Math .random()*99999 );
    </script>
    I cannot just set gifFile = numbers, it is null.
    How do I pass the variable numbers to the flash program?
    document.write the entire object element and then insert the random
    number where the 123456 is at. Something like this:

    document.write( '<object....... .....>')
    document.write( '<parame name="movie" value="accessco de.swf?gifFile= ' +
    Random(9999) + '">')

    Where Random is the Random function from the group FAQ.

    function Random(x) { return Math.floor(x*Ma th.random()) }

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javas cript FAQ - http://jibbering.com/faq
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

    Comment

    • Jake G

      #3
      Re: Passing a value from jscript to html

      group FAQ???

      Randy Webb wrote:
      Jake G said the following on 11/7/2006 10:09 AM:
      I have a flash word verification doohickey running on a page that
      submits an email (problem with a spammer).

      The code for the flash is......

      <td width="109"<div id="flashconten t">
      <object classid="clsid: d27cdb6e-ae6d-11cf-96b8-444553540000"
      codebase="http://fpdownload.macr omedia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,0,0"
      width="80" height="40" id="accesscode " align="middle">
      <param name="allowScri ptAccess" value="sameDoma in" />
      <param name="movie" value="accessco de.swf?gifFile= 123456"/>
      <param name="quality" value="high" />
      <param name="bgcolor" value="#000000" />
      <embed src="accesscode .swf" quality="high" bgcolor="#fffff f" width="80"
      height="40" name="accesscod e" align="middle"
      allowScriptAcce ss="sameDomain " type="applicati on/x-shockwave-flash"
      pluginspage="ht tp://www.macromedia. com/go/getflashplayer" />
      </object>

      I need to pass it the currently hardcoded 123456 number. I want to
      pass it something like

      <script type="text/javascript">
      var numbers = Math.round(Math .random()*99999 );
      </script>
      I cannot just set gifFile = numbers, it is null.
      How do I pass the variable numbers to the flash program?
      >
      document.write the entire object element and then insert the random
      number where the 123456 is at. Something like this:
      >
      document.write( '<object....... .....>')
      document.write( '<parame name="movie" value="accessco de.swf?gifFile= ' +
      Random(9999) + '">')
      >
      Where Random is the Random function from the group FAQ.
      >
      function Random(x) { return Math.floor(x*Ma th.random()) }
      >
      --
      Randy
      Chance Favors The Prepared Mind
      comp.lang.javas cript FAQ - http://jibbering.com/faq
      Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

      Comment

      • Randy Webb

        #4
        Re: Passing a value from jscript to html

        Jake G said the following on 11/7/2006 2:16 PM:
        group FAQ???
        Yeah, the one in my signature that also explains about top-posting and
        interleaving your replies.

        --
        Randy
        Chance Favors The Prepared Mind
        comp.lang.javas cript FAQ - http://jibbering.com/faq
        Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

        Comment

        • Jake G

          #5
          Re: Passing a value from jscript to html

          Oh ok. Sorry that was a stupid question :)
          Randy Webb wrote:
          Jake G said the following on 11/7/2006 2:16 PM:
          group FAQ???
          >
          Yeah, the one in my signature that also explains about top-posting and
          interleaving your replies.
          >
          --
          Randy
          Chance Favors The Prepared Mind
          comp.lang.javas cript FAQ - http://jibbering.com/faq
          Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

          Comment

          • Randy Webb

            #6
            Re: Passing a value from jscript to html

            Jake G said the following on 11/8/2006 9:52 AM:
            Oh ok. Sorry that was a stupid question :)
            Forgiveness is forthcoming, it will only cost you your first three
            newborn children, a left arm, a right foot and an ear lobe. The ear lobe
            is interest on having to wait for payment :)

            --
            Randy
            Chance Favors The Prepared Mind
            comp.lang.javas cript FAQ - http://jibbering.com/faq
            Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

            Comment

            Working...