473,480 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Displaying various pictures

1 New Member
Here's the site I'm talking about. www.gosci.com when you go in, you see a picture that changes every 6 seconds. I cannot get more than two pictures to rotate. I'm COMPLETELY new to HTML so I have absolutely no idea how to fix it. If anybody could provide me with the fix code to fix this, I would be greatly appreciate it. We use wordpress so the company who manages our website and hosts it, wants to charge us hundreds for something I know is simple.

THank you, here's the code.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  2. <head profile="http://gmpg.org/xfn/11">
  3.  <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  4.  <title><?php wp_title('|', true, 'right'); ?> <?php bloginfo('name'); ?> <?php if ( !wp_title('', true, 'left') ); { ?> | <?php bloginfo('description'); ?> <?php } ?></title>
  5.  <meta name="generator" content="WordPress" /> <!-- leave this for stats (or remove for potential security reasons) -->
  6.  <meta name="author" content="Fluid Studio" />
  7.  <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
  8.  <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
  9.  <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  10.  <?php wp_head(); ?>
  11.  
  12.         <script src="http://www.google.com/jsapi"></script>
  13.         <script>
  14.           google.load("jquery", "1.2.6");
  15.           google.setOnLoadCallback(function() {
  16.                 var original_image = 'url(http://gosci.com/wp-content/uploads/...age.png)';
  17.                 var second_image = 'url(http://www.fluid-studio.net/sci/wp-c...ge2.jpg)';
  18.  
  19.  
  20. http://www.fluid-studio.net/sci/wp-c.../mainimage.jpg
  21.     var timer = setTimeout(nextImage, 6000); // Trigger in 6 seconds
  22.     $('#click').click(nextImage);
  23.  
  24.     function nextImage() {
  25.           clearTimeout(timer);
  26.           var header = $('#homecontent');
  27.           var image = header.css('background-image').replace(/"/g, '');
  28.           if (image == original_image) {
  29.                 header.css('background-image', second_image);
  30.           }
  31.           else {
  32.                 header.css('background-image', original_image);
  33.           }
  34.           timer = setTimeout(nextImage, 6000); // Trigger again in 6 seconds
  35.           return false;
  36.     }
  37.  
  38.           });
  39.         </script>
  40.  
  41. </head>
  42. <body>
  43.  
  44. <div id="container">
  45. <div id="lightcontainer">
  46.  <div id="header">
  47.   <div id="topNav">
  48.    <?php wp_nav_menu( array( 'theme_location' => 'top-menu' ) ); ?><a href="http://sciintranet.com"><img id="loginbutton" src="<?php bloginfo(template_url); ?>/images/login.png" /></a>
  49.   </div><!-- end #topNav -->
  50.  </div><!-- end #header -->
Dec 29 '11 #1
1 1547
Sivaranjani
16 New Member
I Give Example for that,I think it's help you
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <style type="text/css">
  4.     body { background:url(../images/header1.jpg) no-repeat;}
  5. </style>
  6.   <script>
  7.         var currentBackground = 0;
  8.         var backgrounds = [];
  9.         backgrounds[0] = 'http://elegantthemes.com/preview/InStyle/wp-content/uploads/2008/11/s-1.jpg';
  10.         backgrounds[1] = 'http://elegantthemes.com/preview/InStyle/wp-content/uploads/2008/11/s-5.jpg';
  11.         backgrounds[2] = 'http://elegantthemes.com/preview/InStyle/wp-content/uploads/2008/11/s-3.jpg';
  12.  
  13.         function changeBackground() {
  14.             currentBackground++;
  15.             if(currentBackground > 2) currentBackground = 0;
  16.  
  17.             $('body').fadeOut(100,function() {
  18.                 $('body').css({
  19.                     'background-image' : "url('" + backgrounds[currentBackground] + "')"
  20.                 });
  21.                 $('body').fadeIn(100);
  22.             });
  23.  
  24.  
  25.             setTimeout(changeBackground, 2000);
  26.         }
  27.  
  28.         $(document).ready(function() {
  29.             setTimeout(changeBackground, 2000);        
  30.         });
  31.  
  32.   </script>
  33. <body>
  34.  
  35. </body>
  36. </html>
Dec 30 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
6865
by: Jon Yeager | last post by:
I need to display a bunch of pictures that are all of various dimensions into a fixed dimension space, like MSN Messenger does with its user photos in the chat windows. Forcing image dimensions...
6
1780
by: Nutshell | last post by:
Hi, I created a web page which contains table. I use table cells to display a picture using <img src>. The problem is that some pictures are not being fully displayed, only a quarter of the left...
0
1189
by: dave | last post by:
Please can anyone advise if it is possible to display the file contents of a hyperlinked file in a report. I have a field in a table for each record which stores a hyperlink address to a picture...
12
20844
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
2
2478
by: Lauren Quantrell | last post by:
Is there any speed difference or advantage to loading different types of images from a folder residing on a client machine into an Access Image Control on a form? For example, if I have a folder...
2
1507
by: tperri | last post by:
I'm familiar with the Data Controls, however what I have is a website where users can upload multiple pictures. I want to display these pictures in a table, that has 3 columns in each row, and...
2
1219
by: campbellbrian2001 | last post by:
Thanks All, I have a vb.net desktop application form from which a user chooses a product code from a database (Access97) using a comboBox. Each record of the database has a field giving the...
13
2168
by: gooze | last post by:
Hello I am working on an applicaion that shows several pictures on a webpage. These pictures are saved in a MySQL DB as BLOB. I noticed, that the web server suffers in its performance by...
1
2000
by: greatjuli | last post by:
Please can anyone help with a javascript code to display bigger pictures me.jpg, me2.jpg.... on the same page by clicking on their thumnails on the same page. I have done what i believe is the...
2
2965
by: Tyler | last post by:
I need to have a form that displays a group of 20 pictures in 4 rows of 5 pictures. The pictures are of people. Each Subject record has a picture field. I have a query written that selets the...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.