This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jQuery and HTML Form  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a regular JSP, and inside the form tags I have regular buttons and text boxes... I want to add a jquery dialog taht will coem up after I click a button next to an exisiting one.
My jquery logic works outside the form tags, where the button will display a dialog, but when adding this button inside the form it doesn't work. ANy ideas??
 
Author and ninkuma
Marshal
Posts: 66685
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you verified that the click handler for the button is firing when the button is moved?

The most likely cause of any weirdness such as this is usually malformed and invalid HTML markup. Have you validated the HTML?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think people can help you better if you post the code here.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the values or content of the button is not involved in the form submission and its sole purpose is just to display a dialog box, it should work even if it is outside the form tags.

Make sure your JQuery event handler is declared correctly.
 
You get good luck from rubbing the belly of a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!