JavaScript - Combining A Series Of Images Into One Larger Image?
I would like to take a series of images and paste them into a final larger image before displaying it to the user. From what I've read there are libraries that use HTMLcanvas that could achieve this but they don't work even with newer versions of IE.
I was wondering if there were functions similar to the PHP image editing functions that work with newer versions of IE? Cheers. Similar TutorialsSo i purchased a template from template monster for wordpress. http://www.templatemonster.com/demo/28861.html On the front page when you click on the thumbnail it changes the big image in the middle. I can't figure out how for the life of me to make that image also a link. My main problem is the code below. img_b1.jpg is the full size image and image_1.jpg is the thumbnail image. When you click on the thumbnail it changes the big image in the middle. When I add a clickable href=" to the main image it breaks the whole chain. --------------------------------------------------------------------- <a class="thumb" name="leaf" href="<?php bloginfo('stylesheet_directory'); ?>/images/img_b1.jpg" title="Agrocore"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/img_1.jpg" alt="Agrocore" /> </a> ------------------------------------------------------------------------ Full code below <div id="thumbs" class="navigation"> <ul class="thumbs noscript"> <li> <a class="thumb" name="leaf" href="<?php bloginfo('stylesheet_directory'); ?>/images/img_b1.jpg" title="Agrocore"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/img_1.jpg" alt="Agrocore" /> </a> <div class="caption"> <div class="indent1">living set </div> <div class="image-desc">Cool looking but extremely functional and comfortable. The colours black and white dominate throughout.<br /> Sleek and stylish interior to suit your taste.</div> <div class="indent"><h4>Contemporary</h4></div> </div> </li> <li> <a class="thumb" name="leaf" href="<?php bloginfo('stylesheet_directory'); ?>/images/img_b2.jpg" title="ProClinique"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/img_2.jpg" alt="ProClinique" /> </a> <div class="caption"> <div class="indent1">in grey</div> <div class="image-desc">Luxury living is being redefined and emphasis is being laid on comfortable living, without compromising on style, modest in the color codes</div> <div class="indent"><h4>Sitting room </h4></div> </div> </li> <li> <a class="thumb" name="leaf" href="<?php bloginfo('stylesheet_directory'); ?>/images/img_b3.jpg" title="Beauty"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/img_3.jpg" alt="Beauty" /> </a> <div class="caption"> <div class="indent1">living set </div> <div class="image-desc">Cool looking but extremely functional and comfortable. The colours black and white dominate throughout.<br /> Sleek and stylish interior to suit your taste.</div> <div class="indent"><h4>Contemporary</h4></div> </div> </li> <li> <a class="thumb" name="leaf" href="<?php bloginfo('stylesheet_directory'); ?>/images/img_b4.jpg" title="Market"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/img_4.jpg" alt="Market" /> </a> <div class="caption"> <div class="indent1">in grey </div> <div class="image-desc">Luxury living is being redefined and emphasis is being laid on comfortable living, without compromising on style, modest in the color codes</div> <div class="indent"><h4>Sitting room </h4></div> </div> </li> <li class="last"> <a class="thumb" name="leaf" href="<?php bloginfo('stylesheet_directory'); ?>/images/img_b5.jpg" title="Business"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/img_5.jpg" alt="Business" /> </a> <div class="caption"> <div class="indent1">living set </div> <div class="image-desc">Cool looking but extremely functional and comfortable. The colours black and white dominate throughout.<br /> Sleek and stylish interior to suit your taste.</div> <div class="indent"><h4>Contemporary</h4></div> </div> </li> </ul> </div> </div> </div> I am not sure if this is a javascript problem or an html problem. I have posted the code below. The main two areas that I am interested in are 1) the area where the photo is shown in the larger size, and 2) the thumbnails below the larger picture. Right now in the img tag of the first image I have specified a height and width of 450px. The result is that when one hovers the mouse over the thumbnails, all pictures are shown at that size, regardless if they are larger or smaller than 450 x 450 pixels. I am not concerned about the larger images because I will use a script to scale those that someone on this forum was so kind enough to provide me with. The IMPORTANT PART IS HE I am concerned with smaller images. If you remove the height and width portion from the image tag, when you hover the mouse over a picture that's smaller than the others, such as the last one, which is smaller than all the others that are at 450 x 450, the thumbnails "move up". I would like the thumbnails to remain where they are at / for the top area where the photos are displayed to always be the same size, such as 450 x 450 px., and for the smaller pictures to be shown in the center in that area. How can this be done? Note: The entire portion of the stylesheet is not present. Let me know if something important is missing. Code: <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>MouseOver-Images</title> <style type="text/css"> td#kdwhdMAINPHOTO { width: 616px; vertical-align: top; } table#kdwhdTHUMB { margin-top: 12px; } td#kdwhdTHUMBNAILS { background-image: url(http://www.sunandfuninoc.com/testingsites/gems4me/images/t_28.jpg); width: 616px; height: 114px; text-align: center; } td#kdwhdTHUMBNAILS img { border: 1px solid #696969; } td#kdwhdTABLE { width: 296px; vertical-align: top; } --> </style> </head> <body> <table style="width: 924px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td id="kdwhdMAINPHOTO" style="text-align: center; background-color: white;"> <!--Image 1--> <img src="http://site.gems4me.com/images/red2.jpg" alt="Item photo" name="swap" style="border: 0px solid rgb(105, 105, 105);" height="450" width="450"> <table id="kdwhdTHUMB" border="0" cellpadding="0" cellspacing="0" width="616"> <tbody> <tr> <td><img src="http://www.sunandfuninoc.com/testingsites/gems4me/images/t_26.jpg" alt="Click on the picture below to enlarge" height="25" width="616"></td> </tr> <tr> <td><img src="http://www.sunandfuninoc.com/testingsites/gems4me/images/t_27.jpg" alt="" height="10" width="616"></td> </tr> <tr> <td id="kdwhdTHUMBNAILS"><!--Image 1--><img src="http://site.gems4me.com/images/450by450.jpg" alt="Item photo" onmouseover="document.swap.src='http://site.gems4me.com/images/450by450.jpg';" height="80"> <!--Image 2--> <img src="http://site.gems4me.com/images/450by450-2.jpg" alt="Item photo" onmouseover="document.swap.src='http://site.gems4me.com/images/450by450-2.jpg';" height="80"> <!--Image 3--> <img src="http://site.gems4me.com/images/450by450.jpg" alt="Item photo" onmouseover="document.swap.src='http://site.gems4me.com/images/450by450.jpg';" height="80"> <!--Image 4--> <img src="http://site.gems4me.com/images/450by450-2.jpg" alt="Item photo" onmouseover="document.swap.src='http://site.gems4me.com/images/450by450-2.jpg';" height="80"> <!--Image 5--> <img src="http://site.gems4me.com/images/red2.jpg" alt="Item photo" onmouseover="document.swap.src='http://site.gems4me.com/images/red2.jpg';" height="80"></td> </tr> <tr> <td><img src="http://www.sunandfuninoc.com/testingsites/gems4me/images/t_29.jpg" alt="" height="10" width="616"></td> </tr> </tbody> </table> </td> <td><img src="http://www.sunandfuninoc.com/testingsites/gems4me/images/spacer.gif" alt="" height="1" width="12"></td> <td id="kdwhdTABLE"> <table border="0" cellpadding="5" cellspacing="0" width="296"> <tbody> <tr> <td colspan="2" id="kdwhdTABLETITLE">Stuff</td> </tr> <tr> <td class="kdwhdSPECR1C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR1C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff </td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> <tr> <td class="kdwhdSPECR2C1" nowrap="nowrap">Stuff</td> <td class="kdwhdSPECR2C2">Stuff</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </body> </html> Hello, First of all, I am not a coder. I can put together some fairly simple HTML, and can borrow chunks of JS code to suit certain basic purposes. Also, I am terribly sorry if my technical lingo is way off target. I have managed to accomplish two separate goals using javascript, but am having trouble combining their results. I have created an image link that randomly calls a URL from an array. I also have a separate roll-over image. What I am trying to do is have the link that accesses the array also be a roll-over image. I can't seem to accomplish this. http://matrix.senecac.on.ca/~mlinhar...low/page7.html This URL is what I am working on. The "b" symbol is the roll-over. The "right" arrow accesses an array at: http://matrix.senecac.on.ca/~mlinhar...w/randomize.js I have tried simply adding my roll-over code to randomize.js and adjusting the array accordingly, but that doesn't seem to work. I would like the "right" arrow to be a roll-over image as the "b" symbol is, but also access the "randomize" array as it currently does. My problem is that my understanding of JS isn't great enough to determine how separate pieces of code might be combined or function together. Anyways, I'm sorry if my technical knowledge and abilities are too underdeveloped for this forum. I would appreciate any and all advice anyone might have. Hello! I am trying to create a javascript code in which I prompt the user for a number (an integer from 0 to 100) to search for, then search a function with the number they entered and then display whether the number was found, and if found, a location where it can be found within the list. Can you please tell me what is wrong? <html> <head> </head> <body> <script language = "javascript"> var list = new Array(200); for (var i=0; i < 200; i++){ list=Math.round(Math.random()*100) + " "; document.write(list); } var value=prompt("What is the number you are searching for? ", " "); if (list[i]==value){ {alert("Number has been found in location" +i)}; } </script> </body> </html> Thank you Hello, My goal is to show a series of embedded youtube videos on one page but allowing the user to hide or show any youtube video by clicking a button associated with a specific youtube video on the page. I made a form that submits the youtube embed code to a mysql database and I created a php file to retrieve every embed code using a for loop. For each iteration of the for loop, a youtube video will pop up with a corresponding button which will allow the user to hide or show the youtube video. It works when there is only one entry in the mysql table but does not work when more youtube embed codes are uploaded. For example, when there are two youtube embed codes uploaded, two buttons are created, but when I click either of the two buttons, it will only show or hide the first youtube embed. None of the buttons will show the second youtube video. Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>hide/show iframe</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <style type="text/css"> <!-- #frDocViewer { width:70%; height:50%; display:none; } --> </style> <script type="text/javascript"> <!-- function HideFrame() { var fr = document.getElementById ("frDocViewer"); if(fr.style.display=="block") { fr.style.display="none"; } else { fr.style.display="block"; } } //--> </script> </head> <body> <?php mysql_connect ("","","") or die(mysql_error()); mysql_select_db ("") or die(mysql_error()); $lastid = mysql_query ("SELECT * FROM embed ORDER BY id DESC LIMIT 1"); $lastid = mysql_fetch_assoc($lastid); $lastid = $lastid['id']; for ($count=1; $count<= $lastid ; $count++) { $iframe = mysql_query ("SELECT * FROM embed WHERE id=$count "); $iframe = mysql_fetch_assoc($iframe); $iframe = $iframe['url']; echo " <img src='utube.gif' onclick='HideFrame()' /> <div id='frDocViewer'> $iframe </div> "; } ?> </body> </html> thanks in advance New to JavaScript so PLEASE bear with me. Trying hard to learn. My client specifically asked for a type of menu (scroll over a thumbnail and you see a large photo in the column next to it. And of course the thumbnail is clickable to new page. I am using this Jeremy Keith script: PHP Code: /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Jeremy Keith / Anonymous | http://www.alistapart.com/articles/imagegallery/ */ function showPic(whichpic) { if (document.getElementById) { document.getElementById('placeholder').src = whichpic.href; if (whichpic.title) { document.getElementById('desc').childNodes[0].nodeValue = whichpic.title; } else { document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue; } return false; } else { return true; } } var previousToggle=null; function toggleMe(a){ var e=document.getElementById(a); if(!e)return true; if(e.style.display=="none"){ e.style.display="block"; if(previousToggle)previousToggle.style.display="none"; previousToggle=e; } return true; } and it works fine, except that I can't figure out how to make it showpic on mouseover and still go to new URL (basic link to a page) onclick. Here's a link (one of 8)in the body: PHP Code: <a onmouseover="toggleMe('para1'); showPic(this); return false;" href="design.html" title="blah blah blah"> <img src="images/pix_smaller3.jpg" width="70" height="70"></a> It either links to new page with the href="design.html", or swaps in larger pic if I href to the img file, but I can't seem to get BOTH to work. I obviously want the <a> to be to a new page, not the larger img. Shouldn't showPic take care of this? Where is showPic getting its imgs from? I know that this can't be that complicated, but I have been up for 2 nights trying to figure this out. Any help appreciated... OK, so I've written a small timer at http://zeroerror.co.uk/public/cubetimer.php for general purpose timing. My first is that I cannot find a way to accurately time with the format 00:00.00, as the milliseconds seem to run too slowly. My second is that when the font size is set to a large size (for example, 200px or 300px) the timer runs even more slowly (just over half the speed it should). Is there any way to optimise the timer so it runs at a more accurate speed, or is this just a problem with my browser parsing the Javascript in time? Here's the code: Code: function timeIt() { init = 1; if (countMsL == 9) { countMsL = 0; if (countMsU == 9) { countMsU = 0; if (countSecs == 59) { countSecs = 0; countMins++; } else { countSecs++ } } else { countMsU++; } } else { countMsL++; } displayMsL = countMsL; displayMsU = countMsU; if (countSecs < 10) { displaySecs = '0' + countSecs; } else { displaySecs = countSecs; } if (countMins < 10) { displayMins = '0' + countMins; } else { displayMins = countMins; } readout = displayMins + ':' + displaySecs + '.' + displayMsU + displayMsL; timerDisplay.innerHTML = readout; timerActual = setTimeout('timeIt()', 10); } Thanks in advance! Hello, How I can detect URLs in a larger body of text using a regular expression in javascript. For ex.: I type this text in my form and I saved in database: My home page is http:// www. mypage .com.it And in my site I want to appear like he My home page is http://www.mypage.com.it Hello all, I've been banging my head against a wall for the past few days trying to figure out why when I add another script to my page the old one stops working. Finally I found the answer, but due to still being extremely new to javascript - and coding in general - I have not been able to successfully combine the two scripts that I have. I know it is very simple, so would someone mind either walking me thru it, or just giving me an end product to see where I was going wrong? I would really appreciate any input! The two scripts I have are Nivo slider Code: <script type="text/javascript"> $(window).load(function() { $('#slider').nivoSlider({ effect: 'random', // Specify sets like: 'fold,fade,sliceDown' }); }); </script> Nav menu plugin Code: <script type="text/javascript"> $(document).ready(function () { $('#nav li').hover( function () { //show its submenu $('ul', this).slideDown(500); }, function () { //hide its submenu $('ul', this).slideUp(300); } ); }); </script> I basically have 2 "if" statements. How would i go about combining them? Code: function validate_form(thisform) { with (thisform) { if (validate_required(name,"Name is required to continue")==false) {name.focus(); name.style.border='2px solid red'; return false;} } } function validateForm(){ if(document.start_flyer.prop_id.selectedIndex==0) { alert("Please select an Item."); document.start_flyer.prop_id.focus(); return false; } return true; } Code: <form action="/flyer/create" name="start_flyer" method="post" onsubmit="return validate_form(this)" > Thanks for any help! Using this: Code: clip.addEventListener( 'onMouseDown', my_mouse_down_handler ); function my_mouse_down_handler(client) { alert( "mouse button is down" ); } How can integrate this jQuery function so that the quick-alert div is displayed instead of alert( "mouse button is down" ); ? Code: $(document).ready(function() { $('#show-alert').click(function() { $('<div class="quick-alert">Alert Message</div>') .insertAfter($(this)) .fadeIn('slow') .animate({opacity: 1.0}, 3000) .fadeOut('slow', function() { $(this).remove(); }); }); }); Dear all, I have been trying to replicate a cool javascript effect that appears here. See the funky images fading in when hovering with mouse? I want that ;-) By using Firebug I think I have narrowed down the code needed to: Code: <div id="main" class="clearafter"> <div class="inner clearafter"> <div class="columns clearafter"> <div class="project hovers column" style="border-color: rgb(255, 255, 255); cursor: pointer; background-color: rgb(255, 255, 255);"> <a href="http://mountfolly.co.uk" class="image"> <img width="274" height="137" alt="project" src="/images/41_project.jpg" class="screenshot"> <img width="274" height="137" alt="project" src="/images/7_project.jpg" class="text" style="opacity: 0; display: inline;"> </a> <h3>Text and titles etc...</h3> <p>etc etc etc...</p> </div> <div style="border-color: rgb(255, 255, 255); cursor: pointer; background-color: rgb(255, 255, 255);" class="project hovers column"></div> </div> </div> </div> <script type="text/javascript" src="/javascript/global.js"></script> and this (which I put into a javascript file called global.js): Code: /* project listings */ // to deal with IEs opacity idiocy $(function() { $('.project.hovers .text').css({opacity: 0}).show(); $('.project.hovers').css({cursor: 'pointer'}).click(function() { location.href = $('h3 > a', this).attr('href'); }); }); $('.project.hovers').hover( function () { $('.text',this).stop().fadeTo('100',1); $(this).stop().animate({borderTopColor: '#E9E9E9', borderRightColor: '#E9E9E9', borderBottomColor: '#E9E9E9', borderLeftColor: '#E9E9E9', backgroundColor: '#EEE' }, 100) }, function () { $('.text',this).stop().fadeTo(1000,0); $(this).stop().animate({borderTopColor: '#FFF', borderRightColor: '#FFF', borderBottomColor: '#FFF', borderLeftColor: '#FFF', backgroundColor: '#FFF' }, 1000) } ); But when I re-create the files (index.html, global.js, and replacement images) all I get is this. No hover effect... Any ideas what is missing? Would appreciate some help. Thanks, Wysiwyger PS: If you fancy a laugh, check these out Alrighty so here's what I have. Live example: http://www.thestrikeforum.com/ex/ It's a image slideshow that dynamically gets all the images (via php) in the current directory and puts them into the slideshow array. The array then randomly displays the images in the slideshow (via javascript). There are 5 images in the folder rotateimage which also has the php script getimages.php in it. Currently only the first image fades in however I want all the images to fade in as the first one does. Codes: Php script that gets all the images for the array: PHP Code: <? //PHP SCRIPT: getimages.php Header("content-type: application/x-javascript"); //This function gets the file names of all images in the current directory //and ouputs them as a JavaScript array function returnimages($dirname=".") { $pattern="(\.jpg$)|(\.png$)|(\.jpeg$)|(\.gif$)"; //valid image extensions $files = array(); $curimage=0; if($handle = opendir($dirname)) { while(false !== ($file = readdir($handle))){ if(eregi($pattern, $file)){ //if this file is a valid image //Output it as a JavaScript array element echo 'galleryarray['.$curimage.']="'.$file .'";'; $curimage++; } } closedir($handle); } return($files); } echo 'var galleryarray=new Array();'; //Define array in JavaScript returnimages() //Output the array elements containing the image file names ?> Main html page with the javascript: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="rotateimage/getimages.php"></script> <script type="text/javascript"> var curimg=0 var max=galleryarray.length var random=Math.floor(Math.random()*max) function rotateimages(){ document.getElementById("slideshow").setAttribute("src", "rotateimage/"+galleryarray[random]) //curimg=(curimg<galleryarray.length-1)? curimg+1 : 0 random=Math.floor(Math.random()*max) } function initImage() { imageId = 'slideshow'; image = document.getElementById(imageId); setOpacity(image, 0); image.style.visibility = 'visible'; fadeIn(imageId,0); } function setOpacity(obj, opacity) { opacity = (opacity == 100)?99.999:opacity; // IE/Win obj.style.filter = "alpha(opacity:"+opacity+")"; // Safari<1.2, Konqueror obj.style.KHTMLOpacity = opacity/100; // Older Mozilla and Firefox obj.style.MozOpacity = opacity/100; // Safari 1.2, newer Firefox and Mozilla, CSS3 obj.style.opacity = opacity/100; } function fadeIn(objId,opacity) { if (document.getElementById) { obj = document.getElementById(objId); if (opacity <= 100) { setOpacity(obj, opacity); opacity += 10; window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100); } } } window.onload=function(){ setInterval("rotateimages()", 2500) initImage() } </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Test</title> </head> <body> <img src="rotateimage/pic1.jpg" name="slideshow" width="350" height="350" id="slideshow"/> </body> </html> If anyone could assist me in doing so or can help me find a better way to do the fading images for the slideshow feel free to share.. here's the main page code WITHOUT the fading code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="rotateimage/getimages.php"></script> <script type="text/javascript"> var curimg=0 var max=galleryarray.length var random=Math.floor(Math.random()*max) function rotateimages(){ document.getElementById("slideshow").setAttribute("src", "rotateimage/"+galleryarray[random]) //curimg=(curimg<galleryarray.length-1)? curimg+1 : 0 random=Math.floor(Math.random()*max) } window.onload=function(){ setInterval("rotateimages()", 2500) initImage() } </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Test</title> </head> <body> <img src="rotateimage/pic1.jpg" name="slideshow" width="350" height="350" id="slideshow"/> </body> </html> Hello. I've recently implemented this really cool jQuery preloader called queryLoader. When a visitor comes to my site they are fed all the important images for the entire site (it's a very small site). During that time queryLoader shows a percentage loading animation, and once all the images are loaded it wipes the screen & displays the website. I've placed another custom animation in the "page loading" div, and i want to make sure it loads first so that it is displayed while the rest of the images get downloaded. I've tried pre-loading with javascript as the very first script in my header, before jQuery or queryLoader get loaded, like this: Code: <script type="text/javascript"> pic1= new Image(250,300); pic1.src="images/page_loading.gif"; </script> <script type="text/javascript" src="scripts/jQuery.js"></script> <script type="text/javascript" src="scripts/queryLoader.js"></script> However, this doesn't seem to be that effective. When i clear browser cache and reload the page, the page_loading.gif sometimes doesn't appear until the site is almost completely loaded. Is there a more effective way to assure the page_loading.gif gets loaded before any other images? My site is jugtones.com if that helps in any way. Thanks for your time, -Scott Hi, how would i edit the code below so instead of today is day 16 of the month to an actual date eg Today is 10/11/2011 (dd/mm/yyyy or mm/dd/yyyy compatible). I need the code to execute on a specific date. javascript or php versions very welcome THANKS Code: <script type="text/javascript"> var Date = new Date(); var Today = Date.getDate(); if(Today == 16) { document.write('<img src="http://www.imagelocation_here" alt="Image title " width="117" height="100" />'); } else { document.write('<img src="http://www.imagelocation_here" alt="image title " width="117" height="100" />'); } </script> I want these images to center align when they have focus (clicked, enlarge), can't figure out how to move them over from the right. js file attached. Some .css may come into play here also, but I think this animation issue is all .js. http://backstageweb.net/MovingBoxes/ Thanks, John Hi could someone please help?... I am a total beginner to javascript... but does anyone know of a code, including links to an image folder, for displaying 6 fullscreen images in random order without repeat for a given user? I've seen specific examples using shuffle on the site, but could anyone write a general code for any given images? Many thanks in advance hi, on my site: http://helix3d.previewsite.co.uk/marketing.html the images slide onto the next when the numbers are clicked, I would like to have this functionality on the actual image... need a bit of help here?! Code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Helix</title> <link type="text/css" rel="stylesheet" href="css/reset.css"> <link rel="stylesheet" type="text/css" href="css/style.css" title="default" /><!--[if lte IE 7]> <style type="text/css"> html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/ </style> <![endif]--> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery.cycle.all.min.js"></script> <script type="text/javascript"> $(function() { $('#slideshow1').after('<div id="nav1" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav1', befo onBefore }); $('#slideshow2').after('<div id="nav2" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav2', befo onBefore }); $('#slideshow3').after('<div id="nav3" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav3', befo onBefore }); $('#slideshow4').after('<div id="nav4" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav4', befo onBefore }); $('#slideshow5').after('<div id="nav5" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav5', befo onBefore }); function onBefore() { $('#title').html(this.alt); } }); </script> </head> <body> <div id="top"> <div id="topwrapper"> <a href="index.html"><div id="logo"> </div></a> <ul id="rightnav"> <li><a href="index.html" title="Home">Home</a></li> <li><a href="news.html" title="News">News</a></li> <li><a href="services.html" title="Services">Services</a></li> <li><a href="archive.html" title="Archives">Archive</a></li> <li><a href="finishes.html" title="Finishes">Finishes</a></li> <li><a href="showreel.html" title="Showreel">Showreel</a></li> <li><a href="contact.html" title="Contact">Contact</a></li> </ul> <nav> <ul> <li><a href="events.html" title="HELIX EVENTS">HELIX EVENTS</a></li> <li><a href="marketing.html" title="HELIX EXPERIENTIAL MARKETING" class="menuselected">HELIX EXPERIENTIAL MARKETING</a></li> <li><a href="film.html" title="HELIX FILM & TV SET CONSTRUCTION">HELIX FILM & TV SET CONSTRUCTION</a></li> <li><a href="exhibitions.html" title="HELIX EXHIBITIONS">HELIX EXHIBITIONS</a></li> <li><a href="interiors.html" title="HELIX COMMERCIAL INTERIORS">HELIX COMMERCIAL INTERIORS</a></li> </ul> </nav> <div class="line"> </div> </div> </div> <div id="content"> <section id="slider"> <div id="viewport"> <div id="container"> <div id="section-1" class="section"> <img src="images/hero_experiential.jpg"> </div> </div> </div> </section> <div class="line"> </div> <div id="left"> <h1>HELIX MARKETING</h1> <p>We help brands and agencies create experiences that excite, surprise and delight. Our attention to detail and fast-paced production bring your experiential marketing to life and ensure memorable, positive brand connections.</p> </div> <div id="right"> <img src="images/quote-marketing.gif" alt="Marketing quote" /> <ul> <li class="youtube"><a href="#"><img src="images/yt.png" alt="youtube" /></a></li> <li class="twitter"><a href="#"><img src="images/twit.png" alt="Twitter" /></a></li> <li class="facebook"><a href="#"><img src="images/fb.png" alt="Facebook" /></a></li> </ul> </div> <div class="clear"> </div> <div class="dashedlinetop"> </div> <div id="box1"> <h1>01</h1> <h2>V Hand</h2> <p>We were contracted by Speed Communications PR to turn ideas from the creative team at The Game Changer into reality. The concept was a giant hand over 30 ft tall making the V for Virgin sign, designed to look as if it had burst up through the ground.</p> <ul> <li><strong>Key people:</strong></li> <li>Client: Virgin Business Media.<br> Agency : Speed Communications.<br> Creative : The Game Changer<br> Location : Canary Wharf</li> </ul> <div id="casestudy1"><a href="case-study-virgin.html">CASE STUDY</a></div> <div id="slideshow1" class="pics"> <img src="images/marketing/virgin1.jpg" alt="1"/> <img src="images/marketing/virgin2.jpg" alt="2"/> <img src="images/marketing/virgin3.jpg" alt="3"/> <img src="images/marketing/virgin4.jpg" alt="4"/> <img src="images/marketing/virgin5.jpg" alt="5"/> </div> </div> <div class="dashedlinebottom"> </div> <div class="dashedlinetop"> </div> <div id="box2"> <h1>02</h1> <h2>Cat Walk</h2> <p>We were commissioned by Mischief PR to design, manufacture and project manage the installation of the world's first car mounted fashion catwalk. We scoured London for priceless shoot locations normally off limits and organised logistics to enable a super fast, film shoot set up.</p> <ul> <li><strong>Key people:</strong></li> <li>Client : Vauxhall.<br> Agency : Mischief PR.<br> Creative : Dan Glover.<br> Location : St Paul's Cathedral</li> </ul> <div id="slideshow2" class="pics"> <img src="images/marketing/carwalk1.jpg" alt="1"/> <img src="images/marketing/carwalk2.jpg" alt="2"/> <img src="images/marketing/carwalk3.jpg" alt="3"/> <img src="images/marketing/carwalk4.jpg" alt="4"/> <img src="images/marketing/carwalk5.jpg" alt="5"/> </div> </div> <div class="dashedlinebottom"> </div> <div class="dashedlinetop"> </div> <div id="box3"> <h1>03</h1> <h2>Tower of Terror</h2> <p>As the centre piece of the European launch of the Disney's new Tower Of Terror ride in Paris, Cow PR commissioned us to design and build a full seized replica model of a lift car from the ride. The twist was that the lift had to look as if it had crash landed!</p> <ul> <li><strong>Key people:</strong></li> <li>Client : Disney<br> Agency : Cow PR<br> Creative : Claire Myddleton<br> Location : Leicester Square</li> </ul> <div id="slideshow3" class="pics"> <img src="images/marketing/tot1.jpg" alt="1"/> <img src="images/marketing/tot2.jpg" alt="2"/> <img src="images/marketing/tot3.jpg" alt="3"/> <img src="images/marketing/tot4.jpg" alt="4"/> <img src="images/marketing/tot5.jpg" alt="5"/> </div> </div> <div class="dashedlinebottom"> </div> <div class="dashedlinetop"> </div> <div id="box4"> <h1>04</h1> <h2>Ice Age 3</h2> <p>The set for this experiential brief; for 20th Century Century Fox's Ice 3 movie launch, was designed in house by Brian Dowling. The experience included an chilled Ice Cave and a jungle equipped with rock faces, real plants, a bridge, a lake and heated humidified air. </p> <ul> <li><strong>Key people:</strong></li> <li>Client.: 20th Century Fox.<br> Agency : Designwerk<br> Creative : Scott and Ed<br> Location : CWOA</li> </ul> <div id="slideshow4" class="pics"> <img src="images/marketing/ice1.jpg" alt="1"/> <img src="images/marketing/ice2.jpg" alt="2"/> <img src="images/marketing/ice3.jpg" alt="3"/> <img src="images/marketing/ice4.jpg" alt="4"/> <img src="images/marketing/ice5.jpg" alt="5"/> </div> </div> <div class="dashedlinebottom"> </div> <div class="dashedlinetop"> </div> <div id="box5"> <h1>05</h1> <h2>Hanging gardens of paddington</h2> <p>When Mischief PR wanted to create "The Hanging Gardens of Paddington" for the launch of boutique Hotel Indigo there was only one company on the call sheet. We devised a plan to cantilever the giant basket 40ft above the street, the story went global, the launch was a huge success.</p> <ul> <li><strong>Key people:</strong></li> <li>Client : International Hotel Group<br> Agency : Mischief PR<br> Creative : Dan Glover<br> Location : Paddington</li> </ul> <div id="slideshow5" class="pics"> <img src="images/marketing/basket1.jpg" alt="1"/> <img src="images/marketing/basket2.jpg" alt="2"/> <img src="images/marketing/basket3.jpg" alt="3"/> <img src="images/marketing/basket4.jpg" alt="4"/> <img src="images/marketing/basket5.jpg" alt="5"/> </div> </div> <div class="dashedlinebottom"> </div> <footer> <ul> <li><a href="index.html" title="Home">Home</a></li> <li><a href="events.html" title="Events Design">Events Design</a></li> <li><a href="marketing.html" title="Marketing Design">Marketing Design</a></li> <li><a href="film.html" title="Film & Set Design">Film & Set Design</a></li> <li><a href="exhibitions.html" title="Exhibition Design">Exhibition Design</a></li> <li><a href="interiors.html" title="Commercial Interior Design">Commercial Interior Design</a></li> <li><a href="#" title="Sitemap">Sitemap</a></li> <li><a href="contact.html" title="Contact Helix Ltd">Contact Helix Ltd</a></li> <li><a href="news.html" title="Latest Helix News">Latest Helix News</a></li> <li><a href="careers.html" title="Careers">Careers</a></li> </ul> <!--<div class="copyright">©2011 Helix </div> --> </footer> </div> <!-- end content --> </body> </html> |