Help - Search - Members - Calendar
Full Version: Is There A Way I Can Show This Rotation In Multi..
MonsterSmallBusiness Forums > MonsterCommerce > How do I?
superiorventures
Hello everyone,

cool.gif Let me start off with letting you know I'm NEW to this borad and VERY NEW to website building. PLEASE KNOW THIS UP FRONT................................................

I truely don't have any real understanding for any of the html, java, or any other code as far as that's concerned. huh.gif I basically stay at code and place in what I think works and see from there. detective.gif Again I don't know what ("what") means in any code yet. bash.gif KEEP THIS IN MIND if you are looking to help me here PLEASE. wink.gif

Details in lamins terms are very important, or even better yet a laid out example on what it should look like. hooray.gif (I know it's the same as doing it for me kinda.) The problem is if you tell me to put "this" in front of the variables and "that" by this other whatever, I'm going to be so LOST! cry.gif

I detective.gif found this script and like the other one that "undejj" helped me out greatly with customizing it and it was pertty simple for me to get it to work on my site. Now I would like to customize this one if I could also.

Although this script is something I have never tried before, except the area I just placed it on my site now. It is useing </ilayer>'s, so I don't have a CLUE if my question's are totally out there or not.

I have a three part question, when it comes to this script.

My first question is, with the following script "HOW can I get the source to show up in multiable areas on the same page?" (e.g. Top, middle, bottom)

I place this where I want my banners to show,
QUOTE
<ilayer id="l1">
                <layer id="l2">
                                <div id="l1">
                                                <div id="l3" style="position:relative">
                                                 </div>
                                 </div>
                  </layer>
</ilayer>


This is the script
QUOTE
<script language="JavaScript">

var bannerArray = new Array();
var myCount=0;
// Banner Code Assignment
bannerArray[0] = "<A HREF=\"http://www.location.com/affilite1\" target=\"_blank\"><IMG SRC=\"http://www.location.com/yourbanner.gif\"  border=\"0\" width=\"468\" height=\"60\"></A>";
bannerArray[1] = "<A HREF=\"http://www.location.com/affilite2\" target=\"_blank\"><IMG SRC=\"http://www.location.com/yourbanner.gif\" border=\"0\" width=\"468\" height=\"60\"></A>";
bannerArray[2] = "<A HREF=\"http://www.location.com/affilite3\" target=\"_blank\"><IMG SRC=\"http://www.location.com/yourbanner.gif\" border=\"0\" width=\"468\" height=\"60\"></A>";

bannerRotate();

function bannerRotate() {

if(myCount > bannerArray.length-1){myCount=0;}

// Write out rotation
if (document.all){   // it is IE
  document.all.l3.innerHTML=bannerArray[myCount];
}

else if (document.layers){ // it is NN

document.layers.l1.document.layers.l2.document.open();
document.layers.l1.document.layers.l2.document.write(bannerArray[myCount]);
document.layers.l1.document.layers.l2.document.close();
}
setTimeout("bannerRotate()", 9000);
myCount++;
}
// -->
</script>


This rotates my banners every ten seconds to the next one in line, along with a hyper link to that banner showing at the time.

The second question is the same as the one I had with the script "undejj" helped me with. "Is there also a way I can run more then one of this same script on the same page?" (If so can you please also help with an example layout like "undejj" ended up having to do to help me before?") thumbsup.gif

What I am thinking about doing with the second question part is, take one for each of my affiliate programs. Load all that affiliate happens to have or that I want to use on one script and run it on area of a page. Then do the same with a different affiliate. clap.gif

The thrid part of the question, "Is there a way I can open the links in pop-up where there is NO ADDRESS BAR, through like another java call script like this one tied into it. (e.g. only.) Say I called this script to the same page
QUOTE
<script language="JavaScript">

function affilite1(URL,name)
{

new_window1 = window.open("http://www.location.com/affilite1","affilite1", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,left=20,top=0,resizable=0,width=800,height=510");
}
function affilite2(URL,name)
{

new_window2 = window.open("http://www.location.com/affilite2","affilite2", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,left=20,top=0,resizable=0,width=800,height=600");
}
function affilite3(URL,name)
{

new_window3 = window.open("http://www.location.com/affilite3","affilite3", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,left=20,top=0,resizable=0,width=800,height=600");



I was thinking something like this? I have NO CLUE if this can even be done or just going to be a good laugh for some of you.(lol)
QUOTE
<script language="JavaScript">

var bannerArray = new Array();
var myCount=0;
// Banner Code Assignment
bannerArray[0] = "<a href="javascript:affilite1();"\" target=\"_blank\"><IMG SRC=\"http://www.location.com/yourbanner.gif\"  border=\"0\" width=\"468\" height=\"60\"></A>";
bannerArray[1] = "<a href="javascript:affilite2();\" target=\"_blank\"><IMG SRC=\"http://www.location.com/yourbanner.gif\" border=\"0\" width=\"468\" height=\"60\"></A>";
bannerArray[2] = "<a href="javascript:affilite3();\" target=\"_blank\"><IMG SRC=\"http://www.location.com/yourbanner.gif\" border=\"0\" width=\"468\" height=\"60\"></A>";

bannerRotate();

function bannerRotate() {

if(myCount > bannerArray.length-1){myCount=0;}

// Write out rotation
if (document.all){  // it is IE
  document.all.l3.innerHTML=bannerArray[myCount];
}

else if (document.layers){ // it is NN

document.layers.l1.document.layers.l2.document.open();
document.layers.l1.document.layers.l2.document.write(bannerArray[myCount]);
document.layers.l1.document.layers.l2.document.close();
}
setTimeout("bannerRotate()", 9000);
myCount++;
}
// -->
</script>


I have again NO CLUE if that would even be able to be done, but I think you should at least see what it is I'm after as the final aspects.

If anyone would be nice enough again to HELP ME out here and show me how, I would be most thankful. thumbsup.gif woot.gif thumbsup.gif
undejj
I really don't feel like tackling this one, but I would at least like to suggest that you provide us with the URL of your site so that we can see what you are talking about (that was one problem with the last script - it is difficult to help you blindly). Or provide us with a link to another site where you have seen this in action.

Thanks!
superiorventures
QUOTE(undejj @ Apr 21 2005, 11:00 AM)
I really don't feel like tackling this one, but I would at least like to suggest that you provide us with the URL of your site so that we can see what you are talking about (that was one problem with the last script - it is difficult to help you blindly). Or provide us with a link to another site where you have seen this in action.

Thanks!
[right][snapback]74696[/snapback][/right]



Hi again *&* thanks for looking at least, remember it's a three part question. I'd take an answer to any of the three if I can't get all. (lol)

Here is where I found the script, "Rotating banners by time"

Two of thier banners do not show, but again I have it working fine on one of my sites now. Just looking to place it in more then one area. I didn't know if there would be a way like we did on the last script where we add the "2" and work it that way. (When it comes to the one question.)

On the third part of my question about "No address bar java call" if it's even something that could be done or not. I just showed what I that it might look like if it would be done that way. (Mayjor thing is can it even be done? Second if it can, did I do it like it would be done *&* did I leave out anything if it can?)

On my addresses to where I have it working goes. Like I had mentioned before about the type *&* all of sites. (I don't know if it would be OK to put them here or not.) I'm a VERY OPEN-minded type of girl more then most if you catch my drift *&* think if one is an adult *&* likes to have fun *&* wants to do things that hurt know one, then it's ok to me. At the same time, I'm just trying to make it like the next person.

I don't want to get into any trouble, being NEW to all this *&* you being as helpfull as you was last time. I'd hate to lose your help or others. Just let me know if it's still OK to post an adult type site here or not.


THANK YOU AGAIN!!
undejj
I lied .. I guess I will take a hack at answering all three questions at once:

CODE
<style type="text/css">
.affiliateimg {
    border:  0px;
    width: 468px;
    height: 60px;
}
</style>

<script language="JavaScript">
var bannerArray = new Array();
var myCount=0;
// Banner Code Assignment
bannerArray[0] = '<a href="javascript:affiliate(\'http://www.location.com/affiliate1\',\'affiliate1\');"><IMG class="affiliateimg" src="http://www.location.com/yourbanner.gif"></A>';
bannerArray[1] = '<a href="javascript:affiliate(\'http://www.location.com/affiliate2\',\'affiliate2\');"><IMG class="affiliateimg" src="http://www.location.com/yourbanner.gif"></A>';
bannerArray[2] = '<a href="javascript:affiliate(\'http://www.location.com/affiliate3\',\'affiliate3\');"><IMG class="affiliateimg" src="http://www.location.com/yourbanner.gif"></A>';
bannerArray[3] = '<a href="javascript:affiliate(\'http://www.location.com/affiliate4\',\'affiliate4\');"><IMG class="affiliateimg" src="http://www.location.com/yourbanner.gif"></A>';
bannerArray[4] = '<a href="javascript:affiliate(\'http://www.location.com/affiliate5\',\'affiliate5\');"><IMG class="affiliateimg" src="http://www.location.com/yourbanner.gif"></A>';
bannerArray[5] = '<a href="javascript:affiliate(\'http://www.location.com/affiliate6\',\'affiliate6\');"><IMG class="affiliateimg" src="http://www.location.com/yourbanner.gif"></A>';

bannerRotate();

function bannerRotate() {
    if(myCount > bannerArray.length-4){myCount=0;}
    // Write out rotation
    if (document.all){  // it is IE
         document.all.l3.innerHTML=bannerArray[myCount];
         document.all.l6.innerHTML=bannerArray[myCount+3];
    }
    else if (document.layers){ // it is NN
         document.layers.l1.document.layers.l2.document.open();
         document.layers.l1.document.layers.l2.document.write(bannerArray[myCount]);
         document.layers.l1.document.layers.l2.document.close();
         document.layers.l4.document.layers.l5.document.open();
         document.layers.l4.document.layers.l5.document.write(bannerArray[myCount+3]);
         document.layers.l4.document.layers.l5.document.close();
    }
    setTimeout("bannerRotate()", 9000);
    myCount++;
}

function affiliate(URL,name) {
    new_window = window.open(URL,name,"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,left=20,top=0,resizable=0,width=800,height=510");
}
// -->
</script>

<ilayer id="l1">
    <layer id="l2">
         <div id="l3" style="position:relative">
         </div>
    </layer>
</ilayer>

<ilayer id="l4">
    <layer id="l5">
         <div id="l6" style="position:relative">
         </div>
    </layer>
</ilayer>

Because of the way I chose to combine the scripts into one, you need to have an equal number of banners in each location. In the example, there are exactly 3 banners in each location -- banners 1-3 in the first location and banners 4-6 in the second location.

As long as you have pop-up blockers turned off, the windows should open. And you already had the code to eliminate the Address Bar (location=0).

I haven't tested this code anywhere at all, so if it works the first time, I'll be stunned! It sure does look good though .. tongue.gif
TNTGram
I have no idea what magic you're doing undejj, but the amount of code is impressive! LOL

Superiorventures does have a monstersmile.gif site, right? I see the profile showing member not verified merchant....just curious...
superiorventures
Why let me start off with a THANKS again for looking.
I'm lost again already though, you have something at the top of that i don't know anything about or ever used yet.

QUOTE
<style type="text/css">
.affiliateimg {
    border:  0px;
    width: 468px;
    height: 60px;
}
</style>


I think it's something about pulling the code from a text file on the server. I have never used or tried to use anything like this before so you lost me fast again. cry.gif huh.gif cry.gif

I so wish I knew more, so I wouldn't have these types os slow downs. If that is what it is, on my main site, I (If I knew more about how it works,) could do something like that, but not on my other sites. Which is where I want to place it in muti areas on the same page. I also noticed that you have it sized one way, unlike the other which could run whatever size I placed in it. blinking.gif When you write it that way, does that stop me from doing that? bash.gif

Something else I noticed right away is where to place my image and size. (I see that class= calling for banners, but I have no clue how or from where or anything else. (lol)

I'm sorry about going the LONG way about showing me.

What is a Monstersite? huh.gif That other guy lost me too. grin.gif Am I not aloud to be here or something? lookout.gif
undejj
I have a feeling that you are trying to read and analyze the code before you ever decide to do anything with it. You really should place the code in your page and try it before you comment on it.

That thing that you are unfamiliar with is called a style, just like its label implies. You can place that code in the same location that you place your script. The images all reference class="affiliateimg." That is a reference to the style that I just mentioned. Since all of your images are the same size, using styles is a much more efficient way of specifying the size and border. It cuts down on your code.

Put the style and the script wherever you normally place scripts. Then place each ilayer wherever you are going to place your banners. Save your page and test it. Then come back here and tell us if it works.

I believe that it is only logical that MonsterCommerce merchants use these forums, especially because a lot of the discussions here relate specifically to the MC cart. But I think it is open to all people. At least I hope it is because I am no longer a merchant. whoa.gif
superiorventures
Hello again, *&* thanks!

You are right to some degree, I do that in order to understand what I have to do to get my things to work. (banners, links, ect.)

With the way I see what you have done, I do not know where to place my banner info, nor do I understand in full how my aff. link goes in for sure. Makes it hard for me to get. I think because I got a few things to work that are more in depth then someone like me would use, that I know more then I do. (lol)

Please understand I'm not in anyway knocking that why you wrote it. I just am not getting what I would have to do to make my items all work. I do VERY MUCH thank you for all yoru help so far.

Also I think you misunderstood me on my banner sizes before. They are NOT all the same size. (That's what I liked about the way it worked before.)

Also I want to be able to use it in a couple different methods. On one hand I want to place the banners in anywhere from 6 or more different areas on one page.

On another hand I would also like to be able to run a few different sets on one page. In other words I was thinking about setting up one with all the sites that the aff. offers, and do the same with another and so on, then place all on one page.

The open in a BLANK page with NO TOOL BAR, NO LOCATION BAR, is all the items I don't want. I would need resizeable, I would also need the scroll.

Sorry about any misunderstanding.
undejj
I give up. If you are going to place rotating banners in six or more areas on one page, then I think yours is one of those sites that I would rather not be affiliated with (no pun intended). Not to mention that is, in my opinion, too much client-side scripting to run on one page. It's more overhead than you should be subjecting your customer's browsers to.

I tried to be patient and to truly understand what you are trying to do, but it seems to change with each post that you make. I hope that you can understand that my patience has worn thin.

P.S. I noticed the way that you analyzed my script before and were able to make your own changes. I think that you could be off to a good start with this one if you just put a little initiative into it.

Thanks and Good Luck! thumbsup.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.