Solved

Script to suppress a web site field

Posted on 2007-11-30
2
208 Views
Last Modified: 2010-04-16
We use an online ERP/CRM system that has an ecommerce site built in.  I have limited access to the code that creates the site.  On customer registration, there is a field called "Partner Code" that I would like to hide.  I can't do it in the software but I can add code to the site's footer.  I'm hoping that will work to hide the field.  I attached the code from that area.  The field id is "partner".
<TD nowrap>

<span style="white-space: nowrap" id="partner_fs">

<input value="" maxlength="20" type="text" class="input" onChange="setWindowChanged(window, true);this.isvalid=validate_field(this,'text',true,false);this.checkvalid=false;if (this.isvalid) this.isvalid=validate_textfield_maxlen(this,20,true,false);return this.isvalid;" onFocus="if (this.isvalid == true || this.isvalid == false) this.checkvalid=true;" size="20" name="partner" onBlur="if (this.checkvalid == true) {this.isvalid=validate_field(this,'text',false,false);} if (this.isvalid == false) {this.focus(); this.select(); return this.isvalid;}" id="partner"></span></TD></TR>

<tr>

<td class='smalltext'>&nbsp;</td><td class='smalltext'>If you have a partner or affiliate code, enter it here</td></tr>

Open in new window

0
Comment
Question by:BasilFawlty001
2 Comments
 
LVL 12

Accepted Solution

by:
Sinoj Sebastian earned 500 total points
ID: 20384213
add this code to footer
<script type="text/javascript">

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

</script>

Open in new window

0
 

Author Comment

by:BasilFawlty001
ID: 20384309
Perfect.  Thanks.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now