4 Replies - 1761 Views - Last Post: 23 June 2009 - 07:35 AM

#1 gamara3  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-June 09

how to random amazon banner<iframe>

Post icon  Posted 23 June 2009 - 05:49 AM

<script LANGUAGE="Javascript"><!--

function banner() {
};

banner = new banner();
number = 0;
banner[number++] = "<iframe src="http://rcm.amazon.com/e/cm?t=xxx-20&o=1&p=48&l=ur1&category=electronics&banner=1PWXNPPRG6D2NYYKV782&f=ifr" width="728" height="90" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>"
banner[number++] = "<iframe src="http://rcm.amazon.com/e/cm?t=xxx-20&o=1&p=48&l=ur1&category=electronics&banner=1PWXNPPRG6D2NYYKV782&f=ifr" width="728" height="90" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>"
increment = Math.floor(Math.random() * number);

document.write(banner[increment]);

//--></SCRIPT>



in .js it not run
help me pls!!!!

Is This A Good Question/Topic? 0
  • +

Replies To: how to random amazon banner<iframe>

#2 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: how to random amazon banner<iframe>

Posted 23 June 2009 - 05:59 AM

This is a java forum, not javascript
Was This Post Helpful? 0
  • +
  • -

#3 computerfox  Icon User is offline

  • straight vegetarian kid

Reputation: 50
  • View blog
  • Posts: 3,772
  • Joined: 29-January 09

Re: how to random amazon banner<iframe>

Posted 23 June 2009 - 06:30 AM

View Postnick2price, on 23 Jun, 2009 - 04:59 AM, said:

This is a java forum, not javascript


lol +1, i'm sure he didn't realize that though nick but yeah, there's a separate sub-forum for javascript.
Was This Post Helpful? 0
  • +
  • -

#4 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: how to random amazon banner<iframe>

Posted 23 June 2009 - 07:07 AM

Moved to Javascript...

What exactly are you trying to randomize?
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1638
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: how to random amazon banner<iframe>

Posted 23 June 2009 - 07:35 AM

Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:
  • Post the code you're having problems with
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1