Jump to content

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 :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.