Newbie question: how to change the content of a tex item in a form?

J

Jerry

Hi,

I've go a simple question but to hard for my beginners level.
I've got a page with a photobook.

I've got the names of persons as hyperlinks (href="#")
and with the onmouseover() I swap some images (photo of the person
inquestion)
however i'd like to insert a text item from the <FORM> tag
in which the content also changes with the onmouse over.
So I can show some info about this person.
Since i have more than 50 persons i'd like to use JavaScript instead
of creating over 50 pages :)

who can help me with this?

Thanx in advance

Jerry
 
M

Mick White

Jerry wrote:

I've got the names of persons as hyperlinks (href="#")
and with the onmouseover() I swap some images (photo of the person
inquestion)
however i'd like to insert a text item from the <FORM> tag
in which the content also changes with the onmouse over.
So I can show some info about this person.
Since i have more than 50 persons i'd like to use JavaScript instead
of creating over 50 pages :)

who can help me with this?

How about?
function Person(img,name){
this.img=img;
this.text=description[name];
this.showPerson= showPerson;
}
function showPerson(img,name){
var txt="<html><body>"
txt+="<img src ="+this.img+">"
txt+="<p>"+this.text+"</p>"

// open a new window or return txt}

description["tom"]="stuff"; ...

Tom=new person("tom.jpg","tom")

Something like that
Mick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top