Help with this JAVA CODING

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2005
Posts: 20
Reputation: jeepj27 is an unknown quantity at this point 
Solved Threads: 0
jeepj27 jeepj27 is offline Offline
Newbie Poster

Help with this JAVA CODING

 
0
  #1
Sep 12th, 2006
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>
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Solved Threads: 8
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: Help with this JAVA CODING

 
0
  #2
Sep 12th, 2006
You might want to ask this question over in the HTML, CSS and JavaScript forum.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 4
Reputation: amellie is an unknown quantity at this point 
Solved Threads: 0
amellie's Avatar
amellie amellie is offline Offline
Newbie Poster

Re: Help with this JAVA CODING

 
0
  #3
Sep 16th, 2006
that's javascript... javascript is not the same as java
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC