#1
  1. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Oct 2003
    Posts
    1
    Rep Power
    0

    Javascript- Make a text Box= NULL


    Javascript - Forcing a Text box to NULL
    <html>
    <head>
    <script language="javascript">
    function cleartts(form) {
    document.form1.Location.value="";}
    </script>
    </head>
    <body>
    <form name="form1" method="post" action="update.jsp">
    <input type="text" name="Location" value="<ie:getValue something- which its getting from a databse using java>" size=50>
    <input name="Reset" type="reset" value="Reset" onclick="cleartts(this.form)" >
    <body>
    </html>

    This code is from a page I am working on. This page contains some Java thats bringing back some data on to this page which has a update button and a reset button. The page has text fields which will allow the user to update the data they had first entered and should allow them to make the textfields point to NULL if they hit the rest button. The rest works if the user is entering data or has made some changes to the already exsisting data.For eg if location text field pulled out "Brazil" and the user changes it to "America" the rest button sets it back to "Brazil" But I want the textfield to show "" NULL - I mean.
    How do I do it.
    The page gives me an error but doesnt say what error
  2. #2
  3. iTamer
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Apr 2003
    Location
    Auckland, New Zealand
    Posts
    170
    Rep Power
    17
    You should just be able to run a javascript function to set

    document.form1.country.value = "";

    plus, when you post check the disable smilies box and put the code in [ code ] [ / code ] brackets.

Similar Threads

  1. text in title/anchor text
    By sardardolebole in forum Google Optimization
    Replies: 2
    Last Post: Jul 12th, 2003, 02:26 PM
  2. Optimization Question for Google
    By Vrian SInth in forum Google Optimization
    Replies: 5
    Last Post: Jun 26th, 2003, 05:58 PM
  3. ALT text no longer counts
    By Gringo in forum Google Optimization
    Replies: 62
    Last Post: Jun 11th, 2003, 03:32 AM
  4. Alt tag text?
    By maxpower1234 in forum Web Design, Coding and Programming
    Replies: 9
    Last Post: Mar 12th, 2003, 05:31 AM

IMN logo majestic logo threadwatch logo seochat tools logo