Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 04-18-2008, 10:40 PM   #1 (permalink)
Contributing Member
 
Join Date: 01-18-08
Posts: 141
iTrader: 0 / 0%
Latest Blog:
None

madcaptains is liked by many
need help to use this script

Hello,
I am trying to use a script to integrate banners in rotation on my website.
I found a script at this address:www.bannercreator.nu

As they say, I made a file call rotation-script.js with the script they give on the site.
Also, I have add the other script on the page where I want my banners.

That script gives me nothing. For each banners, I have replaced this:
document.write("<\"Your 2. HTML-Banner-Code\">");
with something like this:
document.write("<\"mybannerurl.gif">");

Have I done it right?

Thank you
__________________
Fish-Med Aquarium fish diseases diagnosis and medication
madcaptains is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 04-18-2008, 10:55 PM   #2 (permalink)
Contributing Member
 
htmlbasictutor's Avatar
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 96
iTrader: 0 / 0%
htmlbasictutor is liked by somebodyhtmlbasictutor is liked by somebodyhtmlbasictutor is liked by somebody
Quote:
Originally Posted by madcaptains View Post
...
document.write("<\"mybannerurl.gif">");
...
Try this:

document.write("<img src='folder/imagename.gif'>");

where:
-the quotes around the path to the image are a single quote mark '
-the folder is the folder where you have the image (if it's in the same folder as the page, leave this out)
-imagename.gif is the name of your image c/w the proper extension
__________________
HTML Basic Tutor
Basic Computer Informaton - Computer Basics for website owners
htmlbasictutor is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-19-2008, 05:15 AM   #3 (permalink)
Contributing Member
 
Join Date: 01-18-08
Posts: 141
iTrader: 0 / 0%
Latest Blog:
None

madcaptains is liked by many
Thank you for your help.

I tried what you said.
I have uploaded this script at: http://www.fish-medonline.com/rotation-script.js

Finally, on my webpage, I have used this code where I want the banners:
<script language="JavaScript" type="text/javascript" src="rotation-script.js">


Results: http://www.fish-medonline.com/vibriosis2
(you can find the link to my banner just bellow <body>)

With this script in my html code, the only thing that show is my background.
__________________
Fish-Med Aquarium fish diseases diagnosis and medication
madcaptains is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-19-2008, 04:49 PM   #4 (permalink)
Contributing Member
 
htmlbasictutor's Avatar
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 96
iTrader: 0 / 0%
htmlbasictutor is liked by somebodyhtmlbasictutor is liked by somebodyhtmlbasictutor is liked by somebody
Ok, you have a few issues here which are not helping the situation:

a) Your basic HTML document structure isn't quite right. There's info here to get you started:

The HTML Document Structure

b) You have HTML and XHTML coding mixed together. Pick one style and keep to it. You define which standard you are coding to by declaring a DOCTYPE at the beginning of the file.

Differences Between XHTML And HTML

c) You managed to get 2 opening body tags in your file. You'll have to delete one.

These just a few things I noticed when viewing the source code for the page.

I would suggest starting over instead of trying to fix this:
a) Create an external stylesheet for the site. This will make it much easier to make changes site wide and will help clean up your code (= faster load time).
b) Create a template to be recycled throughout the site. When you want to create a new page, all you have to do is open the template, save it as the new file name then start adding the content for the page.
c) Test the template as you add features. This way it is easier to narrow down problems if you test each time you change something or add something.
d) Use the W3C validator to check your coding as you go. This again will make it easier to track down problems.

Once you've got the template done and validated, then try adding the banner script to a new page created from the template. This way you eliminate the basic page coding as the problem and can focus on troubleshooting the actual script.

I'd also suggest that you:
a) Have a folder for your images (images/imagename.ext would then be the path to the image)
b) Have a folder for your css files (css/filename.css would then be the path to the css file)
c) Have a folder for your scripts (scripts/filename.js would then be the path to the javascript file)

The above suggestions would help keep your webspace organized and also, you can set it up to keep the search engines from indexing these files.

Post again if you have cleaned up the coding and are still having problems with the script.
__________________
HTML Basic Tutor
Basic Computer Informaton - Computer Basics for website owners
htmlbasictutor is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-20-2008, 01:18 PM   #5 (permalink)
Contributing Member
 
Join Date: 01-18-08
Posts: 141
iTrader: 0 / 0%
Latest Blog:
None

madcaptains is liked by many
Hello
Thanks for the help. I must admit that I would have prefer any other comment than this but I'm learning so I'm not surprised.

I followed your advise and I have worked on a new template that I will use for all other pages. I did know about that W3C validator: great tool!

There is still a few errors in my template but it's much better now. I made a new tread for it here:
Template
__________________
Fish-Med Aquarium fish diseases diagnosis and medication
madcaptains is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a private message PM script, a Mass PM script jesifra Coding Forum 7 06-17-2004 08:31 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 07:03 PM.
© Copyright 2008 V7 Inc