| | |
Help with this JAVA CODING
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2005
Posts: 20
Reputation:
Solved Threads: 0
Hi All -
Can you please look at this code for me?
I need to be able to have this script LOAD A URL when the checkbox is checked and the SUBMIT is pressed....
Thanks so much!!!
Can you please look at this code for me?
I need to be able to have this script LOAD A URL when the checkbox is checked and the SUBMIT is pressed....
Thanks so much!!!

<head>
<script>
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read/accept terms to submit form")
return false
}
}
}
</head>
<body>
<form name="agreeform" onSubmit="return defaultagree(this)">
Here is form or text<br>
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"><b>I agree to the above terms</b><br>
<input type="Submit" value="Submit!" disabled>
</form>
<script>
//change two names below to your form's names
document.forms.agreeform.agreecheck.checked=false
</script>
</body> •
•
Join Date: Aug 2005
Posts: 216
Reputation:
Solved Threads: 8
You might want to ask this question over in the HTML, CSS and JavaScript forum.
![]() |
Similar Threads
- Oregon Trail In Java!! (Java)
- Java to C++ (Java)
- Help Java Program Needs Help (Java)
- Java with Blue J Programming Help (Java)
- want to know more about jsp (JSP)
- OO assignment help (Java)
- What's the difference? (Java)
- GUI Interface (Java)
- matching regular expressions (Java)
Other Threads in the Java Forum
- Previous Thread: expensive thread
- Next Thread: Java Shape Generator Help
| Thread Tools | Search this Thread |
-xlint android api applet application array arrays automation bi binary blackberry block bluetooth chat class classes client code compile compiler component database developmenthelp draw eclipse error event exception fractal freeze game gameprogramming givemetehcodez graphics gui html ide image input integer j2me j2seprojects java javac javaprojects jetbrains jni jpanel jtable julia learningresources lego linux list login loop loops mac map method methods mobile netbeans newbie notdisplaying number online oracle page print problem program programming project qt recursion scanner screen server set singleton size sms sort sql string swing system template textfields threads time title tree tutorial-sample update variablebinding windows working xor





