Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-17-2012, 02:56 AM   PM User | #1
mike316
New Coder

 
Join Date: May 2012
Posts: 19
Thanks: 7
Thanked 0 Times in 0 Posts
mike316 is an unknown quantity at this point
html contact form

hi guys
I have downloaded this template and I am almost done but I ran into a problem with the contact form.

the only kind of contact form i have seen is when you do <form action="script.php">
but this template has this weird thing, I dont understand how it works. Here is a picture:

how does the script send emails when the form has no action?

I am just wondering would I break anything if I change this to:


In other words, put form action at the top, and get rid of the getelementsbyid at the bottom?
I believe there is some javascript interactions here...will my website get messed up if i do the above change? will it maybe not work in some browsers or something?

if you need more information about the template, such as the style.css, reset.css, or the javascript files, the entire template can be downloaded from here: http://www.sendspace.com/file/agsytv

Last edited by mike316; 05-17-2012 at 02:59 AM..
mike316 is offline   Reply With Quote
Old 05-17-2012, 01:07 PM   PM User | #2
dan-dan
Regular Coder

 
dan-dan's Avatar
 
Join Date: Aug 2009
Location: England
Posts: 483
Thanks: 22
Thanked 79 Times in 78 Posts
dan-dan is on a distinguished road
You are correct that you'll need the action attribute to process the form. You'll also need the method attribute eg method="post".

The two anchors you removed were using a javascript method to process the form. I too would have done what you've done, as you won't depend on javascript being turned on.

I haven't looked at the attached files, but if there's CSS attached to this form, then you're going to need to re-add class="button1" to the submit button. Also, as it is now a button you'll need to add a couple of extra lines to get rid of the default button style.
Code:
background: transparent;
border: none;
Note you also missed the value attribute from the submit button.
dan-dan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:49 AM.


Advertisement
Log in to turn off these ads.