Jump to content

[SOLVED] ADVANCED JAVA PLEASE HELP!


addtrain

Recommended Posts

ok, wow! i have gotten tons of help here, im sure someone will be able to help with this its really hard:

my website has 5 pics you have to click. there is a DISABLED form at the bottom of the page. how can i tell it that AFTER i click on EVERY IMAGE, the form will become un-disabled. so pretty much after the person clicks on everyimage, the form that WAS disabled, becomes NOT DISABLED.

thank you for all of the replys.

Link to comment
https://forums.phpfreaks.com/topic/64178-solved-advanced-java-please-help/
Share on other sites

Actually I don't think it's so hard:

<html>
<head>
<script type='text/javascript'>
var img1 = false;
var img2 = false;
var img3 = false;
var img4 = false;
var img5 = false;
function check() {
  if(img1 && img2 && img3 && img4 && img5)
    document.getElementById('input1').disabled = false;
}
</script>
</head>

<body>
<img src='image1.jpg' onclick='img1=true;check();' />
<img src='image2.jpg' onclick='img2=true;check();' />
<img src='image3.jpg' onclick='img3=true;check();' />
<img src='image4.jpg' onclick='img4=true;check();' />
<img src='image5.jpg' onclick='img5=true;check();' />
<br>
<form action='whatever.php' method='post'>
<input type='text' id='input1' disabled='true' />
</form>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.