473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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="flashcontent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="80" height="40" id="accesscode" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="accesscode.swf?gifFile=123456"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="accesscode.swf" quality="high" bgcolor="#ffffff" width="80"
height="40" name="accesscode" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://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?

Nov 7 '06 #1
5 1479
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="flashcontent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="80" height="40" id="accesscode" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="accesscode.swf?gifFile=123456"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="accesscode.swf" quality="high" bgcolor="#ffffff" width="80"
height="40" name="accesscode" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://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="accesscode.swf?gifFile=' +
Random(9999) + '">')

Where Random is the Random function from the group FAQ.

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

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '06 #2
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="flashcontent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="80" height="40" id="accesscode" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="accesscode.swf?gifFile=123456"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="accesscode.swf" quality="high" bgcolor="#ffffff" width="80"
height="40" name="accesscode" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://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="accesscode.swf?gifFile=' +
Random(9999) + '">')

Where Random is the Random function from the group FAQ.

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

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '06 #3
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.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '06 #4
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.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 8 '06 #5
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.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 8 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) ...
4
by: timwap | last post by:
I hava a Java Applet that produces a DTMF tone at a certain time of day. There are 4 parameters to the Applet, they are hour = Hour of triggered event 00~23 min = minute of triggered event 00~59...
1
by: IS | last post by:
Hi folks, Any ideas why this doesn't work? <SCRIPT LANGUAGE="JavaScript"> <!-- f = document.forms; e = f.elements; str = new String(e.value); len = document.forms.d.options.length;
0
by: cschang | last post by:
I have a file upload module written in .aspx. I want to write the filename (just the name) uploaded back to the my parent .asp file (the ..aspx file was a pop-up window related to the .asp) so...
2
by: Holger Butschek | last post by:
Hi folks, first of all, I'm absolutly new to javascript. I have designed a html-form and am trying to path parameters with the suffix of i.e. ?Seminartitel=hallowelt in the url. In the head...
6
by: ged | last post by:
Hi, i am a oo (c#) programmer, and have not used javascript for a while and i cant work out how javascript manages its references. Object References work for simple stuff, but once i have an...
4
by: 42Olds | last post by:
I am trying to change an int on a page using JS - up if the right button is clicked, down if the left one. The code dose increment the value - and even places it in the holder currentThumb, but...
5
by: steve9013 | last post by:
Hello. Hoping someone can help me out with this. Please forgive me as I'm very new to jscript. I need to have the input box at the top of the page store the string to a variable. I then need...
1
globalguideline
by: globalguideline | last post by:
Hi all here at forum. I am working to find out some solution to access a web page in PHP that is showing information on the bases of given argument in query string variable. My problem is this that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.