SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: onclick dhtml

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onclick dhtml

    I'm trying to create a a basic form I guess you could say.

    1. Text area: user writes whatever the hell he wants.
    2. Search 'textfield': let's say the user puts in the letter 'a'
    3. results 'textfield': tells the user how many times the letter 'a' appears.

    4. search button.
    5. reset button.

    I don't quite seem to understand the onclick code, or how to approach this one in general...here is what I have so far. I have a feeling this is all wrong, but I'm gonna keep workin at it until I get a reply from a more experienced poster on here.

    function copyText (){
    document.myForm.mySearchFor.value=
    document.myForm.mySearchFor.value;

    document.myForm.mySearchIn.value=
    document.myForm.mySearchIn.value;
    }

    function myResults ()

    while (document.myForm.mySearchFor.value == document.myForm.mySearchIn.value)
    {
    document.myForm.myResults.value + 1;
    }

    function myButton (){
    onclick=

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, rushing out the door so don't have time for a lengthy description but try this: DEMO

    Andy
    From the English nation to a US location.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •