SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: onclick dhtml
-
Apr 18, 2007, 10:37 #1
- 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=
-
Apr 18, 2007, 13:10 #2
- 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
AndyFrom the English nation to a US location.
Bookmarks