• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Java Scripts help please !!

I've now looked at so many sites etc.....I just don't know how to add it all into the existing form....

Basically, you need to change the action attribute of your form to point to the page which will process it, something like

<form name="order_form" action="processform.aspx" method="post">
 
Basically, you need to change the action attribute of your form to point to the page which will process it, something like

<form name="order_form" action="processform.aspx" method="post">

Can you help with this, as I've mentioned its worth some beer money to me.....

PM me if you can help.
 
He isn't using a form though. Does he need to bung one in or can the post and method things be done from jscript?
 
It seems his entire site is HTML, i.e a front-end only. I'm of the view any real online business will benefit from having something running on the server... let users login to see the status of their order, let them ask questions through the website, etc.


edit: It might make the printing part much easier. I'm not sure how much a barrier it is giving users detailed instructions, and making them print that quite messy form onto multiple pages. A server part would let you save an electronic copy immediately for your own use, and you could generate a PDF or other special printable version on the server which the user can then print... you can even email a copy to the user or something if you like.
 
Last edited: 13:52
Did a quick messy fix that works from my desktop. Click the submit button, leave cosmetic details to you. Change this:-

<TD><A class=style9 onclick=printpage()
href="http://www.easyslidescanning.com/order.html#"
value="Print Copy of Order Form">PRINT PAGE</A> <BR><SPAN
style="FONT-WEIGHT: normal" class=style9>then</SPAN> <BR><A class=style9
href="http://www.easyslidescanning.co.uk/">Click then go to home page</A>
</TD></TR></TBODY></TABLE><!-- Start of StatCounter Code -->

To this:-

<TD><A class=style9
href="http://www.easyslidescanning.com/order.html#"
value="Print Copy of Order Form">

<form onSubmit="printpage()" action="http://xoggoth.org/praise/xogpraising.cgi" method="post" name="eorder">
<input type='hidden' name="recipient" value="xoggoth@xoggoth.org"/>
<input type='hidden' name="subject" value="Email xoggoth"/>
<input type='hidden' name="required" value=""/>
<input type='hidden' name="redirect" value="thankyou.html">
<input type='hidden' name="env_report" value="REMOTE_HOST">
<input type='hidden' name="print_blank_fields" value="1">
<input type='hidden' name="redirect" value="thankyou.html">
<INPUT name=submit type=submit value=Submit>
</FORM>

</A> <BR><SPAN
style="FONT-WEIGHT: normal" class=style9>then</SPAN> <BR><A class=style9
href="http://www.easyslidescanning.co.uk/">Click then go to home page</A>
</TD></TR></TBODY></TABLE><!-- Start of StatCounter Code -->

Upload that (use new page!!) and clicking submit should print plus it sends an email to ME. That is obviously not terribly useful to you (or me as is using my bandwidth) so the next thing is to change the http://xoggoth.org/praise/xogpraising.cgi in the action to refer to a mailer on your server. That is just freeware formmail in perl, if you can use perl, message me and I can send you copy. Lots of other freeware mailers available, usually all you have to do is change recipient, some of above form fields and upload.

Security is another problem.
 
Last edited: 14:09
Actually think you can just test it out with your mail in recipient above and replace thankyou page by one of your own. Obviously would not want my mailer used indefinitely plus association of a business with unsavoury ranty xoggoth is not a plus point.
 
thanks - I'll give it a go now.

How can I get the cgi script onto my server then ?
 
<input type='hidden' name="recipient" value="xoggoth@xoggoth.org"/>

{snip}

Security is another problem.

Having the recipient address in there means you just created an open mail relay for use by spammers everywhere. The recipient address should be kept on the server, or at the very least checked (on the server) against a whitelist of valid recipients.
 
Actually think you can just test it out with your mail in recipient above and replace thankyou page by one of your own. Obviously would not want my mailer used indefinitely plus association of a business with unsavoury ranty xoggoth is not a plus point.
.

ok - I've given it a go

www.easyslidescanning.co.uk/order1.html

Get an error from your CGI script. I need to tidy the submit button up - but if we can sort out the cgi we may be onto a winner. Can you send me the cgi script please.....
 
I see there is an anti spam referers field in the cgi which may explain that but it obviously knows perl so appears almost there. Will send script. Although is freeware, terms do not allow post on net.

PS Link in your private messages
PPS It would be a bit of a prob if sites could access mailers on others come to think of it.
 
Last edited: 15:39

Advertisers

Back
Top