Pb with javascript function in Safari

L

lemat

Hi,
I use this function in my website, it works perfectly in Firefox. Whan
I click on the image, it changes the border and selects the button
asociated (it's a radiobutton). the color of the border is the text
color of the table.
In IE, the click on the image isn't working (no button selection). If I
click the button, the color of the border is not good.
In Safari, nothing is working.
Any ideas ?

function changeborder(numero)
{
for(var i=1;i<12;i++)
{
if (i!=numero)
{
eval ('document.form1.image'+i+'.border=0');
}

else eval ('document.form1.image'+i+'.border=10');
}
}

Html Code

<label>
<input name="Yunomi" type="radio" value="1"
onclick="changeborder(1)"/>
<img src="Photos/GIF/image1.gif" name="image1"
width="472" height="118" align="middle" id="image1"/>
</label>

Mathieu
 
L

lemat

Mick, you again !! :)

Thanks a lot.

If i put 'document....' after the onclik it works perfectly.
But the function does'nt work...
The other pb I have in IE is that if i click on the image it doesn't
change the button value.
I have to select the button by clicking on the button. I want to select
the button by clicking on the image...

HELP !! ;)

Mathieu
 

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
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top