| | |
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 |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me japplet java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree unlimited variablebinding webservices windows





