Connecting Tech Pros Worldwide Help | Site Map

Delete default value in the field

Familiar Sight
 
Join Date: Oct 2007
Posts: 254
#1: Oct 1 '09
Hi all.

I have this:

Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="agg" size="30" value="---" readonly>
  2.  
  3. <select size="1" name="provv" onchange="var cc = this.options[this.selectedIndex].value; if(cc=='GAM')Popup(400,200,'GAM.asp');">
  4. <option value="">---------</option>
  5. <option value="GAM">GAM</option>
  6. <option value="GBM">GBM</option>
  7. </select>
If select GAM value open popup... I need if select GAM the value of field input type text "agg" is value null, deleted default value "---"... it's possible ?

Can you help me?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#2: Oct 1 '09

re: Delete default value in the field


Quote:

Originally Posted by viki1967 View Post

I need if select GAM the value of field input type text "agg" is value null, deleted default value "---"... it's possible ?

sure, though it’d be easier, if you gave the field an id.
Familiar Sight
 
Join Date: Oct 2007
Posts: 254
#3: Oct 1 '09

re: Delete default value in the field


One example please....?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#4: Oct 1 '09

re: Delete default value in the field


let’s try the obvious first
Expand|Select|Wrap|Line Numbers
  1. document.getElementById(…).value = "";
Reply