max and other javascript gurus

They have: 1,587 posts

Joined: Mar 1999

how would i change the text (in max's game below) that tells u if ur guess was right to a graphic without having the page reload/refresh?

http://atomicpixels.com/files/guessnum.html

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I'm not really a guru... I'm just good at finding answers. Wink
Vincent is the guru.Laughing out loud

Here's an idea.. How bout make a layer with the image on it. Start the page with the layer invisible. When they get the correct answer, show the layer with the image on it.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 1,587 posts

Joined: Mar 1999

um, and how would one do that (layer), hehe?

do u have an example script with layer in it anywhere?

all i really need is to see a script that uses a command then i'll figure it out and hack it to my needs.

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

They have: 1,587 posts

Joined: Mar 1999

thx for the tip max, it led me towards the right direction.

thx again Smiling

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi fairhousing,

Max has it (thank you, Max; but 'guru' is a word I reserve for one or two people I know Smiling

You can put all of the images you need (right, wrong, not a number, etc) in an array and then simply pop the div with the proper image source. Something like:

if (answer == number) picSrc = myPics[0];
if (answer > number) picSrc = myPics[1];
...etc...

If you are still wondering how to do the dHTML, see the dHTML scripts/tutorials at my site, especially the "dHTML: an Introduction" one.

Vinny

Where the world once stood
the blades of grass cut me still

They have: 1,587 posts

Joined: Mar 1999

thx

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.