Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Place 'random' into a script call - SOLVED
- From: javascript@xxxxxxxxxx (Greg Krieser)
- Subject: [Javascript] Place 'random' into a script call - SOLVED
- Date: Wed, 29 May 2002 10:15:12 -0500
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@xxxxxxxxxxx> 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@xxxxxxxxxx > https://lists.LaTech.edu/mailman/listinfo/javascript >
- Prev by Date: [Javascript] (no subject)
- Next by Date: [Javascript] (no subject)
- Previous by thread: [Javascript] Underline character in button value (IE)
- Next by thread: [Javascript] How to start a java application?
- Index(es):