I created arrays for each image and then i combined the images using a another array and i want to move a div across the array along to the next images. ...
I just need a little tweak, I know all this code isn't perfect (far from it). Instead of writing the contents of the array into a div, I ideally want to ...
Hi I've been working with contentEditable for a while now and I think I have a pretty good handle on it. One thing that's evading me is how to get an ...
Hey CF. I'm not great with JS, but I'm trying to build something pretty simple and even that's out of my league. I have a layout with multiple fields that need to be filled randomly from an array on click. I have an array with a bit of jQuery that randomly reloads one field on click, but I need multiple fields ...
Hi everyone I'm new to javascript and I'm trying to fade in and out a div using an array. It worked when I had two arrays and two variables. One array that decends through the opacity values and another array that acends the opacity values. here is the the external JS, HTML and external CSS. It works once but I want ...
I have an essoteric question about javascript and how DOM/javascript stores divs that are created and displayed in succession by absolute positioning. I have a series of divs that are assigned absolute top and left values to form a grid. The grid tiles are programmed to swap coordinates in pairs when one of the pairs is clicked. Then if I do ...
I am trying to write a script that will hide/unhide all of my DIV containers of text on the page using JavaScript. I want this to work with IE and NN 6 and greater. I can write the script to do this by accessing the DIV containers by id using getElementById(idname) for each DIV container individually. Unfortunately, on my page I ...
addEvent(window,'load',function(){ var f1=document.getElementById('f1'); var f1history=['product','htmlpage'];//create array of the classNames of 'f1' div? },false); var f1=document.getElementById('f1'); var sidebar=document.getElementById('sidebar'); addEvent(sidebar,'click',function(){ f1history.length+='f1.className';//add the current className of 'f1' to 'f1history' array? },false); var header=document.getElementById('header'); addEvent(header,'click',function(){ if((f1history.length>0)&&(f1history.length.indexOf('htmlpage')){ window.history=f1history[0]; /* not sure that returning the className of 'f1' will work it should return the index number of f1history array! Because 'f1' divs className has to be 'product' ...
As Andy Williams once crooned - 'we're almost there...'! I've managed to output the text of my two arrays to a specific div (in this case the div's id is ''number') - BUT i'm only seeing the last data from each array (it's a train number and a train name) so instead of getting the entire list from 800 to 870 ...
I'm gradually getting the hang of this DOM model (after advice from a fellow forum guy) and have been outputting innerHTML into various tags like
or
. At the momnt though I'm only having success outputting text strings. What i really need to know is how to output an entire array into a div, using the 'for' loop. I'm trying ...
Hey all, I'm working on a site that plays a video when users select them from a list. The site loads with a video up, and there are two divs that hold links to more videos. I'm using swfobject and the below code for video selection and playing: Code: function createplayer(theFile, go){ var s = new SWFObject("fla/mediaplayer.swf","playerID","500","300","7"); s.addParam("allowfullscreen","true"); s.addVariable("file",theFile); s.addVariable("width","500"); s.addVariable("height","300"); ...
I'm new to javascript and would like to create a simple expandable menu list. and so the gist of the program would be showing and hiding divs by reassigning them different css classes which will hide and reposition them. so say I want to asighn the 'show' class to the div with id 'item[1]', it's easy to change the class of ...