Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
05-03-2012, 11:31 PM #1
- Join Date
- May 2012
- Thanked 0 Times in 0 Posts
how to embed ajax/jquery form in html template
I have been struggling with this for the past 2 days. I can't get it to work. I don't know much coding, but usually I do things by trial and error and get things to work. But this time, I give up. I need help.
I have downloaded the template located here: http://www.sendspace.com/file/agsytv
you see how on the homepage there are 3 tabs: flight, hotel, rental?
I want this part to function as a quote request form.
When someone fills out this form and presses submit, they should get a message in that same box saying "thank you for your message...blah blah"
the page should not refresh.
I have downloaded several ajax contact us forms, but I don't know how to integrate these into the html page.
here is one cool form (there is demo and download)
here is another one: http://www.brightcherry.co.uk/scribb...th-validation/
how do I do this?
here is the result of my work if you want to see it (obviously form does not work)
language (dot) comxa (dot) com
05-04-2012, 02:21 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 Posts
Users who have thanked Fou-Lu for this post:
05-04-2012, 03:47 PM #3
- Join Date
- Jan 2006
- Halle (Saale), Germany
- Thanked 1,091 Times in 1,063 Posts
At the very first you have to be clear about the fact that JS can be disabled so make sure that your form is working without JS before you go about AJAX and all that stuff. Then I guess the following is clear to you but I’m gonna say this anyway: it doesn’t help do not know what you’re doing when you wanna do something. Building a website properly requires more than just trial and error. That said, the tutorial you linked to actually explains everything pretty well, you just have to take the time to actually read stuff, not just copy and paste the demo code. I know, this requires discipline and takes a little time but honestly, that’s what I (and I guess every decent coder here) expect from someone who wants to implement advanced features in their website(s).
Now, I’m not gonna do your work, that’s what people usually get hired and paid for by people that have no clue about the technical stuff and still want a fancy website. Assuming that this is not an option for you I’m gonna give you some hints to help you in your learning experience:
- Validate your code. Valid HTML is helping very much in having a properly functioning website.
The second line of the code above is the jQuery plugin. You need to make sure the file path is correct, otherwise the browser can’t find it. And the rest is the script invoking the actual functionality of the plugin on your page.
- Your form has an
So, you’ve got a long way ahead of you and unless you’re really aiming to learn web development I’d suggest to hire someone to implement that for you.