hiding form problem (jquery)

Discussion in 'Java Script/AJAX' started by Rqqepqqq, Oct 27, 2011.

  1. Rqqepqqq New Member

    Member Since:
    Jun 7, 2011
    Message Count:
    180
    Likes Received:
    1
    i have a form that is hidden by default. (not really a form, but a div with a textarea and a button)

    if you click on a link this form becomes visable. (working)
    if you hit the submit button the content of the form is processed and the form becomes invisible again. (working)

    now i want that the form becomes invisible when the user clicks outside the textarea without submitting the form.

    i'm using the blur function, but i cannot submit anything anymore.

    How can i fix this.
  2. MarPlo Member

    Member Since:
    May 12, 2011
    Message Count:
    66
    Likes Received:
    6
    Hi,
    Try have the textarea and submit button into the same div, than add onblur="this.style.display='none';" in that <div> tag.

Share This Page