Inserting javascript banner code into html

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Inserting javascript banner code into html
turbo6shooter
CZ Newbie
 Codezwiz Site Donator
turbo6shooter has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Nov 09, 2004
0.00 posts per day
Posts: 10
Points: 898
   
I would like to have a picture for a background (1000px x 91px)

and have the banner (that i have made using the cz banner generator) on top of the background around two-thirds across

as in the header in this site

[ Register or login to view links on this board.]

how do i position the javascript in the html to do so?

when i try to add the code to the html, the banner just shows up below the background picture



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
You will have to make a table with the background image as the table background then position your banner inside that table where you want it.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Inserting javascript banner code into html
turbo6shooter
CZ Newbie
 Codezwiz Site Donator
turbo6shooter has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Nov 09, 2004
0.00 posts per day
Posts: 10
Points: 898
   
ive built a table and set the picture as background (td background="farout7.gif" width="1000" height="91" border="0" alt="")

then i added the banner script that i generated right below

and closed my td, tr, table statements

now my banner sits where i want it to

but now the background image disappears behind the banner

it just looks like 2 cells side by side with a white background behind the banner on the right side
and the background image is chopped in half on the left side

i also changed the 1000px to 100% (td background="farout7.gif" width="100%" height="91" border="0" alt="") same results

i would post my code, but the site keeps telling me the html code that i used is not allowed--can i send it to you to check out?



Back to top Reply with quote
#4   
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
Hi turbo,
You could zip a text file and post that also a link to the page you are working on might help.



Back to top Reply with quote
#5   re: Inserting javascript banner code into html
turbo6shooter
CZ Newbie
 Codezwiz Site Donator
turbo6shooter has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Nov 09, 2004
0.00 posts per day
Posts: 10
Points: 898
   
I havent applied my file to the site yet

[ Register or login to view links on this board.]

the way the header is right now, is how i want it to look, but i can only flip 2 banners with it the way it is constructed right now
what i did in this header--i made all my banners with hotspots (in fireworks) and put each banner one after another by first inserting the first banner then inserting more banners by adding frames--once i got them to change, then i added a layer for the background. unfortunately, this only works with 2 banners. Any more than that, each banner loses the link that i gave it in the hotspot. In other words, when the banner changes, the link doesn't follow.

now, i want to change to javascript and use the banner generator in codezwiz to get the same result but with more than 2 banners and corresponding hyperlinks

heres what ive got so far...



Attached Files
farout10.zip (1.1 KB, Downloaded: 5232 Time(s))


Back to top Reply with quote
#6   re: Inserting javascript banner code into html
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
Hi Turbo,

Well I checked out your script and it works fine for me, NO the the link that is being displayed in the status of browser doesn't change with the rotation of the ad but in all actualality the link its self is rotating with the banners. The problem lies in the mouse over handler, The script is telling the browser to display the links address of the banner that you moved mouse over.

Thats the catch, the script instant only happens once and that is right as the mouse moves over the given point. You can refresh the mouse over action by timing out the function that is controling it.

As it stands right now in the script the

"Banner_status()"

function is the one we want to refresh, so by adding

"setTimeout( "Banner_status()", 1000);"

to that function we tell the script to reload the mouse over every 1 seconds if the mouse is hovering over the banner.

I went ahead and created sum blank banners from here, and put it all to together so you could see how it works ( i actually created 2 different pages, diff btw the 2 is the second one I put the script in an external js file and just linked to it.)

[ Register or login to view links on this board. ]
[ Register or login to view links on this board. ]


and finally here is the root folder that has the files in it
[ Register or login to view links on this board. ]



Back to top Reply with quote
#7   re: Inserting javascript banner code into html
turbo6shooter
CZ Newbie
 Codezwiz Site Donator
turbo6shooter has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Nov 09, 2004
0.00 posts per day
Posts: 10
Points: 898
   
lol was i WAYYY off!!!

put the javascript first, then apply the background in a table, then anchor
i didnt know about anchoring in javascript

thanks so much it works GREAT!!!



Back to top Reply with quote
#8   
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
Np yw



Back to top Reply with quote
#9   re: Inserting javascript banner code into html
turbo6shooter
CZ Newbie
 Codezwiz Site Donator
turbo6shooter has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Nov 09, 2004
0.00 posts per day
Posts: 10
Points: 898
   
well, since im hot on the subject,

i have a similiar problem with a phpnuke flash header

i would like to use the same banner script

but wondering how to insert it

[ Register or login to view links on this board.]

i would like to insert it in the area next to the globe on the site



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum