Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6744623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:06:21+00:00 2026-05-26T12:06:21+00:00

I have a form like this: <form class=category_form id=category_form method=post> <p class=ui-widget> <label for=birds>Birds:

  • 0

I have a form like this:

<form class="category_form" id="category_form" method="post">
<p class="ui-widget">
    <label for="birds">Birds: </label> 
    <input id="birds" /> <a id="add_category" href="#">Add Category</a>
</p>

<p class="ui-widget" style="margin-top:2em; font-family:Arial">
    Result:
    <textarea id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></textarea>
</p>

<p>
    <input type="submit" class="button" value="Add">
</p>
</form>

and I have a jQuery bind function like this:

$('#category_form').bind('submit',function()
{
    // Get the variables

    alert ("hello");

    return false;
});

What I wanted to have happen is every time submit button is pressed, the jQuery function would fire and the alert would happen, but for some reason it isn’t working as I thought it would.

The live example is on this test page: http://problemio.com/test.php

Any idea why pressing the add button does not make the above jQuery work?

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:06:22+00:00Added an answer on May 26, 2026 at 12:06 pm

    your binding should be wrapped in $(document).ready or it attempts to bind the form before the form exists on the page:

    $(document).ready(function(){
        $('#category_form').bind('submit',function(){
            ...
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form like this: <form name=serachForm method=post action=/home/search> <input type=text name=searchText
I have a form like this: <form action='' onsubmit='void(0)' class=mainform> <label class=form3><input type=checkbox> One
I have a form like this: <form id=loginCompact action=https://externalsite... name=sportsbook method=post onsubmit=createCookie('BRLOG', document.sportsbook.username.value, 1)>
I have a form that looks like: <form action=search.php method=post> <fieldset> <label for=level_one>Main category</label>
I have a form that looks like this: class SampleForm(forms.Form): text = forms.CharField(max_length=100) In
I have a Django my_forms.py like this: class CarSearchForm(forms.Form): # lots of fields like
I have a form like this: <form name=mine> <input type=text name=one> <input type=text name=two>
I have a form that looks kind of like this: <div> <div class=contact> <h1>Person's
I have a form in a .html files where input/select box looks like this
I have a django model and model form that look like this: -models.py class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.