Won't work for me, I need the blank in the button itself, I am using a call to javascript for special "accept terms" before the button is active. That all works great, I just need the onclick link to go to _blank window.
@d_brandusaauthorApr 29.2004 — #Thanks so much craig, you've been alot of help. One last question, is it possible for the button to be a thumbnail img for example a 100x50 pixels and reference back to /button/img1.jpg kinda thing, is that possible?
@d_brandusaauthorApr 29.2004 — #Okay, everything works fine, I have this javascript where if they click on the accept terms the buttons become active so the links inside them will work. This works perfect now thanks to craigs help with the code within the button. I asked if this can now be an image if I wanted to. It doesn't work, can you tell me if it is possible to do so?
Here is my javascript, its included in the page javascript.js
<!-- Accept Terms / Logos & Guidelines -->
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="button")
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
}
}
}
<!-- End -->
This works fine with this form:
<form name="agreeform" onSubmit="return defaultagree(this)"><b>TERMS GO HERE.</b><textarea rows="5" name="Disclaimer" cols="61" style="color: #000080; border: 1px solid #000080; background-color: #FFFFFF">TERM IN BOX</textarea>I agree to the above terms</b><input name="agreecheck" type="checkbox" onClick="agreesubmit(this)">
The button becomes active when they hit the check box to agree. Now can this script be modified so it works with an "image button" to do the same, stay inactive until they click then the image button will work. Will it be shaded out like the button, this is another question.
Can it work with this instead of the form button, but image button.