Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Thanked 0 Times in 0 Posts

    Unhappy Using a Button to link to a function

    So I have a javascript contact form that slides onto my site. I want to put buttons elsewhere that make it come out.

    My javascript is:

    $(function (){
    recipient: 'pwomack@seitzservice.com',
    subject: 'A Message from stylecrafthomesofrichmond.com'

    And right now, I have the button code as....

    <button type="button" onclick="function()">CLICK HERE</button>

    I don't really know what to put for the onclick function.

    Any help? Need any more info?

  2. #2
    Regular Coder
    Join Date
    Aug 2002
    San Francisco
    Thanked 15 Times in 15 Posts
    Instead of an anonymous function, give the function a name, like contactMe().

    If you need it to slide out when the page loads, then use body onload="contactMe()"
    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read. Groucho Marx


Tags for this Thread

Posting Permissions

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