• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Working contact form but doesnt show up alert message

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my website: http://bbb.antalyabalikcilik.com.tr/contact-us.html

I have a contact form. I get emails to my email address but the form doesn't show up after email sending 'THANK YOU' alert.


html code:




email.php:





js code:



What is wrong?
Please help me...
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume you are excepting the page to remain loaded after the form submission, right? Well in order to do that you need to return false from your form submission handler.

I know you are going to say that you are, but you're not. Look at the code closely.
 
Volkan Ozudogru
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:I assume you are exerting the page to remain loaded after the form submission, right? Well in order to do that you need to return false from your form submission handler.

I know you are going to say that you are, but you're not. Look at the code closely.


Yes,that is right....
I try everthing but changed nothing...

Can you help me ?
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is that really the problem? That the form is submitting when you don't want it to?

If so, look at where your submit handler really is. Poorly naming a function submit_handler doesn't make it a submit handler.
 
Volkan Ozudogru
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Is that really the problem? That the form is submitting when you don't want it to?

If so, look at where your submit handler really is. Poorly naming a function submit_handler doesn't make it a submit handler.



I have no knowledge about ajax...Because of i really dont know which code i must add or change.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you don't really understand how any of this code works? Is it something you copied from the net? That someone else wrote and you have inherited?

You must return false from the submit handler function, which is the function al line 71 in your first post.

P.S. This actually doesn't have much to do with Ajax but with event handling.
 
Volkan Ozudogru
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:So you don't really understand how any of this code works? Is it something you copied from the net? That someone else wrote and you have inherited?

You must return false from the submit handler function, which is the function al line 71 in your first post.

P.S. This actually doesn't have much to do with Ajax but with event handling.



Yes,you are right...I copied this code from the net...
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then I suggest you remove all the code you do not understand. Then move a small piece at a time back in as you learn what it does. Trying to work on a large piece of code that you do not understand, much of which may have nothing to do with what you are trying to accomplish, is going to be too much of an obstacle.

Post back here with problems you encounter as you add and understand what each part is trying to do.
 
reply
    Bookmark Topic Watch Topic
  • New Topic