[Javascript] Place 'random' into a script call - SOLVED
Greg Krieser
greg at krieser.com
Wed May 29 10:15:12 CDT 2002
For everyone's information this solution works:
<script LANGUAGE="JavaScript" SRC="http://64.41.103.143/cgi-bin/ad/k2fad.cgi?'javascript:parseInt(Math.random()*1000)'999+F=IMG">
</script>
Thanks,
Greg
The following message was sent by "Greg Krieser" <greg at krieser.com> on Tue, 28 May 2002 22:26:06 -0500.
> Is it possibe to use a number generated in one Javascript area and place
> it in another? Here is what I'd like to do. Across a site I'd like to
> call a perl script using this Javascript command. That works fine and
> gives me the results I like.
>
> <script language="JavaScript" src="http://64.41.103.143/cgi-bin/ad/k2fad.cgi?999+F=IMG"></script>
>
> However, I'd like 999 to be a random number each time the page is loaded,
> i.e. :
>
> <script LANGUAGE="JavaScript">
> random = parseInt(Math.random()*1000)
> </script>
>
> Is it possible to use random in place of the 999 when the script is called?
>
> Thanks,
>
> Greg
>
>
> P.S. I'm attempting to adapt a banner script to allow flash ads as well
> as gif and jpg. The beauty of using JavaScript is that a new random ad
> is displayed when visitors returns to the page or uses the back button.
> Whereas other call methods (and therefore random methods) will simply
> return the cached image.
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
More information about the Javascript
mailing list