JavaScript - Another Image Array Question
I have a bit of code that I can't decipher, beginner that I am.
Code: (function($) { $(document).ready(function() { $("#tmp").attr('src', loader.loadImage('test.zip://images/image.jpg')); }); })(jQuery) This code loads an image from a zip file and the tmp variable is passed to the id attribute in the html img tag. It works as is, but what I want to do is pass an array element containing the image name to the function from within the tag and have the function return directly rather than using the #tmp variable. The html page I'm working with has 98 images, so calling this function from within the img tag seems the way to go rather than having 98 separate instances of the function wit 98 separate tmp variables. What I don't understand is what function($) means or why tmp has the hash in front. I had assumed the hash was some sort of pointer reference but I wasn't able to find any documentation on it. Can anyone help me out? Similar Tutorialshi, if i have an array of "hop", "skip", "jump" "run", how do i prompt the user to enter a number between 1 and 4 to bring back one of the array list without using an if or switch statement... the code i have so far is: numbers= new Array(); numbers[0]="hop"; numbers[1]="skip"; numbers[2]="jump"; numbers[3]="run"; thanks I want to create a script that reads the text in an anchor <a> tag, and if the parent node is a td tag, I want to sort the text in the <a> tag alphabetically. Im not sure if this would require an array or not... but one important point is the text being read would be something like Miami - Detroit or Buffalo - New York two team names separated by a hyphen. This is what I had, but again.. not sure if it needs an array in order to work, or if the '-' is important.. BUT i only want to sort by the First letter of the first team listed so Arizona - Oakland would be sorted above San Francisco - Atlanta Code: function main(){ var a = document.getElementsByTagName('a'); for (i = 0; i < a.length; i++) { if(a[i].parentNode.tagName == 'Td'){ var team = a[i].innerHTML; team.sort(); } else{ i++; } } } Please forgive my ignorance. I am definitely more designer than programmer... Not sure if this possible, If it is then I am definitely getting the syntax wrong. I'm trying to pull array data as such: var carouselC2R1Array = new Array(500, 4, 0); var currentSilo = 2; var currentImg = 1; carouselWidth = "carouselC"+currentSilo+"R"+currentImg+"Array"[0]; carouselMaxImages = "carouselC"+currentSilo+"R"+currentImg+"Array"[1]; carouselCurrentImg = "carouselC"+currentSilo+"R"+currentImg+"Array"[2]; the correct data return should be: carouselWidth = 500 carouselMaxImages = 4 carouselCurrentImg = 0 but instead, I'm getting: carouselWidth = c carouselMaxImages = a carouselCurrentImg = r Any help would be greatly appreciated! Cheers. Is there a way to create new lines on a array. so if a array cald questions and theres two value questions [0] and questions [1] can i make a function that would create a questions [2]. So i am also wondering if i could do things with a array like sql? Edit: Wrong SPelling Ok...this is gonna sound very stupid to you guys, but I don't get one part of this code. Code: function range(upto) { var result = []; for (var i = 0; i <= upto; i++) result[i] = i; return result; } show(range(4)); What does result[i]=i mean? I know it adds the value of i into the array, but how? Why couldn't you just write it as result[i] or result[] = i? Hey guys, I've got a question about this array in my code. I have my array at a size of 20 and all of the elements are initialized to 5. What i want to do is when the user types in the word "dog" i want to increase one of the first 10 elements in my array by 1, increasing it from 5 to 6. How would you do such a thing?
Hi Peers, I am capturing query data into different Javascript arrays and that is the only way i have for now...anyway ..i have what i want in JS arrrays > is there a war to perform CRUD operations on those arrays : my Arrays look like this : A1 : EmpID / A2 : Name / A3: Fistanme.. A1[0] : 1 / A1[0] : Paul /A1[0] : Newman A1[1] : 2 / A1[1] : Paul /A1[1] : Simon i want to be able to display the information like and give the ability to create , update or delete the record based on the EmpID unique number: EmpID / Name / Firstname 1 Paul Newman Update ( hyperlink) - Delete ( hyperlink) 2 Paul Simon Update ( hyperlink) - Delete ( hyperlink) i am using Coldfusion CF 7 and i was told since i want to keep the data into JS array that the only way to do it is usinig JAvascript any thoughts how can this be done./??? Thanks I know it's possible to do this in php, but what would the javascript equivalent be? Code: var scripts = new Array(); scripts[] = "PHP"; scripts[] = "ASP"; scripts[] = "JavaScript"; scripts[] = "HTML"; But this obviously doesn't work. And just to clarify, I mean the ability to add an array whenever I want to in my page instead of having to name the array like... Code: var scripts = new Array(); scripts[0] = "PHP"; scripts[1] = "ASP"; scripts[2] = "JavaScript"; scripts[3] = "HTML"; I'm using it for such as in a form: Code: <input type="text" name="formarray[]"> <input type="text" name="formarray[]"> Thank you in advance. The following code snippet: (this.inputArray is already defined and initialized prior to this code sequence) if(this.inputArray.length >= 0) { this.inputArray[this.inputArray.length] = new Object(); this.inputArray[this.inputArray.length].type = 'pcDisp'; this.inputArray[this.inputArray.length].data = a; } the first line in the code block should create a new array item and initialize it with the various assigments in the next lines. But Firefox complains "this.inputArray[this.inputArray.length] is not defined". This is very disconcerting because the code has to create array items with different data based on conditionals. So I must be able to automatically create new items as necessary. I thought that javascript had 'late binding', but maybe that doesn't apply here. So, does anyone have a clue for me? Hi, what would be the best way to have a hidden array of possible text directed at a textarea and then if something is not within that array "onfocus", a certain select option is chosen within that form? Thanks I don't know if this is the right thread or not but my question is if anyone can tell what the script might be for doing this mouseover. zOr how it can be done. http://www.newtonaptclinics.com/ConditionsTreated.html Thanks Bill I'm making my first venture into Javascript with this project. i've been successful so far, but i'm trying to add a few more elements and i'm not sure how to do it. here's the test site: http://www.ductaman.com/test1/amenities.html there's a few ways i want to go from here, one is to add captions to each picture when it's made large. the other is to maybe have the thumb link to another photo, that way i can make the thumb be a face, and have the large pic be their whole body. etc. i was hoping i could do this by adding more variables to the "a_load()" function. So i guess i was wondering if i can draw on a variable defined by "a_load()" with "b_load()" and if so, how? i have made several educated guesses as to how i would do this, but nothing has worked. thanks -Andy head code: Code: <script type="text/javascript"> function a_load(a_pic1,a_file1,a_pic2,a_file2,a_pic3,a_file3,a_pic4,a_file4,a_pic5,a_file5,a_pic6,a_file6) { document.getElementById(a_pic1).src = a_file1; document.getElementById(a_pic2).src = a_file2; document.getElementById(a_pic3).src = a_file3; document.getElementById(a_pic4).src = a_file4; document.getElementById(a_pic5).src = a_file5; document.getElementById(a_pic6).src = a_file6; } function b_load(whichpic) { var x=document.getElementById(whichpic); document.getElementById("largepic").src = x.src; } </script> body code: Code: <div id="map"> <img src="images/default/chevy.png" id="chevy" onclick="a_load('pic1','images/default/lion.jpg','pic2','images/default/chimp.jpg','pic3','images/default/zebra.jpg','pic4','images/default/fish.jpg','pic5','images/default/cat.jpg','pic6','images/default/dog.jpg')"> <img src="images/default/ford.png" id="ford" onclick="a_load('pic1','images/default/cow.jpg','pic2','images/default/duck.jpg','pic3','images/default/fish.jpg','pic4','images/default/frog.jpg','pic5','images/default/eagle.jpg','pic6','images/default/cat.jpg')"> <img src="images/default/honda.png" id="honda" onclick="a_load('pic1','images/default/chimp.jpg','pic2','images/default/zebra.jpg','pic3','images/default/cat.jpg','pic4','images/default/lion.jpg','pic5','images/default/frog.jpg','pic6','images/default/duck.jpg')"> <img src="images/default/toyota.png" id="toyota" onclick="a_load('pic1','images/default/dog.jpg','pic2','images/default/fish.jpg','pic3','images/default/cat.jpg','pic4','images/default/eagle.jpg','pic5','images/default/zebra.jpg','pic6','images/default/lion.jpg')"> <img src="images/default/nissan.png" id="nissan" onclick="a_load('pic1','images/default/frog.jpg','pic2','images/default/lion.jpg','pic3','images/default/fish.jpg','pic4','images/default/dog.jpg','pic5','images/default/chimp.jpg','pic6','images/default/zebra.jpg')"> </div> <div id="gallery"> <img src="images/default/cat.jpg" id="pic1" height="150" width="200" onclick="b_load('pic1')"> <img src="images/default/dog.jpg" id="pic2" height="150" width="200" onclick="b_load('pic2')"> <img src="images/default/duck.jpg" id="pic3" height="150" width="200" onclick="b_load('pic3')"> <img src="images/default/chimp.jpg" id="pic4" height="150" width="200" onclick="b_load('pic4')"> <img src="images/default/eagle.jpg" id="pic5" height="150" width="200" onclick="b_load('pic5')"> <img src="images/default/frog.jpg" id="pic6" height="150" width="200" onclick="b_load('pic6')"> <div id="mainpic"> <img src="images/default/cat.jpg" id="largepic" height="300" width="400"> </div> </div> </div> I was wondering if it was possible to get java to display images that have the same name but diff numbers like: Soccer*** Displays; Soccer001 Soccer002 Soccer003 Soccer004 .... So on and so forth. Sorry the question isn't worded well lol Hi all, I have set my sprite on this page http://www.kylehouston.com/portfolio.html to fade in, my problem is when the page loads the images appear and then they fade in, how can i set them to fade in without showing them first of all? Thanks in advance Kyle I know I posted this in the Javascript section, and if this is not right, I am sorry, please let me know so I can post it in the right area. I am looking to create an image gallery on my website. i am decent at coding, but need some help. I am looking for a code to where I can have a gallery to every picture inside the folder. say I have 100 pictures in a folder named "pics123" on my server. Is there a way to code a gallery to where every picture in the folder will appear in the gallery without putting every image in the coding? thanks! Hi I have created the following page http://kylehouston.com/new/choir_contact.html I have added JQuery to smoothly fade in the screenshot on this page but on the first load the image gradually loads which misses out on the fade in effect. Is there a way I can load the image invisibly and then fade it in? Thanks in advance for your advice Kyle I am brand new to Javascript, have been studying on Lynda.com for almost a week trying to get the hang. I found a cool scrolling effect with controls here at the very bottom of the page, and have built a page just trying to duplicate the html and js below. Unfortunately, it doesn't work. The CSS seems to be there, however no scrolling, any help would be greatly appreciated. PHP Code: <title>Untitled Document</title> <style type="text/css"> #footersponsors ul { list-style-type:none; } #footersponsors { float:left; padding-top:5px; position:relative; width:980px; } #footersponsors #buttons { border:1px solid #777777; margin-bottom:5px; width:955px; } #footersponsors #buttons a { color:#6699CC; margin:10px; } #footersponsors .prev { float:left; } #footersponsors .next { float:right; } #footersponsors .prev img { border:0 none; padding-top:30px; text-decoration:none; } #footersponsors .next img { border:0 none; padding-top:30px; text-decoration:none; } #footersponsorsitems { float:left; margin-left:9px; overflow:hidden; width:895px; } #footersponsorsitems ul { padding-left:2px; width:3900px; } #footersponsorsitems li { float:left; height:90px; line-height:90px; margin:0 2px; width:179px; } </style> </head> <script type="text/javascript" language="javascript"> <!-- jQuery.easing.easeOutQuart = function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }; jQuery().ready(function() { var intval = 2600;//how often to autoscroll (in milliseconds) - This is set with a var to enable trigger functions below jQuery('#footersponsorsitems').serialScroll( { items:'li', prev:'#footersponsors a.prev', next:'#footersponsors a.next', start:0, duration:700, force:true, stop:true, lock:false, interval:intval, //autoscroll set here cycle:true, //pull back once you reach the end easing:'easeOutQuart', //use this easing equation for a funny effect jump: false, //click on the images to scroll to them exclude: 4 //stop scrolling when there are 4 items left as not to pull the others off the screen }); $('#footersponsorsitems').hover(function(){ $(this).trigger('stop'); },function(){ $(this).trigger('start'); }); $('#footersponsorsitems li').hover( function(){ $(this) .stop() .fadeTo(250, 1.0) .siblings() .stop() .fadeTo(500, 0.15); }, function(){ $('#footersponsorsitems li') .stop() .fadeTo(500, 1.0); }); }); // --> </script> <div id="footersponsors"> <input type="hidden" name="ctl26$hfCurrentPage" id="ctl26_hfCurrentPage" value="0" /> <a class="prev" href="#"><img src="/images/buttons/sponsor_select_left_off.gif" alt="<"></a> <div id="footersponsorsitems"> <ul id="ctl26_ulFooterSponsors" style="width:13725px;"> <li><a href="http://www.nhra.com/points/kn-horsepower.aspx" title="" target="_blank"><img src="/assets/footersponsor/KN-HorsePowerChallenge_4c1.gif" alt="" /></a></li> <li><a href="http://www.nhra.com/streetlegal/default.aspx" title="Street Legal Drags" target="_blank"><img src="/assets/footersponsor/NHRA_StreetLegal.gif" alt="Street Legal Drags" /></a></li> <li><a href="http://www.promodchallenge.com/" title="" target="_blank"><img src="/assets/footersponsor/promod.gif" alt="" /></a></li> <li><a href="http://www.nhra.net/yes/" title="Youth and Education Services" target="_blank"><img src="/assets/footersponsor/YESarmy_20th.gif" alt="Youth and Education Services" /></a></li> <li><a href="http://www.coca-cola.com/" title="Coke" target="_blank"><img src="/assets/footersponsor/Coke-official1.gif" alt="Coke" /></a></li> <li><a href="http://www.dasani.com/" title="Dasani" target="_blank"><img src="/assets/footersponsor/Dasani-official.gif" alt="Dasani" /></a></li> <li><a href="http://www.fullthrottleenergy.com/" title="Full Throttle" target="_blank"><img src="/assets/footersponsor/Full-Throttle-Official.gif" alt="Full Throttle" /></a></li> <li><a href="http://www.powerade.com/" title="POWERade" target="_blank"><img src="/assets/footersponsor/Powerade-official.gif" alt="POWERade" /></a></li> <li><a href="http://www.budweiser.com/" title="Budweiser" target="_blank"><img src="/assets/footersponsor/Bud-official.gif" alt="Budweiser" /></a></li> <li><a href="http://www.cat.com/" title="" target="_blank"><img src="/assets/footersponsor/Cat_official.gif" alt="" /></a></li> <li><a href="http://www.fordracing.com/" title="" target="_blank"><img src="/assets/footersponsor/ford1.gif" alt="" /></a></li> <li><a href="http://www.fram.com/" title="Fram" target="_blank"><img src="/assets/footersponsor/FRAM--Official.gif" alt="Fram" /></a></li> <li><a href="http://www.goodyeartires.com/" title="Goodyear" target="_blank"><img src="/assets/footersponsor/Goodyear_Official_4c.gif" alt="Goodyear" /></a></li> <li><a href="http://www.harley-davidson.com/" title="Harley-Davidson" target="_blank"><img src="/assets/footersponsor/HarleyOfficial-4c.gif" alt="Harley-Davidson" /></a></li> <li><a href="http://www.hurstjaws.com/" title="Hurst" target="_blank"><img src="/assets/footersponsor/HURST-tool-official.gif" alt="Hurst" /></a></li> <li><a href="http://www.lucasoil.com/" title="Lucas Oil" target="_blank"><img src="/assets/footersponsor/Lucas-official.gif" alt="Lucas Oil" /></a></li> <li><a href="http://www.maingateinc.com/" title="Main Gate" target="_blank"><img src="/assets/footersponsor/Main-Gate-Logo-NHRA.gif" alt="Main Gate" /></a></li> <li><a href="http://www.motel6.com" title="" target="_blank"><img src="/assets/footersponsor/Motel-6logo-Official1.gif" alt="" /></a></li> <li><a href="http://www.okuma.com/" title="Okuma" target="_blank"><img src="/assets/footersponsor/OKUMA_rev.gif" alt="Okuma" /></a></li> <li><a href="http://www.prestone.com/" title="Prestone" target="_blank"><img src="/assets/footersponsor/Prestone-official.gif" alt="Prestone" /></a></li> <li><a href="http://www.racingelectronics.com/" title="Racing Electronics" target="_blank"><img src="/assets/footersponsor/RE-official.gif" alt="Racing Electronics" /></a></li> <li><a href="http://www.siouxcitykenworth.com/" title="Sioux City Truck and Trailer" target="_blank"><img src="/assets/footersponsor/Sioux-City-TT.gif" alt="Sioux City Truck and Trailer" /></a></li> <li><a href="http://www.summitracing.com/" title="Summit" target="_blank"><img src="/assets/footersponsor/Summit_Official_4C.gif" alt="Summit" /></a></li> <li><a href="http://www.vpracingfuels.com/" title="VP Racing Fuels" target="_blank"><img src="/assets/footersponsor/VPofficial.gif" alt="VP Racing Fuels" /></a></li> <li><a href="http://www.wyotech.edu/" title="WyoTech" target="_blank"><img src="/assets/footersponsor/WyoTechOfficial_large_4C.gif" alt="WyoTech" /></a></li> <li><a href="http://www.nhra.com/points/kn-horsepower.aspx" title="" target="_blank"><img src="/assets/footersponsor/KN-HorsePowerChallenge_4c1.gif" alt="" /></a></li> <li><a href="http://www.nhra.com/streetlegal/default.aspx" title="Street Legal Drags" target="_blank"><img src="/assets/footersponsor/NHRA_StreetLegal.gif" alt="Street Legal Drags" /></a></li> <li><a href="http://www.promodchallenge.com/" title="" target="_blank"><img src="/assets/footersponsor/promod.gif" alt="" /></a></li> <li><a href="http://www.nhra.net/yes/" title="Youth and Education Services" target="_blank"><img src="/assets/footersponsor/YESarmy_20th.gif" alt="Youth and Education Services" /></a></li> <li><a href="http://www.coca-cola.com/" title="Coke" target="_blank"><img src="/assets/footersponsor/Coke-official1.gif" alt="Coke" /></a></li> <li><a href="http://www.dasani.com/" title="Dasani" target="_blank"><img src="/assets/footersponsor/Dasani-official.gif" alt="Dasani" /></a></li> <li><a href="http://www.fullthrottleenergy.com/" title="Full Throttle" target="_blank"><img src="/assets/footersponsor/Full-Throttle-Official.gif" alt="Full Throttle" /></a></li> <li><a href="http://www.powerade.com/" title="POWERade" target="_blank"><img src="/assets/footersponsor/Powerade-official.gif" alt="POWERade" /></a></li> <li><a href="http://www.budweiser.com/" title="Budweiser" target="_blank"><img src="/assets/footersponsor/Bud-official.gif" alt="Budweiser" /></a></li> <li><a href="http://www.cat.com/" title="" target="_blank"><img src="/assets/footersponsor/Cat_official.gif" alt="" /></a></li> <li><a href="http://www.fordracing.com/" title="" target="_blank"><img src="/assets/footersponsor/ford1.gif" alt="" /></a></li> <li><a href="http://www.fram.com/" title="Fram" target="_blank"><img src="/assets/footersponsor/FRAM--Official.gif" alt="Fram" /></a></li> <li><a href="http://www.goodyeartires.com/" title="Goodyear" target="_blank"><img src="/assets/footersponsor/Goodyear_Official_4c.gif" alt="Goodyear" /></a></li> <li><a href="http://www.harley-davidson.com/" title="Harley-Davidson" target="_blank"><img src="/assets/footersponsor/HarleyOfficial-4c.gif" alt="Harley-Davidson" /></a></li> <li><a href="http://www.hurstjaws.com/" title="Hurst" target="_blank"><img src="/assets/footersponsor/HURST-tool-official.gif" alt="Hurst" /></a></li> <li><a href="http://www.lucasoil.com/" title="Lucas Oil" target="_blank"><img src="/assets/footersponsor/Lucas-official.gif" alt="Lucas Oil" /></a></li> <li><a href="http://www.maingateinc.com/" title="Main Gate" target="_blank"><img src="/assets/footersponsor/Main-Gate-Logo-NHRA.gif" alt="Main Gate" /></a></li> <li><a href="http://www.motel6.com" title="" target="_blank"><img src="/assets/footersponsor/Motel-6logo-Official1.gif" alt="" /></a></li> <li><a href="http://www.okuma.com/" title="Okuma" target="_blank"><img src="/assets/footersponsor/OKUMA_rev.gif" alt="Okuma" /></a></li> <li><a href="http://www.prestone.com/" title="Prestone" target="_blank"><img src="/assets/footersponsor/Prestone-official.gif" alt="Prestone" /></a></li> <li><a href="http://www.racingelectronics.com/" title="Racing Electronics" target="_blank"><img src="/assets/footersponsor/RE-official.gif" alt="Racing Electronics" /></a></li> <li><a href="http://www.siouxcitykenworth.com/" title="Sioux City Truck and Trailer" target="_blank"><img src="/assets/footersponsor/Sioux-City-TT.gif" alt="Sioux City Truck and Trailer" /></a></li> <li><a href="http://www.summitracing.com/" title="Summit" target="_blank"><img src="/assets/footersponsor/Summit_Official_4C.gif" alt="Summit" /></a></li> <li><a href="http://www.vpracingfuels.com/" title="VP Racing Fuels" target="_blank"><img src="/assets/footersponsor/VPofficial.gif" alt="VP Racing Fuels" /></a></li> <li><a href="http://www.wyotech.edu/" title="WyoTech" target="_blank"><img src="/assets/footersponsor/WyoTechOfficial_large_4C.gif" alt="WyoTech" /></a></li> <li><a href="http://www.nhra.com/points/kn-horsepower.aspx" title="" target="_blank"><img src="/assets/footersponsor/KN-HorsePowerChallenge_4c1.gif" alt="" /></a></li> <li><a href="http://www.nhra.com/streetlegal/default.aspx" title="Street Legal Drags" target="_blank"><img src="/assets/footersponsor/NHRA_StreetLegal.gif" alt="Street Legal Drags" /></a></li> <li><a href="http://www.promodchallenge.com/" title="" target="_blank"><img src="/assets/footersponsor/promod.gif" alt="" /></a></li> <li><a href="http://www.nhra.net/yes/" title="Youth and Education Services" target="_blank"><img src="/assets/footersponsor/YESarmy_20th.gif" alt="Youth and Education Services" /></a></li> <li><a href="http://www.coca-cola.com/" title="Coke" target="_blank"><img src="/assets/footersponsor/Coke-official1.gif" alt="Coke" /></a></li> <li><a href="http://www.dasani.com/" title="Dasani" target="_blank"><img src="/assets/footersponsor/Dasani-official.gif" alt="Dasani" /></a></li> <li><a href="http://www.fullthrottleenergy.com/" title="Full Throttle" target="_blank"><img src="/assets/footersponsor/Full-Throttle-Official.gif" alt="Full Throttle" /></a></li> <li><a href="http://www.powerade.com/" title="POWERade" target="_blank"><img src="/assets/footersponsor/Powerade-official.gif" alt="POWERade" /></a></li> <li><a href="http://www.budweiser.com/" title="Budweiser" target="_blank"><img src="/assets/footersponsor/Bud-official.gif" alt="Budweiser" /></a></li> <li><a href="http://www.cat.com/" title="" target="_blank"><img src="/assets/footersponsor/Cat_official.gif" alt="" /></a></li> <li><a href="http://www.fordracing.com/" title="" target="_blank"><img src="/assets/footersponsor/ford1.gif" alt="" /></a></li> <li><a href="http://www.fram.com/" title="Fram" target="_blank"><img src="/assets/footersponsor/FRAM--Official.gif" alt="Fram" /></a></li> <li><a href="http://www.goodyeartires.com/" title="Goodyear" target="_blank"><img src="/assets/footersponsor/Goodyear_Official_4c.gif" alt="Goodyear" /></a></li> <li><a href="http://www.harley-davidson.com/" title="Harley-Davidson" target="_blank"><img src="/assets/footersponsor/HarleyOfficial-4c.gif" alt="Harley-Davidson" /></a></li> <li><a href="http://www.hurstjaws.com/" title="Hurst" target="_blank"><img src="/assets/footersponsor/HURST-tool-official.gif" alt="Hurst" /></a></li> <li><a href="http://www.lucasoil.com/" title="Lucas Oil" target="_blank"><img src="/assets/footersponsor/Lucas-official.gif" alt="Lucas Oil" /></a></li> <li><a href="http://www.maingateinc.com/" title="Main Gate" target="_blank"><img src="/assets/footersponsor/Main-Gate-Logo-NHRA.gif" alt="Main Gate" /></a></li> <li><a href="http://www.motel6.com" title="" target="_blank"><img src="/assets/footersponsor/Motel-6logo-Official1.gif" alt="" /></a></li> <li><a href="http://www.okuma.com/" title="Okuma" target="_blank"><img src="/assets/footersponsor/OKUMA_rev.gif" alt="Okuma" /></a></li> <li><a href="http://www.prestone.com/" title="Prestone" target="_blank"><img src="/assets/footersponsor/Prestone-official.gif" alt="Prestone" /></a></li> <li><a href="http://www.racingelectronics.com/" title="Racing Electronics" target="_blank"><img src="/assets/footersponsor/RE-official.gif" alt="Racing Electronics" /></a></li> <li><a href="http://www.siouxcitykenworth.com/" title="Sioux City Truck and Trailer" target="_blank"><img src="/assets/footersponsor/Sioux-City-TT.gif" alt="Sioux City Truck and Trailer" /></a></li> <li><a href="http://www.summitracing.com/" title="Summit" target="_blank"><img src="/assets/footersponsor/Summit_Official_4C.gif" alt="Summit" /></a></li> <li><a href="http://www.vpracingfuels.com/" title="VP Racing Fuels" target="_blank"><img src="/assets/footersponsor/VPofficial.gif" alt="VP Racing Fuels" /></a></li> <li><a href="http://www.wyotech.edu/" title="WyoTech" target="_blank"><img src="/assets/footersponsor/WyoTechOfficial_large_4C.gif" alt="WyoTech" /></a></li> </ul> </div> <a class="next" href="#"><img src="/images/buttons/sponsor_select_right_off.gif" alt=" />"></a> </div> </div> </body> </html> I need some help here. I'm a complete newbie at this. This is what I would like to have happen. Upon clicking an image (button) I would like a new window to open and I also want to the parent window to load as a new page. I've been searching around and found some code. I implemented it and got the new window to open, but the parent window does not change. Please let me know what to change. Here's what I have: <script language="JavaScript"><!-- function newWindow(file,window) { msgWindow=open(file,window,'resizable=no,width=1500,height=1000'); if (msgWindow.open == null) msgWindow.open = self; } //--></script> <form> <input value="Get Quotes Now" type="image" src="http://www.xyz.com/pictures/a1.jp" onmouseout="this.src='http://www.xyz.com/pictures/a1.jpg';" onmouseover="this.src='http://www.xyz.com/pictures/a2.jpg';" onclick="newWindow('http://www.xyz.com/compare.html','window2');window.open('http://www.xyz.com/compare2.html','_self',' ')"> </form> Hi, please look at: http://bit.ly/hO5VBE then click 'play app match' you'll see the images are taken from the first 15 in an array, then doubled and randomized. however, i want the the images taken to be a random selection from an array of 15+ images. so the array would be e.g. 25 images, and i want any 15 of those 25 to be chosen (then doubled and randomized) rather than the first 15 taken. any help would be great! James p.s. if you load the main page while hovering over an icon, its tooltip will be "undefined".. any ideas to stop this? Thanks! I have a div what will contain a various number on images and i need to put all their src's into an array. Is this doable? Heres the code Code: <div id="imageHolder"> <!-- ONLY CHANGE THE SRC, NOTHING ELSE --> <div style="width:770px;height:400px;overflow-y:auto;margin-bottom:5px;"> <img src="http://wholesalepadlocks.co.uk/ebayImages/AU080.JPG" alt="" width="750" id="mainImage"/><br /><br /> </div> <img src="http://wholesalepadlocks.co.uk/ebayImages/au080a.jpg" alt="" width="240" height="120" onmouseover="Images = this.src;alert(Images)" /> <img src="http://wholesalepadlocks.co.uk/ebayImages/au080b.jpg" alt="" width="240" height="120" onmouseover="Images = this.src;alert(Images)"/> <img src="http://wholesalepadlocks.co.uk/ebayImages/AU080.JPG" alt="" width="240" height="120" onmouseover="Images = this.src;alert(Images)"/> </div>Ignore the onmouseover code i was attempting to do this but so far no luck :P |