It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

funcition please edit my event or i will cry

funcition please edit my event or i will cry

Postby hypertwat68 on Thu Mar 29, 2007 9:48 pm

this is a very quick question for you guys i can write it better but would fear for the code being copied and submited as coursework

p.s forgive the non-indented code :wink:

/* indicates comment*/

QUESTION 1


function(i)
{
document.getElementById(i).onclick = 'empty()';
}

/*would edit the image id="album3" onclick event to now call empty() or a empty function, but how could i make it call empty(i), i being the varible that was passed in the original function */

QUESTION 2

document.getElementById('songicon').style.width = '50px';
document.getElementById('songicon').style.height = '50px';

/* changes the style of the the first img with the id songicon but what if i wanted it to edit multiple images at the same time i.e do i use class or name or something, i tried using getElementsByName which didn't work :cry: */

p.s i have only included fractions of the code on purpose but will gladly expand on what i ment with the code
hypertwat68
 
Posts: 3
Joined: Thu Mar 29, 2007 9:28 pm

Postby hypertwat68 on Thu Mar 29, 2007 10:06 pm

looks like i posted it in the wrong forum theres two javas OMG vm will post it in the other more HTML like one (javascript)
hypertwat68
 
Posts: 3
Joined: Thu Mar 29, 2007 9:28 pm


Who is online

Users browsing this forum: No registered users and 0 guests