June 7th, 2001, 03:12 AM
Join Date: Jan 2001
Time spent in forums: < 1 sec
Reputation Power: 13
I am trying to produce an application where the user
will be able to specify the file in the server where he
want to store some data. Now if the user selects an
existing file, the cgi at the server should be able to detect
that and should give the user a warning message.
Now I am doing the thing in the following way.
When the user writes the name of the file and
submits the form, the cgi script in perl detects
whether it is an existing one and sends a
confirm('overwrite') if the file exists already.
Depending on the user's choice to overwrite
or not the form is either submitted or not.
At present I made the confirm dialog box to appear
when the second page was getting loaded using
function, it is not getting submitted because I had not started
var exists =String(exists);
var file =String(file);
if (exists =='yes')
answer =confirm('Overwrite existing file');
if (answer == 'true')
Is there a way to solve my problem.
Am I doing things in the right way or is there any other better
way to solve my problem
I have one more doubt. Is it possible to load a page based one
Is it possible to call a function when a hidden element in the
form is changed.
Could anyone please help...
Last edited by Dups : June 7th, 2001 at 03:18 AM.