Delete default value in the field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • viki1967
    Contributor
    • Oct 2007
    • 263

    Delete default value in the field

    Hi all.

    I have this:

    Code:
    <input type="text" name="agg" size="30" value="---" readonly>
    
    <select size="1" name="provv" onchange="var cc = this.options[this.selectedIndex].value; if(cc=='GAM')Popup(400,200,'GAM.asp');">
    <option value="">---------</option>
    <option value="GAM">GAM</option>
    <option value="GBM">GBM</option>
    </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
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Originally posted by viki1967
    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.

    Comment

    • viki1967
      Contributor
      • Oct 2007
      • 263

      #3
      One example please....?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        let’s try the obvious first
        Code:
        document.getElementById(…).value = "";

        Comment

        Working...