Jump to content

Manipulating text field versus a button


hadoob024

Recommended Posts

Is the hiding/showing of text fields done differently than for buttons?  I ask because I have the following text field:

 

<input type="text" name="case_id_c" class="sqsEnabled" tabindex="0" id="case_id_c" size="" value="" >

 

And if I call the following javascript, this field disappears:

 

document.getElementById('case_id_c').style.display = 'none';

 

 

However, I have the following button:

 

<input type="button" name="btn_clr_case_id_c" tabindex="0" title="Clear [Alt+C]" accessKey="C" class="button" onclick="this.form.case_id_c.value = ''; value="Clear">

 

 

And if I run the following code, nothing happens:

 

document.getElementsByName("btn_clr_case_id_c").style.display = 'none';

 

 

Not sure what's going on.  Any thoughts???

Link to comment
https://forums.phpfreaks.com/topic/198527-manipulating-text-field-versus-a-button/
Share on other sites

Thanks.  Yeah, I spoke with my manager about this.  The problem with updating that file is that it's a core Sugar file, so when we upgrade Sugar, these changes will be overwritten.  He wants me to come up with an upgrade-safe solution, which I understand but which also makes it so that I'm not done with this yet :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.