943,946 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1161
  • Java RSS
Sep 12th, 2006
0

Help with this JAVA CODING

Expand Post »
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!!!

<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>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jeepj27 is offline Offline
20 posts
since May 2005
Sep 12th, 2006
0

Re: Help with this JAVA CODING

You might want to ask this question over in the HTML, CSS and JavaScript forum.
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
hooknc is offline Offline
216 posts
since Aug 2005
Sep 16th, 2006
0

Re: Help with this JAVA CODING

that's javascript... javascript is not the same as java
Reputation Points: 10
Solved Threads: 0
Newbie Poster
amellie is offline Offline
4 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: expensive thread
Next Thread in Java Forum Timeline: Java Shape Generator Help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC