creating a basic feedback form BUT not to an email address
northernneil
Posts: 1,549
come on techy people.
I want to create a simple feedback form name, address, message etc but instead of sending to an email address or a .php file when you click submit I want it to create a txt file locally on the machine with theb info in i.e:-
c:\feedback.txt
any idea of the code for that ?
I want to create a simple feedback form name, address, message etc but instead of sending to an email address or a .php file when you click submit I want it to create a txt file locally on the machine with theb info in i.e:-
c:\feedback.txt
any idea of the code for that ?
0
Comments
-
you need to write a perl script which will be held in the cgi folder on your website server.
You then call the script from the input button on your web page.
The code is fairly simple but do you have the server access required to implement it?Tri Coaching
https://www.h3otriathlon.com0 -
northernneil wrote:come on techy people.
I want to create a simple feedback form name, address, message etc but instead of sending to an email address or a .php file when you click submit I want it to create a txt file locally on the machine with theb info in i.e:-
c:\feedback.txt
any idea of the code for that ?
Just to be clear, you want your website to write a file back to your local PC? What's the problem with emailing it?0 -
its for a gsce project - its not a 'live' website just need a small bit of html that I can paste into dreamweaver that will give me answer to a couple of questions in a c:\answer.txt file as evidence.
your help is appreciated0 -
I don't believe you can do what you want with HTML. Even if you create a local web site on your PC to write to your own PC you will have to install a local Apache server on your PC and run a form of script to do what you want.
It sounds complicated but is actually very easy.
This book would tell you everything you need and is very simple
http://www.amazon.co.uk/PERL-Easy-Steps-Mike-McGrath/dp/1840782609/ref=sr_1_1?s=books&ie=UTF8&qid=1300744943&sr=1-1Tri Coaching
https://www.h3otriathlon.com0 -
cheers for your help,0
-
I thought the idea of exams is that you researched and found and answer YOURSELF.
Asking someone to tell you what to do is cheating.--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0 -
andrewjoseph wrote:I thought the idea of exams is that you researched and found and answer YOURSELF.
Asking someone to tell you what to do is cheating.
not been at school for a long time have you !
google has a LOT to answer for0 -
for something simple like that, I would probably use javascript on the client-side to append results to the textfile.
funtion like this...in the page head
<script language="javascript">
function WriteToFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\Test.txt", true);
s.WriteLine('Hello');
s.Close();
}
</script>
then call the function on submit of your button input element.
obviously, your WriteToFile function will need to accept the various strings you want to write as parameters etc, use the DOM to find the elements and pass their values through on the onclick event......but this is a good starting point.
simple.Whenever I see an adult on a bicycle, I believe in the future of the human race.
H.G. Wells.0 -
Does it have to write to a specific file? Can't you just write the information to a cookie? All other methods will be a hack and only work on certain browsers. The example posted above will only work in certain versions of Internet Explorer with various security warnings. The reason being that a website should not really be writing to any arbitrary file on the users' file system for obvious security reasons.Bianchi Via Nirone Veloce/Centaur 20100
-
andrewjoseph wrote:I thought the idea of exams is that you researched and found and answer YOURSELF.
Asking someone to tell you what to do is cheating.
Surely looking in a book is exactly the same as asking someone else, simply in a different format no?0 -
CyclingBantam wrote:andrewjoseph wrote:I thought the idea of exams is that you researched and found and answer YOURSELF.
Asking someone to tell you what to do is cheating.
Surely looking in a book is exactly the same as asking someone else, simply in a different format no?
No, looking in a book is research, the book may well give examples, but you will have to work out what changes you need to do yourself.
Asking someone else for the answer, is lazy and cheating.--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0 -
What do you do at work?
In this examply, the OP will have the skill to do the task if once somebody has told him.
Fair enough if it was Mathematics and he was simply getting the numerical answer and not the workings.
I think School has moved on since a few years ago (wish I had the internet whe I was at school)0 -
northernneil wrote:andrewjoseph wrote:I thought the idea of exams is that you researched and found and answer YOURSELF.
Asking someone to tell you what to do is cheating.
not been at school for a long time have you !
google has a LOT to answer for
School? 34 years ago.
Nursing, started 30 years ago, stopped 20 years ago.
O.U. 5 years ago.
The principle of learning doesn't change. you don't learn properly unless you work through the whole problem yourself. Getting the answer without understanding it is not learning.--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0 -
CyclingBantam wrote:What do you do at work?
In this examply, the OP will have the skill to do the task if once somebody has told him.
Fair enough if it was Mathematics and he was simply getting the numerical answer and not the workings.
I think School has moved on since a few years ago (wish I had the internet whe I was at school)
I'm 'retired'. Due to injury at work. Doesn't stop me learning though.
And I doubt that the OP will have the skill to do the task by just following advice from here, unless the task is almost identical to the one he cheated in. He will not have learnt the process, just cut and pasting. He will not have learnt that there are not shortcuts to learning. He will come away with attitude that he can cheat his way through life.--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0 -
It looks to me like he will know how to do a task that he doesn't currently. In future, should he need to do it again, he will be able to, in exactly the same way had he read it in a book (which is simply someone telling him how to do it with the exception of them having written it down first).
Still, I guess we just disagree.0 -
-
Rick Chasey wrote:If it was an exam, how would he be asking on a forum?
my mistake, he said project, I inferred exam.
to me, the principle is the same.
His project, his work.--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0 -
andrewjoseph wrote:Rick Chasey wrote:If it was an exam, how would he be asking on a forum?
my mistake, he said project, I inferred exam.
to me, the principle is the same.
His project, his work.
It's a good job you're not a librarian.0 -
pst88 wrote:Does it have to write to a specific file? Can't you just write the information to a cookie? All other methods will be a hack and only work on certain browsers. The example posted above will only work in certain versions of Internet Explorer with various security warnings. The reason being that a website should not really be writing to any arbitrary file on the users' file system for obvious security reasons.
Correct, Correct and Correct.
However for a small, locally hosted, sandbox simulation like the one being described here.....works perfectly.
Other solutions are available. This one requires no further tech. Doesn't even need a web server.
for a simple gcse project.....on a local machine, and you guys are talking about installing a web server and mod_perl/php?Whenever I see an adult on a bicycle, I believe in the future of the human race.
H.G. Wells.0 -
--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0 -
andrewjoseph wrote:Rick Chasey wrote:If it was an exam, how would he be asking on a forum?
my mistake, he said project, I inferred exam.
to me, the principle is the same.
His project, his work.
Just so I understand you, are you saying the only way you believe someone should find something out is via a book? Otherwise it is cheating?0 -
CyclingBantam wrote:
Just so I understand you, are you saying the only way you believe someone should find something out is via a book? Otherwise it is cheating?
Not at all, it doesn't have to be a book, it can be through experiment, testing etc.
It does however have be in a form where the person makes an effort to understand the method.
if the OP had posted up here asking for help, showing what he had tried but not able to get the results he wanted, then I'm all for giving advice. e.g. Here is what I've done : 'bits of code here there and everywhere', this is what I want: 'example of what I want'.
Then we can see that they are trying to do something for themselves.
If he had said: the info I've got says this, but I'm not sure what the 'gubbins' means, can someone explain it to me?
then we can see that they are trying to understand.
But he has asked for: code he can paste into dreamweaver. Where is the effort to learn in that? He has asked for someone to give him the answer so he doesn't have to think himself.--
Burls Ti Tourer for Tarmac, Saracen aluminium full suss for trails0