JavaScript - Lightbox Effects In Form ?? How?
please i want to know how to make lightbox effects with the idea of switching between pages using the lightbox
please follow this link: http://particletree.com/examples/lightbox/ while pressing on "submit an inquiry " it will show a form... all that i need is to make the same idea but using registration form first page: contains user data ---> on pressing next .. i want to be on same lightbox box effect but using next page that contains his work data... and on third page he will have a message that his registration is done successfully.. so how to switch between pages in lightbox effects??? Similar TutorialsHi. I've used CoffeeCup Form Builder to create a nice form for my site and would like to have it open in a lightbox/thickbox, or open in a layer? (If it matters, do have an iFrame on the page, FYI). I've got LightBox Gone Wild to work nicely, except it won't load the form. If I open the HTML page (directly) the form works fine. This is the code on the HTML page: Code: <script type="text/javascript" src="swfobject.js"></script> <div id="flashcontent"></div> <script type="text/javascript"> var so = new SWFObject("form.swf", "form.xml", "653", "527", "7,0,0,0", "#ffffff"); so.addParam("classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"); so.addParam("quality", "high"); so.addParam("scale", "noscale");so.addParam("salign", "lt"); so.addParam("wmode", "transparent"); so.addParam("FlashVars", "xmlfile=form.xml&w=653&h=527"); so.write("flashcontent");</script> Thanks in advance... ---- Okay. I used CoffeCup Form Builder for my form and wanted it to open like the examples at their website: http://www.coffeecup.com/form-builder. Having it on the page or in a pop-up was okay, but I like the 'LightBox' effect. Anyway, someone did help me and I wanted to share the code in case others can use it. It uses an iframe that opens in a new layer. You can probably improve on it and change the size, etc., but it's a start. One thing I'm planing is to use the CSS and JS in an external file rather than in the <head>: Code: <style type="text/css"> div#OVERLAY { position: absolute; top: 0px; left: 0px; width: 100%; height: 1200px; background-color: black; -moz-opacity: 0.70; opacity: 0.60; filter: alpha(opacity=70); z-index: 10; display: none; } div#FORMHOLDER { position: absolute; top: 0px; left: 0px; width: 100%; background-color: transparent; text-align: center; z-index: 15; display: none; margin: 0px; padding: 0px; right: 0px; bottom: 0px; } div#FORMHOLDER span.closer { padding-left: 100px; padding-right: 100px; color: #E5BC9D; background-color: black; } div#FORMHOLDER iframe { width: 653px; height: 527px; margin: 0px; padding: 0px; background-color: #000; } </style> <script type="text/javascript"> function overshow() { var hold = document.getElementById("FORMHOLDER"); hold.style.display = "block"; var stop = parseInt(document.body.scrollTop); if ( isNaN(stop) ) stop = 0; if ( stop == 0 ) { var stop = parseInt(document.documentElement.scrollTop); if ( isNaN(stop) ) stop = 0; } hold.style.top = stop + 50 + "px"; document.getElementById("OVERLAY").style.display = "block"; } function overoff() { document.getElementById("OVERLAY").style.display = "none"; document.getElementById("FORMHOLDER").style.display = "none"; } </script> Next, use the <div> and an <iframe> tag in the fist line after the <body> tag: Code: <div id="OVERLAY"></div> <div id="FORMHOLDER"> <span class="closer" onclick="overoff()">Click here to close</span><br /> <iframe src="form.html" scrolling="no" frameborder="0"></iframe> <br /><span class="closer" onclick="overoff()">Click here to close</span> </div> Finally, when you link to the form page CoffeeCup creates, the code is: Code: <a href="#" onclick="overshow(); return false;">link</a> I hope this is useful to some of you. I looked long and hard and could find nothing so... Cheers! Hei! I am trying to use a contact form which appears in a lightbox from : http://www.xul.fr/javascript/lightbox-form.html It is working great but, of course I have a problem. My page is very big and when I want my page to scroll to the point where the form is. I am using window.scrollTo function. the problem is that before scrolling to that point , it automatically scrolls to the coordinates (0,0) and only after that. I am posting my javascript and css code. Thanks for your help ! JAVASCRIPT Code: function gradient(id, level) { var box = document.getElementById(id); box.style.opacity = level; box.style.MozOpacity = level; box.style.KhtmlOpacity = level; box.style.filter = "alpha(opacity=" + level * 100 + ")"; box.style.display="block"; if(id=='boxa') { window.scrollTo(2500,0); } else { window.scrollTo(100,100); } return; } function fadein(id) { var level = 0; while(level <= 1) { setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10); level += 0.01; } } function openbox(formtitle, fadin,boxtitle,boxN) { var box = document.getElementById(boxN); document.getElementById('filter').style.display='block'; //var btitle = document.getElementById(boxtitle); // btitle.innerHTML = formtitle; // var btitle = document.getElementById(boxtitle); // btitle.innerHTML = formtitle; if(fadin) { gradient(boxN, 0); fadein(boxN); } else { box.style.display='block'; } } // Close the lightbox function closebox() { document.getElementById('box').style.display='none'; document.getElementById('filter').style.display='none'; document.getElementById('boxa').style.display='none'; document.getElementById('filter').style.display='none'; } CSS Code: #filter { display: none; position: absolute; top: -500px; left: -500px; width: 7200px; height: 3300px; background-color: #000; z-index:10; opacity:0.5; filter: alpha(opacity=50); } #box { display: none; position: absolute; top: 20%; left: 20%; width: 400px; height: 200px; padding: 48px; margin:0; border: 1px solid black; background-color: white; z-index:101; overflow: none; } #boxtitle { position:absolute; float:center; top:0; left:0; width:496px; height:24px; padding:0; padding-top:4px; left-padding:8px; margin:0; border-bottom:4px solid #3CF; background-color: #09c; color:white; text-align:center; } #boxa { display: none; position: absolute; top: 350px; left: 2950px; width: 700px; height: 200px; padding: 48px; z-index:101; overflow: visible; /* background-image: url(../imagini/tutorial.png); */ background-repeat:no-repeat; } Hey there guys, I am building a site of which I would like the contact information and form to pop up from the button on the menu/header frame into the main frame as a lightbox ...no matter which page is loaded in the main frame. I was trying to experiment with the archived "jQuery Contact form for your website" tutorial from web devlopment blog . com. (I didnt want to post a link to it as I dont want to possibly flag the moderators) Any Ideas? Go to http://whitetailfantasies.com to see the layout and what I am going for. Thanks Hi Guys, I'm developing a registration form to be viewed on an iPad, this will be put on display in store for customers to complete. The idea is that once the form has been completed a success message will show in lightbox form (currently using query reveal) and then after a few seconds disappear and the form will be refreshed. Any idea on how to do this? I am using the below code but the obvious error is with the action. "<form name="signup" class="form" id="signup" action="data-reveal-id="myModal"" method="post" onsubmit="return validate_signup(this)">" All help very much appreciated. plz i want to know how to make the effects that exists on this link in the upper part : http://www.masrawy.com/new/ 1-) changing color when pressing on the color 2-) changing font (+) to increase it (-) to decrease it (N) to set it to the normal style 3-) decrease and increase the width of the page (from كبر حجم الصفحة or صغر حجم الصفحة ) can anyone help me in doing this task????? hi all, i am using this javascript code which i found on a random website to create a tooltip style popup. in my head is: Code: <script type="text/javascript"> function showmenu(elmnt) { document.getElementById(elmnt).style.visibility="visible" } function hidemenu(elmnt) { document.getElementById(elmnt).style.visibility="hidden" } </script> <style type="text/javascript"> #twittericon { position: fixed; bottom:148px; left: 6%; width: 33px; height:29px; z-index: 49; } #tweet{ position:fixed; bottom:178px; left: 3%; max-width:310px; color:#333333; font-family:Arial Narrow,Arial,Sans-serif; font-size:12px;; z-index:6000; visibility: hidden; } </style> in my body is: Code: <div id="twittericon" onMouseOver="showmenu('tweet')" onMouseOut="hidemenu('tweet')"> <a href="http://twitter.com/bubblejam" target="_blank"> <img src="http://nang-nang.net/tumblr/blog/twit-bird.gif" width="33" height="29" /></a> </div> <div id="tweet"> (latest tweet generating code) </div> this creates a little bird, which displays latest tweet when rolled-over. you can see a working example of this he http://nang-nang.net/tumblr/blog/try.html my question a (1) can i add something to the javascript to create a delay when onMouseOut so that the tweet doesn't disappear immediately? also (2) could i also add something to the javascript to create a visual effect when onMouseOver or onMouseOut occurs? like a fade in effect? or slide up effect? i've been playing around with scriptaculous effects but i'm not sure how to combine that script with my script above. an answer to (1) at least would be very much appreciated! Hi guys I am using a customized version of this free css dropdown menu script. It is just pure css, no jquery. I wanted to add some delay to the open and close on mouseover, here is what I added: Code: <script type="text/javascript"> $(document).ready(function () { $('ul.dropdown li').hover( function () { //show its submenu $('ul', this).slideDown(150); }, function () { //hide its submenu $('ul', this).slideUp(250); } ); }); </script> When I first mouse over, this does nothing, but if I mouse over the same drop down li a second time, it works. Check it out here. Any ideas on how I can fix this? Hi Coders, I have been trying to achieve a multiple mouseover effect on some of my pictures within my web page. The first effect changes the picture within a table - works fine The second effect should change the text within another table. - does not work. I am receiving the error message: 'document.text' is null or not an object. Here is the code which lies on my image: Code: <td style="height: 101px; width: 20%" valign="top"> <img onMouseover="changeimage(myimages[1],this.href); newchange();" alt="loading" height="86" src="images/marsrover_sml.jpg" width="104" /></td> Here is the newchange() script: Code: <script language="JavaScript1.1"> function newchange() { document.text.innerHTML='<b>hello world</b>' } </script> And I am sure that the table in which the text should appear has its Id and Name defined as "text" Here is it: Code: <td class="style5" Id="text" name="text" style="height: 29px; width: 525px" valign="top"> <strong class="style10">Endavour has launched</strong></td> But could not make it work error free. Thanks for any comments. I need help with the script for multiple mouseOver Effects for my Menu Bar. The script I have is: <script type="text/javascript"> function mouseOver() { document.getElementById("b1").src ="home1.jpg"; } function mouseOut() { document.getElementById("b1").src ="home.jpg"; } </script> <A HREF="Index.html" rel="nofollow" target="_blank"><img src="home.jpg" id="b1" width="167" height="60" onmouseover="mouseOver()" onmouseout="mouseOut()"/></A> However, that only does one mouseover effect. Can someone help me with this? The 2 sites below are animated scrolling pages which I know how to do, What I am looking for is how do they make the effect like the pages are sliding independent "like an overlaid effect" of each other If anyone can show me how they get that effect or if there are any demo or examples to help me figure it out http://www.sketchtravel.com/ http://www.foofighters.com/us/discography thanks for your help -rob this js file disables the toggle from all my effects. any idea how to fix this problem without deleting this? Code: // SpryDOMEffects.js - version 0.6 - Spry Pre-Release 1.7 // // Copyright (c) 2007. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. (function() { // BeginSpryComponent if (typeof Spry == "undefined" || !Spry.Utils || !Spry.$$) { alert("SpryDOMEffects.js requires SpryDOMUtils.js"); return; } if (!Spry.Effect) Spry.Effect = {}; Spry.Effect.Animator = function(opts) { Spry.Effect.Animator.Notifier.call(this); this.animatorID = Spry.Effect.Animator.nextID++; this.dropFrames = true; this.fps = 60; // frames per-second this.duration = 500; // msecs this.timer = 0; this.startTime = 0; // Used only when dropFrames is true. this.currentFrame = 0; this.easeFunc = Spry.Effect.Animator.defaultEaseFunc; this.stopped = false; Spry.Effect.Animator.copyProps(this, opts); this.interval = 1000 / this.fps; this.numFrames = (this.duration / 1000) * this.fps; if (this.onComplete) { var self = this; this.addObserver({ onAnimationComplete: function(){ self.onComplete(); } }); } }; Spry.Effect.Animator.nextID = 1; Spry.Effect.Animator.copyProps = function(dst, src) { if (src) { for (prop in src) dst[prop] = src[prop]; } return dst; }; Spry.Effect.Animator.getElement = function(element) { if (arguments.length > 1) { for (var i = 0, elements = [], length = arguments.length; i < length; i++) elements.push(Spry.Effect.Animator.getElement(arguments[i])); return elements; } if (typeof element == 'string') element = document.getElementById(element); return element; }; Spry.Effect.Animator.defaultEaseFunc = function(time, begin, finish, duration) { time /= duration; return begin + ((2 - time) * time * finish); }; Spry.Effect.Animator.Notifier = function() { this.observers = []; this.suppressNotifications = 0; }; Spry.Effect.Animator.Notifier.prototype.addObserver = function(observer) { if (!observer) return; // Make sure the observer isn't already on the list. var len = this.observers.length; for (var i = 0; i < len; i++) { if (this.observers[i] == observer) return; } this.observers[len] = observer; }; Spry.Effect.Animator.Notifier.prototype.removeObserver = function(observer) { if (!observer) return; for (var i = 0; i < this.observers.length; i++) { if (this.observers[i] == observer) { this.observers.splice(i, 1); break; } } }; Spry.Effect.Animator.Notifier.prototype.notifyObservers = function(methodName, data) { if (!methodName) return; if (!this.suppressNotifications) { var len = this.observers.length; for (var i = 0; i < len; i++) { var obs = this.observers[i]; if (obs) { if (typeof obs == "function") obs(methodName, this, data); else if (obs[methodName]) obs[methodName](this, data); } } } }; Spry.Effect.Animator.Notifier.prototype.enableNotifications = function() { if (--this.suppressNotifications < 0) { this.suppressNotifications = 0; Spry.Debug.reportError("Unbalanced enableNotifications() call!\n"); } }; Spry.Effect.Animator.Notifier.prototype.disableNotifications = function() { ++this.suppressNotifications; }; Spry.Effect.Animator.prototype = new Spry.Effect.Animator.Notifier; Spry.Effect.Animator.prototype.constructor = Spry.Effect.Animator; Spry.Effect.Animator.prototype.start = function() { this.stopped = false; this.currentFrame = 0; this.startTime = (new Date()).getTime(); this.notifyObservers("onAnimationStart"); var self = this; this.timer = setTimeout(function(){ self.onStepAnimation(); }, this.interval); }; Spry.Effect.Animator.prototype.stop = function() { if (this.timer) clearTimeout(this.timer); this.timer = 0; this.stopped = true; this.notifyObservers("onAnimationStopped"); }; Spry.Effect.Animator.prototype.onStepAnimation = function() { var obj = {}; if (this.dropFrames) { obj.duration = this.duration; obj.elapsed = ((new Date).getTime()) - this.startTime; if (obj.elapsed > obj.duration) obj.elapsed = obj.duration; } else { obj.duration = this.numFrames; obj.elapsed = ++this.currentFrame; } obj.easingConst = this.easeFunc(obj.elapsed, 0, 1, obj.duration) this.notifyObservers("onPreDraw", obj); this.draw(obj.elapsed, obj.duration, obj.easingConst); this.notifyObservers("onPostDraw", obj); if (!this.stopped) { if (obj.elapsed < obj.duration) { var self = this; this.timer = setTimeout(function(){ self.onStepAnimation(); }, this.interval); } else { this.stop(); this.notifyObservers("onAnimationComplete"); } } }; Spry.Effect.Animator.prototype.draw = function(elapsed, duration, easingConst) { // The default draw method does nothing. It is assumed that // derived classes will provide their own implementation of this // method. debug.log("elapsed: " + elapsed + " -- duration: " + duration + " -- easingConst: " + easingConst); }; /////////////////////////////////////////////////////////////////////////////// Spry.Effect.CSSAnimator = function(elements, styleStr, opts) { this.animationSets = []; Spry.Effect.Animator.call(this, opts); this.add(elements, styleStr); }; Spry.Effect.CSSAnimator.prototype = new Spry.Effect.Animator(); Spry.Effect.CSSAnimator.prototype.constructor = Spry.Effect.CSSAnimator; Spry.Effect.CSSAnimator.prototype.add = function(elements, styleStr) { // The first argument for the CSSAnimator can be // the id of an element, an element node, or an array of // elements and/or ids. elements = Spry.$$(elements); if (elements.length < 1) return; var animSet = { elements: elements, cssProps: []}; this.animationSets.push(animSet); // Convert the styleStr into an object. var toObj = Spry.Utils.styleStringToObject(styleStr); for (var p in toObj) { var obj = new Object; var v = toObj[p]; obj.value = new Number(v.replace(/[^-\d\.]+/g, "")); obj.units = v.replace(/[-\d+\.]/g, ""); toObj[p] = obj; } for (var i = 0; i < elements.length; i++) { var obj = animSet.cssProps[i] = new Object; for (var p in toObj) { var pFuncs = Spry.Effect.CSSAnimator.stylePropFuncs[p]; if (!pFuncs) pFuncs = Spry.Effect.CSSAnimator.stylePropFuncs["default"]; obj[p] = new Object; obj[p].from = new Number(pFuncs.get(elements[i], p).replace(/[^-\d\.]+/g, "")); obj[p].to = toObj[p].value; obj[p].distance = obj[p].to - obj[p].from; obj[p].units = toObj[p].units; } } }; Spry.Effect.CSSAnimator.prototype.start = function() { for (var s = 0; s < this.animationSets.length; s++) { var animSet = this.animationSets[s]; var elements = animSet.elements; var cssProps = animSet.cssProps; for (var i = 0; i < elements.length; i++) { var ele = elements[i]; var eleProps = ele.spryCSSAnimatorProps; if (!eleProps) eleProps = ele.spryCSSAnimatorProps = new Object; var obj = cssProps[i]; for (var p in obj) eleProps[p] = this.animatorID; } } return Spry.Effect.Animator.prototype.start.call(this); }; Spry.Effect.CSSAnimator.prototype.stop = function() { for (var s = 0; s < this.animationSets.length; s++) { var animSet = this.animationSets[s]; var elements = animSet.elements; var cssProps = animSet.cssProps; for (var i = 0; i < elements.length; i++) { var ele = elements[i]; var obj = cssProps[i]; var eleProps = ele.spryCSSAnimatorProps; for (var p in obj) { if (eleProps[p] == this.animatorID) delete eleProps[p]; } } } return Spry.Effect.Animator.prototype.stop.call(this); }; Spry.Effect.CSSAnimator.prototype.draw = function(elapsed, duration, easingConst) { for (var s = 0; s < this.animationSets.length; s++) { var animSet = this.animationSets[s]; var elements = animSet.elements; var cssProps = animSet.cssProps; for (var i = 0; i < elements.length; i++) { var ele = elements[i]; var eleProps = ele.spryCSSAnimatorProps; var obj = cssProps[i]; for (var p in obj) { if (eleProps[p] == this.animatorID) { var pFuncs = Spry.Effect.CSSAnimator.stylePropFuncs[p]; if (!pFuncs) pFuncs = Spry.Effect.CSSAnimator.stylePropFuncs["default"]; if (elapsed > duration) pFuncs.set(ele, p, obj[p].to + obj[p].units); else pFuncs.set(ele, p, obj[p].from + (obj[p].distance * easingConst) + obj[p].units); } } } } }; Spry.Effect.CSSAnimator.stylePropFuncs = {}; Spry.Effect.CSSAnimator.stylePropFuncs["default"] = { get: function(ele, prop) { return ele.style[prop]; }, set: function(ele, prop, val) { ele.style[prop] = val; } }; Spry.Effect.CSSAnimator.stylePropFuncs["opacity"] = { get: function(ele, prop) { var val = 1; if (ele.style.opacity) val = ele.style.opacity; else if (ele.style.filter) { var strVal = ele.style.filter.replace(/.*alpha\(opacity=(\d+)\).*/, "$1"); if (strVal) val = parseInt(strVal) / 100; } return val + ""; }, set: function(ele, prop, val) { ele.style.opacity = "" + val; ele.style.filter = "alpha(opacity=" + (val * 100) + ")"; } }; /////////////////////////////////////////////////////////////////////////////// Spry.$$.Results.defaultEaseFunc = function(time, begin, finish, duration) { time /= duration; return begin + ((2 - time) * time * finish); }; Spry.$$.Results.animatePropertyTo = function(propName, to, options) { var opts = { interval: 10, duration: 1000, onComplete: null, transition: Spry.$$.Results.defaultEaseFunc }; Spry.Effect.Animator.copyProps(opts, options); var objs = []; for (var i = 0; i < this.length; i++) { var obj = objs[i] = new Object; obj.ele = this[i]; obj.from = obj.ele[propName]; obj.distance = to - obj.from; } var startTime = (new Date).getTime(); var animateFunc = function() { var elapsedTime = ((new Date).getTime()) - startTime; if (elapsedTime > opts.duration) { for (var i = 0; i < objs.length; i++) objs[i].ele[propName] = to; if (opts.onComplete) opts.onComplete(); } else { for (var i = 0; i < objs.length; i++) { var obj = objs[i]; obj.ele[propName] = opts.transition(elapsedTime, obj.from, obj.distance, opts.duration); } setTimeout(animateFunc, opts.interval); } }; setTimeout(animateFunc, opts.interval); return this; }; Spry.$$.Results.animateStyleTo = function(styleStr, options) { var a = new Spry.Effect.CSSAnimator(this, styleStr, options); a.start(); return this; }; })(); // EndSpryComponent I am working on implementing a gallery into my website with categories that collapse/expand the set of images within those categories. i figured out mostly everything i need except i can't get the BUTTONS to behave the way that I want. I'm working with the following images: arrow1: arrow2: arrow3: in general, I want "arrow1" to change to "arrow2" whenever you hover a mouse over it, and back to "arrow1" when the mouse is moves away. (which is simple by itself) the complicated part that I can't figure out, is what happens when you CLICK the button. I want the image to change to "arrow3" when it is clicked (because the content expands), and to STAY at that image until it's clicked again, at which point it should behave as what I started with. The problem is, I can get the arrow to change on click no problem, but once the mouse is moved away, the "onMouseOut" effect changes it back to "arrow1". this is the code I'm working with, hope someone can help Code: <SCRIPT LANGUAGE = "JavaScript"> <!-- first=new Image first.src="http://www.clearnonsense.com/images/arrow1.png" second=new Image second.src="http://www.clearnonsense.com/images/arrow2.png" // --></SCRIPT> </HEAD> <table border="0"> <tr> <td> <a href="javascript:void(0)" OnMouseOut="monitor.src=first.src" OnMouseOver="monitor.src=second.src" onMouseUp="clickdown('pic1')"><img src="http://www.clearnonsense.com/images/arrow1.png" border="0" name="monitor" onclick="showhide('div1',this,'http://www.clearnonsense.com/images/arrow1.png','http://www.clearnonsense.com/images/arrow3.png');"/></a> </td> </tr> <tr> <td valign="top" width="15"> <div id="div1" style="display: none;">imgset1</div> </td> </tr> </table> Happy Turkey Day!! I am new to JavaScript and I downloaded a code for image mouse over effects. It works exactly how it's supposed to except when you first load the page, the images are not there. They do not appear and function until you actually roll the mouse over them. Here is the script and the link... any help would be greatly appreciated! Thank you Link Code: <script language="javascript"> //script found on www.a1javascripts.com //all credit to unknown author <!-- hide script from old browsers window.onerror = null; var netscape = 0; var goodIE = 0; browserName = navigator.appName.substring(0,8); browserVer = parseFloat(navigator.appVersion); if (browserName == "Netscape" && browserVer >= 3) { netscape = 1; } if (browserName == "Microsof" && browserVer >= 4) { goodIE = 1; } // end error trapping code if (netscape || goodIE) { pic1 = new Image(150,100); pic1.src = "enso.jpg"; pic2 = new Image(150,100); pic2.src = "shine.jpg"; pic3 = new Image(150,100); pic3.src = "samsara.jpg"; pic4 = new Image(150,100); pic4.src = "samsara.jpg"; a1 = new Image(300,200); a1.src = "personal1.jpg"; a2 = new Image(300,200); a2.src = "personal2.jpg"; b1 = new Image(325,225); b1.src = "spiritual1.jpg"; b2 = new Image(325,225); b2.src = "spiritual2.jpg"; c1 = new Image(325,225); c1.src = "eyeent1.jpg"; c2 = new Image(300,200); c2.src = "eyeent2.jpg"; } function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2, imgDocID3, imgDocID3) { if (netscape || goodIE) { document.images[imgDocID].src = eval(imgObjName + ".src"); document.images[imgDocID2].src = eval(imgObjName2 + ".src"); document.images[imgDocID3].src = eval(imgObjName3 + ".src"); }} //end hiding --> </script> <img alt="Default Image" name="pic" src="default.gif" height="100" width="150" /><br /> <a onclick="window.focus()" onmouseout="hiLite('pic','pic1','a','a1'); window.status='';return true;" onmouseover="hiLite('pic','pic2','a','a2'); window.status='Button 1';return true;" href="your-page.html"><img alt="Button 1" name="a" src="upbutton1.gif" style="border: 0px solid ; width: 325px; height: 225px;" /></a><br /> <a onclick="window.focus()" onmouseout="hiLite('pic','pic1','b','b1'); window.status='';return true;" onmouseover="hiLite('pic','pic3','b','b2'); window.status='Button 2';return true;" href="your-page.html"><img alt="Button 2" name="b" src="upbutton2.gif" style="border: 0px solid ; width: 325px; height: 225px;" /></a> <a onclick="window.focus()" onmouseout="hiLite('pic','pic1','c','c1'); window.status='';return true;" onmouseover="hiLite('pic','pic4','c','c2'); window.status='Button 3';return true;" href="your-page.html"><img alt="Button 3" name="c" src="upbutton3.gif" style="border: 0px solid ; width: 325px; height: 225px;" /></a> Friend i concern with some that man told me , JavaScript programming is the best effective for website development. so how it is tell me ?
I want a Login Box to be opened in modal window when user clicks on a link and authentication is done with Ajax. I tried jQuery BlockUI, jQuery UI, ThickBox. But they are large in scope. I also tried writing separate plugin for my need but i don't have clear idea how does it work. So please either suggest a way or give me link to article which is simple to understand and can clear how it work. Hi, could someone please tell me what I'm doing wrong with this page? http://www.silvergatehomes.com/customhomestest.html I've tried a bunch of things and cannot figure out what I'm doing wrong. Thanks. P.S. The reason I'm writing is because the images aren't opening. Hi, I am using Lightbox+ and overall it's very good for my needs. However it has a small problem that is causing me to loose hair, I have tried to fix it but my grasp of Javascript just isn't cutting it. If you goto http://serennz.sakura.ne.jp/toybox/lightbox/ and click on the image "Sample 2" then use the next arrow to go to "Sample 3" you have to hover off the image and then back on to get the previous and zoom icons to show again. I have been able to make the bug occur every time in both Firefox 3.6 and IE6. I am guessing the mouseover event isn't triggering correctly due to the image object moving underneath the mouse pointer but I just can't fix it. Any help, pushes in the right direction, anything. Cam. Hello. Am I missing any coding or anything? I'm really confused and have yet to find any help. I got the instructions from http://www.huddletogether.com/projects/lightbox2/ I would go to their forums but haven't received an approval email for over a week. Odd. Anyway, here is my link with the sample thumbnail. It opens the image in a new page. Thanks! http://creativepink.net/packaging.php http://www.fotoderyadijital.somee.co...cekimleri.html why my gallery is too slow when i double click the image is it about lightbox script or images is too big size. can you check for me. |