Java script help required asap!
Moderators:Best First, spiderfrommars, IronHide
- Impactor returns 2.0
- Big Honking Planet Eater
- Posts:6885
- Joined:Sat Sep 22, 2001 11:00 pm
- ::Starlord
- Location:Your Mums
ok ive got this java script gallery code from here
http://javascript.internet.com/miscella ... iewer.html
When i download the script as it says and begin to change the image files for files on my computer, it doesnt work!!!
I cant see what im missing, im change both img names on each line of the code, but nothing works...
http://javascript.internet.com/miscella ... iewer.html
When i download the script as it says and begin to change the image files for files on my computer, it doesnt work!!!
I cant see what im missing, im change both img names on each line of the code, but nothing works...
- Impactor returns 2.0
- Big Honking Planet Eater
- Posts:6885
- Joined:Sat Sep 22, 2001 11:00 pm
- ::Starlord
- Location:Your Mums
I just tried it, to see if I could see where you were going wrong (obviously irrelevant now), but the way I see it, it loads the entireity of each image for the small panels(i.e. a 1024x768 image will still be 1024x768, even when the panel is only 90x60), then displays them in the larger panel when called upon.
Of course, it's easy to get around the initial loading problem, by altering the img src="p1.jpg" tag to img src="p1_thumb.jpg" or similar, as long as the doPic('p1.jpg') function is left as-is.
Dynamic HTML using script is an easy way to do client-side effects that would otherwise have to be done using many near-identical static HTML pages (lots of webspace wasted) or server-side effects (not everyone has wanted to fork out for php/cgi/etc.).
Of course, it's easy to get around the initial loading problem, by altering the img src="p1.jpg" tag to img src="p1_thumb.jpg" or similar, as long as the doPic('p1.jpg') function is left as-is.
Dynamic HTML using script is an easy way to do client-side effects that would otherwise have to be done using many near-identical static HTML pages (lots of webspace wasted) or server-side effects (not everyone has wanted to fork out for php/cgi/etc.).
- Impactor returns 2.0
- Big Honking Planet Eater
- Posts:6885
- Joined:Sat Sep 22, 2001 11:00 pm
- ::Starlord
- Location:Your Mums
ok i sorted all my thumbs problems etc - id love to go the other route by have literaly hours remaining so I just need one more bit of help.
I am trying t combine two roll overs.
My buttons have a highlight rollover and it also changes a thumbnail.
I am trying t combine two roll overs.
My buttons have a highlight rollover and it also changes a thumbnail.
How can I combine both statements in one single mouse over statement - I just cant work out the syntax, it will only ever view the first statement.ok this works as I want it to by itself.
onmouseover="MM_swapImage('thumb','','images/2dwork/2dthumb/abstractthumb.jpg',1)"
and this also works exactly how i want it to by itself.
onmouseover="MM_swapImage('Image01','','images/buttons/01u.gif',2)"
- Impactor returns 2.0
- Big Honking Planet Eater
- Posts:6885
- Joined:Sat Sep 22, 2001 11:00 pm
- ::Starlord
- Location:Your Mums
Ok ive put the page up online.
the first two number buttons show the preview images correctly but they do not have thier own button rollover images as buttons 3-12 do.
so essentialy how do i combine the rollover button highlight with the thumbnail preview?
http://www.impstar.co.uk/2Dworktest.html
the first two number buttons show the preview images correctly but they do not have thier own button rollover images as buttons 3-12 do.
so essentialy how do i combine the rollover button highlight with the thumbnail preview?
http://www.impstar.co.uk/2Dworktest.html
You could try putting the two statements in a function and use the function in the onmouseover statement.
For example:
Alternatively, it might be possible to use a semicolon to delimit the different MM_swapimage() instructions within a single onMouseOver, but it's not possible to have more than one active onMouseOver in the same tag, as the HTML interpreter can only ever hold one value for each attribute. Interpreters either take the first instance and disregard subsequent ones, or overwrites the value for each new instance encountered, which takes longer to handle.
For example:
Code: Select all
impyMouseOver(t1,t2,i1,i2) {
MM_swapimage(t1,'',t2,1);
MM_swapimage(i1,'',i2,2)
}
Code: Select all
onMouseOver="impyMouseOver('thumb','images/2dwork/2dthumb/abstractthumb.jpg','image01','images/buttons/01u.gif')"
- Impactor returns 2.0
- Big Honking Planet Eater
- Posts:6885
- Joined:Sat Sep 22, 2001 11:00 pm
- ::Starlord
- Location:Your Mums
am i guessing all that was needed was the ; to seperate them?
Ill give it a go, for now im finnished as its got to be hadned in!
www.impstar.co.uk
Quite happy, I knowits got spacing issues on some pages but not bad for 1 days work.
Ill give it a go, for now im finnished as its got to be hadned in!
www.impstar.co.uk
Quite happy, I knowits got spacing issues on some pages but not bad for 1 days work.
- Impactor returns 2.0
- Big Honking Planet Eater
- Posts:6885
- Joined:Sat Sep 22, 2001 11:00 pm
- ::Starlord
- Location:Your Mums
Cheers for the code I added that to my Gallery buttons and now they look proper swisho!
I justifed the text to the left, the reasoni hadnt before was in Firefox it was on the left where I wanted it? - and IE it wasnt, so I added some more formating to make sure. One thing I do notice is in FF I have these lil square symbols on parts of my text, which is what I wanted but in IE these symbols do not appear... bugger.
The last thing I want to add is some discriptions for each bit of work, ive left a table cell blank above each image and hope to link some txt into that space but for now im quite happy so thank you for all the help as im rather proud of the results and ill be using the site for some time
Thank you all again .
I justifed the text to the left, the reasoni hadnt before was in Firefox it was on the left where I wanted it? - and IE it wasnt, so I added some more formating to make sure. One thing I do notice is in FF I have these lil square symbols on parts of my text, which is what I wanted but in IE these symbols do not appear... bugger.
The last thing I want to add is some discriptions for each bit of work, ive left a table cell blank above each image and hope to link some txt into that space but for now im quite happy so thank you for all the help as im rather proud of the results and ill be using the site for some time
Thank you all again .