rdabate
asked on
Question with code for a submit button?
Hello, I am using IXLA Web Easy to create my site, I don't know real code so that's way I use this software. I created a submittal form that needs to be sent to an email address. When I use there submit button and code
It uses the email program on your computer to send that form. I would like to make this into a real
Form that you would see on professional site, so when I click the button It will go do it all online and send you to another page with a message saying "Form Sent" or something like that. If anyone can help me out that would
Be great. The below text is the code that the button gives me to use.
VALUE="Send Details" OnClick="
this.form.action='mailto:r dabate@yah oo.com?sub ject=Estim ating Sheet Online';
this.form.method='post';
if(!(IE && MAC && V4 && !V5)) this.form.encoding='text/p lain';
var str='\r\n';
var lyrs=(window.document.laye rs && window.document.layers.len gth);
for(var i=0; i<(lyrs?window.document.la yers.lengt h:1); ++i)
{ var fms=(lyrs?window.document. layers[i]. document.f orms:windo w.document .forms);
for(var j=0; j<fms.length; ++j)
{ for(var k=0; k<fms[j].elements.length; ++k)
{ var obj=fms[j].elements[k];
var itm=null;
if('text,textarea,password ,file'.ind exOf(obj.t ype.toLowe rCase()) >= 0)
{ if( (itm=obj.value) == '')
{ alert('Please enter required information in the field.');
obj.focus();
return(false);
}
}
else if(obj.type.toLowerCase(). indexOf('s elect') >= 0) { itm=obj.options[obj.select edIndex].t ext; }
else if(obj.type.toLowerCase() == 'checkbox') { if(obj.checked) itm=obj.value; }
else if(obj.type.toLowerCase() == 'radio') { itm=(obj.checked?obj.value :null); }
if(itm != null) str += ' '+obj.name+'=\''+itm+'\'\r \n';
}
}
}
if(this.form.elements[this .form.elem ents.lengt h-1].type. toLowerCas e()=='hidd en')
{ this.form.elements[this.fo rm.element s.length-1 ].value = str; }
return(true);"
Thankyou for your time
Rick
It uses the email program on your computer to send that form. I would like to make this into a real
Form that you would see on professional site, so when I click the button It will go do it all online and send you to another page with a message saying "Form Sent" or something like that. If anyone can help me out that would
Be great. The below text is the code that the button gives me to use.
VALUE="Send Details" OnClick="
this.form.action='mailto:r
this.form.method='post';
if(!(IE && MAC && V4 && !V5)) this.form.encoding='text/p
var str='\r\n';
var lyrs=(window.document.laye
for(var i=0; i<(lyrs?window.document.la
{ var fms=(lyrs?window.document.
for(var j=0; j<fms.length; ++j)
{ for(var k=0; k<fms[j].elements.length; ++k)
{ var obj=fms[j].elements[k];
var itm=null;
if('text,textarea,password
{ if( (itm=obj.value) == '')
{ alert('Please enter required information in the field.');
obj.focus();
return(false);
}
}
else if(obj.type.toLowerCase().
else if(obj.type.toLowerCase() == 'checkbox') { if(obj.checked) itm=obj.value; }
else if(obj.type.toLowerCase() == 'radio') { itm=(obj.checked?obj.value
if(itm != null) str += ' '+obj.name+'=\''+itm+'\'\r
}
}
}
if(this.form.elements[this
{ this.form.elements[this.fo
return(true);"
Thankyou for your time
Rick
Just a short comment here. You say you want something that is professional looking, and also say you don't know how to code so you are using a tool to generate it. The two are not compatible. If you want something on a professional level then you either need to learn to work with code directly, or you need hire a professional. No offesnse intended, but tools will not help you develop profession level product if you use then as shortcuts instead of learning to code.
As Ant already pointed out a real form needs a server side script to process it. So I thein k we will need to know what you have available.
Cd&
As Ant already pointed out a real form needs a server side script to process it. So I thein k we will need to know what you have available.
Cd&
ASKER
I have a site that I registered threw Yahoo. The site is stored on Yahoo geocites.
Ahhh....now I'm sure they have a free form-to-email script that you can use. I'll try and find more details for you.
:o)
Ant
:o)
Ant
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you can't get to the link above, then log in to Geocities and then try going to it
:o)
Ant
:o)
Ant
Wrapping this question up.
Please see my previous comments for the solution in this case.
:o)
Ant
Please see my previous comments for the solution in this case.
:o)
Ant
For it to be "professional" as you put it, the email actually needs to be sent from the webserver - basically you need a webserver that haas server-side scripting support... e.g. PHP, ASP, Perl etc.
Do you have anything like this available to you?
If you don't then there are free services you can use, but the best option is to have everything on your own server.
:o)
Ant