Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript in perl cgi page 1

Status
Not open for further replies.

chance42

Technical User
Aug 5, 2004
22
US
Hello all,
It’s time once again to admit that I cannot do
everything myself and ask for help.

I have created a web based to-do list and have a bit of javascript that will tell when the last Task has been
completed no matter the order of completion.

The problem I am having is that upon the completion of the
last task I need to rename a file that is logging everything
but I cannot figure out how to have the javascript relay
that information to the PERL script.

I would like to just assign a variable based on the
exit status of the javascript if possible, So that I could
just have a line like:
Code:
if ($check = true) { do my bidding; }

Here is the javascript:
(The alert is just for testing and will not be used
during normal operaation.)

Code:
<script language="JavaScript" type="text/javascript">
function isform() {
element = document.getElementById("tasks");
  if (element == null) {
    alert("All tasks are complete.");
  }
}
</script>

right now I have it set up so when the last task listed is
submitted then the log file is renamed, but I found that the
users will do things out of order, causing tasked not to be logged.. I know it must be possable to do it this way, however I getting ready just to add an extra task that has the user confirm that the rest of the list is done.

I fairly sure it's simple and I'm just forgetting something.
But I've been at a loss for about three weeks.

Thanks for your time,

C
 
if "fcheck" is a checkbox,in moz/netcape:
document.FormName.checkBoxField.checked
 

Thanks arn0ld,

This is a sad example of the lack of in-depth
knowledge I have with Javascript.

I've been testing it in both Moz and IE but the debugger
has stopped showing errors...
I am currently using
Code:
document.tasks.fcheck.value = "done";
 
I am currently using
Code:
document.tasks.fcheck.value = "done";
"
So,
1. It is a checkbox?
2. Your are now using:
Code:
document.tasks.fcheck.checked = 1;
?
 

I have moved to the Javascript forum
the thread is titles "Sending data to an existing form"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top