I asked this years ago, perhaps something has changed?
When I display an image on a form, it displays “Select” and a DELETE check box. How to I disable that display?
You tried use a macro for disable a field? o check it read only?
Nope, neither of those worked
Try .style.display=“none”;
Hi,
Try it with jQuery
$('.chk_ajax_img_invphoto').hide();
$('.sc-id-upload-select-invphoto').hide();
Are you typing ById with Capital i? It’s seams that you are using L
getElementById
I was. I also had dashes in line 2, rather than underscore. Yet it still does not work.
I have it in OnLoad Javascript
frustrating!
Thank you again for your time
getElementById is case sensitive as far as I now use it this way getElementById
I have checked many syntax sites and think I now have it correct.
I found this sample on W3 and it works perfectly hide a field… I have a screen capture
Does it require any code before or after the statements?
It looks ok, It’s working for me.
No it does not require any aditional code.
If the quotes are ok and it’s not working yo can try with:
.style.display=“none”;
or the jlboutin60 JQuery solution.
You can try in another Browser.
Good luck!
Nope, nothing. I will give it a rest and come back to it. I may just be blind to it now
TY again
You need to format it the right way
?>
<script TYPE="text/javascript">
document.getElementByID("chk_ajax_img_infPhoto").style.visibility = "hidden";
document.getElementByID("sc-id-upload-select-invPhoto").style.visibility = "hidden";
</script>
<?php
You are right, I thought it was in onLoad Event
Personnaly I would put this code in onScriptInit
TY gentlemen
None of that works.
I found on W3 there is a test page, where it did work as follows
const myElement = document.getElementById(“chk_ajax_img_invphoto”);
myElement.style.display = “none”;
but not in my app.
I tried onScriptinit
JS onLoad
Nothing
TY for trying to
Lewis