# Solved: OnClick command?



## MightyMikeAlan (Dec 30, 2011)

I am fairly new to using HTML coding. I have a HTML form on my site where a user supplies their information after ordering a product. All works fine. However, I would like them to have to read a disclaimer message BEFORE submitting their information with a 'Submit' button. I would like to use a 'Checkbox' that they have to check before the Submit button is displayed or enabled proving they attempted to read the information first. How can this be done? Can the OnClick command work for this?
Thanks in advance for any info,
Mike
(below is the HTML form I am currently using)

*First Name:

*Last Name:

*Address:

*City:

*State:

*Zip Code:

*Product Mailing Address if Different from above:

*E-Mail:

*Item Ordered:

*Number of Tracks:

Comments:
Type comments and Track Dimensions here.


----------



## sepala (May 20, 2010)

JAVASCRIPT OnClick will work. If the checkbox is clicked, then the box is displayed.


----------



## MightyMikeAlan (Dec 30, 2011)

Sepala,
Could you please give me an example of how to do this since this is pretty new to me. I have included what is working for me now. If you could use that and add what needs to be done, I would very much appreiciate it!
Thanks,
Mike


----------



## tomdkat (May 6, 2006)

Here is a test case which works in Google Chrome (I haven't tried any other browser):

```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Disabled submit button test case</title>
<script type="text/javascript" >
function enableSubmitButton(checkBoxElement) {
 submitButton = document.getElementById('submit');
 if (checkBoxElement.checked == true) 
	submitButton.disabled=false;
 else 
	submitButton.disabled=true;
}
</script>
</head>
<body>
<form method="post" action="process.php" name="testcase">
  Name:&nbsp; <input size="20" name="name"><br>
<input name="agree" value="agree-to-terms" type="checkbox" onclick="enableSubmitButton(this);">I agree to the terms<br>
<br>
<input disabled="disabled" id="submit" name="submit" type="submit"><br>
</form>
</body>
</html>
```
If you save this to a HTML file on your computer and open it directly in your browser, you can see the submit button toggle as you click the check box. You could get "fancy" and code the event handler like this:


```
function enableSubmitButton(checkBoxElement) {
 document.getElementById('submit').disabled = !(checkBoxElement.checked);
}
```
But I tend to not like that style of coding. 

In any event, this should get you started. 

Happy New Year!

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Thank you so much! I'll give it a try!
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Hello TomCat,
What you gave me works absolutely perfect when running in the Browser. However..... when I use it in my webpage combined with what I displayed earlier in my post, it doesn't work quite the same. I think I am mixing Apples and Oranges. As you can see in what I submitted, it doesn't really contain HTML coding. Anyway... when I try it together with mine, the button is disabled all the time and you can still click on the button regardless. Like I said, using what you gave me works fine using the browser. Make any since? In my website design program, it really refers to this as Coding. Make any since? 
Thanks,
Mike


----------



## tomdkat (May 6, 2006)

Did you add an "id" parameter to the submit button input tag? Also, did you add the "disabled" parameter to the submit button input tag?

Here is a test case with the form you posted above with my tweaks to it identified:

```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Disabled submit button test case</title>
<script type="text/javascript" >
function enableSubmitButton(checkBoxElement) {
 document.getElementById('submit').disabled = !(checkBoxElement.checked);
}

</script>
</head>
<body>
<form action="/gdform.php" method="post"> 
<input type="hidden" name="subject" value="Grand Prix Tracker ORDER" /> 
<input type="hidden" name="redirect" value="thankyou.html" />
<p>*First Name:<input type="text" name="FirstName" /></p>
<p>*Last Name:<input type="text" name="LastName" /></p>
<p>*Address:<input type="text" name="MyAddress=" size=35/></p>
<p>*City:<input type="text" name="MyCity=" /></p>
<p>*State:<input type="text" name="MyState=" /></p>
<p>*Zip Code:<input type="text" name="MyZipCode=" size=10/></p>
<p>*Product Mailing Address if Different from above:<input type="text" name="MyAltAddress=" size=60/></p>
<p>*E-Mail:<input type="text" name="MyEmail" size=35/></p>
<p>*Item Ordered:<input type="text" name="MyItem=" /></p>
<p>*Number of Tracks:<input type="text" name="MyTracks=" size=5/></p>
<p>Comments:<textarea name="comments" cols="40" rows="10">
Type comments and Track Dimensions here.</textarea></p> 
<p><input type="checkbox" value="readDisclaimer" onclick="enableSubmitButton(this)" />I read the disclaimer</p>
<input type="submit" name="submit" value="submit" [b][color=red]id="submit" disabled="true"[/color][/b] />
</form>
</body>
</html>
```
See if you can work with that. If you add the parameters I highlighted above and then put the JavaScript function I wrote in the "" section of the page, it should work as desired.

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tomdkat,
Thanks for getting back so soon. I cut & pasted the coding you just game me but unfortunately I get the same result. The Submit Button *stays* disabled regardless if you click the checkbox or not and yet you can click on the submit button and it still executes. Any other ideas? I'll try them all! I won't be in town until Tuesday to get back on the wifi here to check for further updates.
Thanks,
Mike


----------



## tomdkat (May 6, 2006)

If the page is live, please post a link to it so I can see exactly what you're doing. Otherwise, please post the COMPLETE HTML in this thread so I can see the code.

If it works for me, it can work for you. 

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

My site is at: www.GrandprixTracker.com
It is found on the third tab called 'Purchase'. It is located on the right side of the form about half-way down. I just noticed also that my original coding must have a flaw because you can click anywhere outside of the Test Boxes and it opens to my email page. Also in my coding, when you click on the Submit button, it displays my 'Thank You' html form, however when I tried what you gave me, it didn't. Hmm.... like I said I don't really no HTML or Script coding that well. As far as the coding you gave me, I deleted my original coding with yours by cut & paste. If you view the source coding on my site on the Purchase page it starts on line 814 (at least on mine). I did not *upload* your coding to my site permanetly since it didn't work. But I guess I could do this later if you want me too!
Thanks again,
Mike
(be back Tuesday)


----------



## tomdkat (May 6, 2006)

Thanks for the link. The reason clicking on that form opens the e-mail application is because the ENTIRE FORM is inside a HTML anchor element:


```
<div id="Oobj320">
[b][color=red]<a href="mailto:[email protected]">[/color][/b]<div id="Gcode330" class="dfltc">
<form action="/gdform.php" method="post"> 
<input type="hidden" name="subject" value="Grand Prix Tracker ORDER" /> 
<input type="hidden" name="redirect" value="thankyou.html" />
<p>*First Name:        <input type="text" name="FirstName" /></p>
<p>*Last Name:        <input type="text" name="LastName" /></p>
<p>*Address:        <input type="text" name="MyAddress=" size=35/></p>
<p>*City:        <input type="text" name="MyCity=" /></p>
<p>*State:        <input type="text" name="MyState=" /></p>
<p>*Zip Code:        <input type="text" name="MyZipCode=" size=10/></p>
<p>*Product Mailing Address if different from above:<input type="text" name="MyAltAddress=" size=60/></p>
<p>*E-Mail:        <input type="text" name="MyEmail" size=35/></p>
<p>*Item Ordered:        <input type="text" name="MyItem=" /></p>
<p>*Number of Tracks:        <input type="text" name="MyTracks=" size=5/></p>
<p>Comments:        <textarea name="comments" cols="40" rows="10">
Type comments and Track Dimensions here.</textarea></p> 
<input type="submit" name="submit" value="submit"/>
</form>
</div>
[b][color=red]</a>[/color][/b]
</div>
```
If you remove the tags I highlighted above, the form should start working as a form. 

Also, if you could make a copy of the "Purchase" page and put what I posted above in it and upload it to your server, I can see how you implemented my changes and we can see what went wrong. 

Have a great weekend!

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Okay Tom,
I have put in your coding and uploaded it to my site (www.grandprixtracker.com). Remember that it is not working correctly, so I hate to leave it this way very long in case I get an order. I cannot find a way to remove the coding that you mentioned because that is generated outside of my coding. The rest is generated through SiteSpinner. At least now you can view the coding on-line. When the 'submit' button is clicked it stills brings up my email page instead of the 'thank you' html page, plus the submit button still stays disabled regardless of the state of the checkbox. The original coding does this correctly. Thanks for taking the time to look at this. I'll be in town a little longer, but then won't be back until Friday for any responses.
Thanks,
Mike


----------



## tomdkat (May 6, 2006)

Ok, when I look at this page:

http://www.grandprixtracker.com/purchase.html

in Google Chrome, it functions perfectly. The "submit" button is grayed out until I click the "Gran Prix" check box. Then, it (submit button) becomes clickable. The coding is mostly correct, but there are some things that need to be fixed to make it fully functional.

I'll test in other browsers now.

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

I tried it with Firefox and yes, It works pretty much like it should. I normally use IE9. It still brings up my email page instead of the 'thank you' html. It should send the 'Thank You' html to the client and send me the information that they submitted to my email page. This works with the original coding.
Thanks,
Mike


----------



## tomdkat (May 6, 2006)

MightyMikeAlan said:


> I tried it with Firefox and yes, It works pretty much like it should. I normally use IE9.


Cool. I've tried the page in Firefox, Opera, Safari (on Windows), Chrome, and in IE9 and it works everywhere except in IE. So, I'll have to look into that. It should be a minor tweak. 



> It still brings up my email page instead of the 'thank you' html. It should send the 'Thank You' html to the client and send me the information that they submitted to my email page. This works with the original coding.


Yep, this is because the *entire form* is inside an anchor element, which, when clicked, will try to send an e-mail message. You will either need to figure out how to remove that anchor element, so the form is no longer in it, or figure out how to edit the HTML source manually so you can remove the tags I highlighted above, manually.

Additionally, you posted my ENTIRE test case into your page and that's not correct. The only portions you needed were the JavaScript section and the changes to the submit button element. I'll figure out the IE changes and will post an update with ONLY the things you need to change. 

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Thanks tom!!!!!!!


----------



## tomdkat (May 6, 2006)

Ok, please point your browser (IE9) at this test case:

www.tomdkat.com/techguy/disabled.html

Make sure the submit button stays grayed out until you click the check box. I just tried it in IE9 on my Windows 7 system (both in regular mode and in compatibility mode) and it functioned just fine. I think there's some coding issues on your page which are causing IE to not function the way you want.

First, we REALLY need to get that form OUTSIDE of the anchor element, preferably removing the anchor completely. Can you find a way to do that?

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
When I click on your LINK everything works the way it is suppose to. I have been looking through the information on Sitespinner. I cannot find where once I read something about Not being able to edit coding outside of the Text Code that the user submits. I don't know..... I don't understand a lot of what Sitespinner does. Maybe I should submit my coding and what I am trying to do to 'SiteSpinners forum and maybe they can give me some clues. What do you think?
Mike


----------



## tomdkat (May 6, 2006)

Ok, how did you put the code I posted above into the page?

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I guess I miss interpreted what you wanted me to do. I just clicked on your link to see if it responded correctly with my IE9 browser. I now did that again and copied the coding from viewing it. I took that code and pasted it in my Sitespinner. Sitespinner provides a way to bring up the browser to see how it displays without actually uploding it to the webpage. Doing it this way reacted the same way that it has always responded. The submit buttom stays *disabled* regardless of the checkbox status and still brings up my email address with no sign of the 'thank you' page. Did you want me to actually upload it to my site?
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I do see when creating or adding code to the Text Code Editor, that there are a few options that can be used. It gives you the ability to use 'Title', 'Text' or 'Code'. I have alway's used CODE. It also gives you another ability to put it in: In Body, Header, In CSS, Above All, Below All, Above Body and Below Body. I have alway's used "IN Body". Just for your information.
Mike


----------



## tomdkat (May 6, 2006)

MightyMikeAlan said:


> Tom,
> I guess I miss interpreted what you wanted me to do. I just clicked on your link to see if it responded correctly with my IE9 browser.


That IS what I wanted you to do. 



> I now did that again and copied the coding from viewing it. I took that code and pasted it in my Sitespinner.


Cool. How did you do THAT? When you "pasted" it into Sitespinner, were you looking at raw HTML or something else? Could you post a screen shot of where you posted my code?



> Sitespinner provides a way to bring up the browser to see how it displays without actually uploding it to the webpage. Doing it this way reacted the same way that it has always responded. The submit buttom stays *disabled* regardless of the checkbox status and still brings up my email address with no sign of the 'thank you' page. Did you want me to actually upload it to my site?


Nope, not yet. At this point, we're trying to figure out a way for you to remove the anchor element which is getting in the way. 



MightyMikeAlan said:


> Tom,
> I do see when creating or adding code to the Text Code Editor, that there are a few options that can be used. It gives you the ability to use 'Title', 'Text' or 'Code'. I have alway's used CODE. It also gives you another ability to put it in: In Body, Header, In CSS, Above All, Below All, Above Body and Below Body. I have alway's used "IN Body". Just for your information.
> Mike


"Text Code Editor" sounds promising. Can you post a screen shot of what that looks like?

Additionally, on that page, the "Purchase" page, you somehow got your e-mail address in it such that when they click the form, it tries to send an e-mail message. Go back to where you associated your e-mail address with the form and disassociate it. Do you understand?

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I would like to send you a 'screenshot' if I knew how to send it on this site. For the life of me, I don't see where you can do that! It just wants Links! In the coding that I cut & pasted after clearing the original, I see NO reference to my email address. Is it somehow included in the 'gdform.php' file?
All that other coding you see in the Source is NOT included with the coding I am entering. It is being generated someplace else.
Yes.... when I looked at your source coding from that Link of your sample and copied the Raw html coding and pasted that into my coding.
Mike


----------



## Ent (Apr 11, 2009)

http://library.techguy.org/wiki/TSG_Posting_a_Screenshot
Hope this helps.
Pulling out to let tomdcat carry on, he seems to be doing quite fine.


----------



## tomdkat (May 6, 2006)

MightyMikeAlan said:


> In the coding that I cut & pasted after clearing the original, I see NO reference to my email address. Is it somehow included in the 'gdform.php' file?
> All that other coding you see in the Source is NOT included with the coding I am entering. It is being generated someplace else.
> Yes.... when I looked at your source coding from that Link of your sample and copied the Raw html coding and pasted that into my coding.


Ok, well somehow you got your e-mail address associated with an anchor element, a link, on that page. You might need to get help with removing that from someone more familiar with SiteSpinner.

I did find this:

http://www.virtualmechanics.com/support/tutorials-spinner/Code.html

which looks like it could be helpful but I don't know what the "objects" are the tutorial refers to, etc. The section on adding a header is useful, because the JavaScript script I posted above would have gone in there.

How did you put the form on the page? Maybe you could delete the form and recreate it and that might get rid of the bothersome anchor. 



Ent said:


> http://library.techguy.org/wiki/TSG_Posting_a_Screenshot
> Hope this helps.
> Pulling out to let tomdcat carry on, he seems to be doing quite fine.


Thanks for the link! :up:

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I'll look into that Code page you sent me from Sitespinner. I also saw a couple of questions on their forum site that was referencing pretty much like what I am trying to do. Like you said, I apparently don't know enough right now on editing that other coding. When I include my own code, the text editor brings up a previous page or new page depending. I completely remove ALL coding and then paste the new coding that you gave me. Nothin else is added. I have been here about 4 hours and my battery is almost dead, so I will have to go for now. I'll try doing some more digging during the week and be back Friday. Thanks for all your hard work!
Mike


----------



## tomdkat (May 6, 2006)

Thanks for the screen shots! 

Ok, attached is a screen shot which shows what I want you to DELETE. After you delete those items, send another screen shot which shows what's left. If you can't see the entire HTML form, scroll down to show the bottom of the form and post a screen shot of that.

Thanks!

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

First of all.... Thanks Ent.
Tom, 
I replaced my battery with my backup, but I don't have a full charge. Here are the Screenshots. I also tried it from within SiteSpinners Test mode and I still get the same results (just for info). Hopefully I copied it right. Hope this helps!
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Tom....
I'll have to catch you Friday! Thanks for all the help!
Mike


----------



## tomdkat (May 6, 2006)

Cool. Here is another screen shot of what I want you to delete next.

The misbehavior won't go away until we get that anchor out of the way. I've highlighted the anchor in a previous post, possibly on page #1 of this thread.

Until that anchor goes away, the form will continue to misbehave. Maybe if you contact someone on the SiteSpinner forum, you could post a link to this thread and they can see the anchor element which we want to get removed and provide info on removing it.

EDIT: See you Friday. 

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I'm finally back. Before I left last Tuesday, I wrote SiteSpinner. He replied to me with the EXACT same coding you just gave me. Completely identical. He said it worked with his IE8. I pasted the coding in and I got the exact same result! So I just wrote him back and I'll see what he says. I know you said that we have to get rid of that anchor so I don't know if you have any other suggestions until we here back!
Thanks again for all your hard work.
Mike


----------



## tomdkat (May 6, 2006)

If possible, you can edit the HTML file SiteSpinner generated OUTSIDE of SiteSpinner, remove the anchor (as I indicated above), and test the form in the browser. If it works, then reload that page in SiteSpinner and see if it still works.

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I tried the code outside of SiteSpinner in the HTML form and everything works perfectly. I already tried putting it into SiteSpinner and it does the same thing as before. I have it 'Uploaded' that way now if you want to take a look. www.GrandPricTracker.com
Thanks,
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Correction: www.GrandPrixTracker.com


----------



## tomdkat (May 6, 2006)

MightyMikeAlan said:


> Tom,
> I tried the code outside of SiteSpinner in the HTML form and everything works perfectly. I already tried putting it into SiteSpinner and it does the same thing as before.


Thanks. The problematic anchor is still there. So, if you can edit the purchase.html in Notepad, locate the anchor I highlighted in this thread and remove it, save the file and then upload that file to the server.

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
If you look at my site, you should see where I got rid of the email thing. Does it look right to you? I have this guy at Sitespinner working with me too and he is telling me basically the same thing that you are. He showed how to remove that email link. However it still isn't behaving correctly. I'll eventually have to put the site back to normal before I leave today. He had me verify my 'gdform.php' and all. It all checked out fine with at my provider at 'GoDaddy'. Thought I would keep you in the loop. I haven't heard back from him in quite awhile.
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Will... never mind. I just looked at the source at my 'Purchase Page' and that email address is still there!
Mike


----------



## tomdkat (May 6, 2006)

Edit the purchase.html file in Notepad and find the lines I highlighted in red on page #1 of this thread. Use 'Oobj320' as search criteria to help you find the anchor in question. Here is a direct link to my post:

http://forums.techguy.org/8212605-post11.html

Once you have removed the link, as described in that post, the form should work fine. I have another idea to try as well. 

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Okay Tom,
It looks like I finally got rid of that object. I uploaded it so you can view. I no longer get my email popping up, but when I click the Checkbox, the 'Submit Button' does not enable nor can you Click it.
Any ideas before I go.
Thanks a bunch,
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
Hey..... I just tried it using 'Firefox' and everything worked PERFECTLY! What gives????
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I have been on Wifi here for over 6 hors now. I need to get going. Maybe you can give it some thought on what I need to do next later. I'll have to put my site back to the way it was originally. Hope to link up with you Tuesday! Thanks again for all your help!
Mike


----------



## tomdkat (May 6, 2006)

Well, it looks like I missed you. The form that is up RIGHT NOW, the original form is PERFECT. The anchor that was causing problems is NOT there. Cool. So, if you can start with this CURRENT form, the ORIGINAL form and edit the HTML object for the form and add this to it, you should be set:


```
<div id="Oobj320">
<div id="Gcode330" class="dfltc">
<form action="/gdform.php" method="post"> 
<input type="hidden" name="subject" value="Grand Prix Tracker ORDER" /> 
<input type="hidden" name="redirect" value="thankyou.html" />
<p>*First Name:<input type="text" name="FirstName" /></p>
<p>*Last Name:<input type="text" name="LastName" /></p>
<p>*Address:<input type="text" name="MyAddress=" size=35/></p>
<p>*City:<input type="text" name="MyCity=" /></p>
<p>*State:<input type="text" name="MyState=" /></p>
<p>*Zip Code:<input type="text" name="MyZipCode=" size=10/></p>
<p>*Product Mailing Address if Different from above:<input type="text" name="MyAltAddress=" size=60/></p>
<p>*E-Mail:<input type="text" name="MyEmail" size=35/></p>
<p>*Item Ordered:<input type="text" name="MyItem=" /></p>
<p>*Number of Tracks:<input type="text" name="MyTracks=" size=5/></p>
<p>Comments:<textarea name="comments" cols="40" rows="10">
Type comments and Track Dimensions here.</textarea></p> 
[b][color=red]<p><input name="agree" value="agree-to-terms" type="checkbox" onclick="enableSubmitButton(this);">I agree to the terms</p>[/color][/b]
<input type="submit" name="submit" value="submit" [b][color=red]id="submit"[/color][/b] />
</form>
</div>
</div>
```
Then get that saved and published and we'll see how that looks. Once that's done, then add this to the "head" section of the page, using this as a guide:

http://www.virtualmechanics.com/support/tutorials-spinner/Code.html#Header

Here is the code to go in the "head" section:

```
<script type="text/javascript">
function enableSubmitButton(checkBoxElement) {
 document.getElementById('submit').disabled = !(checkBoxElement.checked);
}
</script>
```
Then we should be set. 

Have a great weekend!

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Hi Tom,
I got it posted last Friday and it worked Perfectly using Firefox but failed using IE9. I tried what you showed me now but I couldn't get anything to display. Anyway... I finally got the other person at Sitespinner to reply today and he suggested this:
------------------------------------------------------------------------------------------------
After some tinkering, it appears that the _disabled_ attribute of a submit button is not fully supported in IE browsers when the web page is in the quirks mode, which unfortunately is the way SS publishes its pages.

You can get around this by using jQuery which will circumvent this problem. Use a code object, set the code placement to "Header" and enter: 
Then change the code to activate the submit button to: 
This should work in all browsers. 
--------------------------------------------------------------------------------------------
I put the coding back to the way I had it on Friday and then added this fix and now it works perfectly using either browser!!!!!!!
He also sent me a Link that shows better how to manage the Text boxes to see if they contain data, etc. I really appreicate all the effort and work you put into this. Thanks a million! I do have a question for you though. Is there a way when a person 'Clicks' the Comments box, that it can CLEAR the previous text before they start typing?
My site is now uploaded if you want to view it.
Thanks Tom,
Mike


----------



## tomdkat (May 6, 2006)

Gotta love IE 

Glad to hear you got the form working. 

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
Can you explain what needs to be done to CLEAR the contents (text) of the Comments box when a person clicks in it before they start typing?
Thanks,
Mike

Well.... it looks like I just figured it out looking at a sample. It works fine. But what if you were to TAB into the comments box. How would you check for that?


----------



## tomdkat (May 6, 2006)

If one were to use the TAB key to enter the comments box, the "onfocus" event might get fired. So, research if the "onfocus" event gets fired for a textarea element. If it does, you can write an "onfocus" event handler to clear the comment box if someone uses a TAB key to get to it.

Peace...


----------



## MightyMikeAlan (Dec 30, 2011)

Thanks Tom. I'll look into this.
Mike


----------



## MightyMikeAlan (Dec 30, 2011)

Tom,
I tried the OnFocus command and it works perfectly! Thanks a bunch.
Mike


----------



## tomdkat (May 6, 2006)

Awesome! If you can, please mark this thread as "solved". If you go to the first post, you can use the "Thread Tools" to mark it as solved.

Take care!

Peace...


----------

