Link to home
Start Free TrialLog in
Avatar of sunnybrad
sunnybrad

asked on

Sending the form automatically to be processed by a server

Dear All:
I have to implement a monthly anniversary billing system.

Is there a way send the form automatically to be processed by some another server. I want to implement a perl program that runs everyday. I have to interact with a credit card server for it to work.  

A form based solution is easy but is there a way to send the form to server automatically without someone clicking the submit button.

Is this achieveable. Please let me know.

Thanks and Regards

sunnybrad
Avatar of xDamox
xDamox
Flag of United Kingdom of Great Britain and Northern Ireland image

I belive there is a javascript that does it,

Online banking site use it, why not make the java scrip like a timer and when it gets to a certian number it logs them out Java script below:


<script language="JavaScript">

<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var timerID = 0;
var tStart  = null;

function UpdateTimer() {
   if(timerID) {
      clearTimeout(timerID);
      clockID  = 0;
   }

   if(!tStart)
      tStart   = new Date();

   var   tDate = new Date();
   var   tDiff = tDate.getTime() - tStart.getTime();

   tDate.setTime(tDiff);

   document.theTimer.theTime.value = ""
                                   + tDate.getMinutes() + ":"
                                   + tDate.getSeconds();
   
   timerID = setTimeout("UpdateTimer()", 1000);


   if(timerID >= 10)
   {
     alert('Time is now');
     document.form.submit();
   }

}

function Start() {
   tStart   = new Date();

   document.theTimer.theTime.value = "00:00";

   timerID  = setTimeout("UpdateTimer()", 1000);


}

function Stop() {
   if(timerID) {
      clearTimeout(timerID);
      timerID  = 0;
   }

   tStart = null;
}

function Reset() {
   tStart = null;

   document.theTimer.theTime.value = "00:00";
}

//-->

</script>
<body onload="Reset()" onunload="Stop()">
<center><form name="theTimer"><table>
   <tr>
      <td colspan=3 align=center>
         <input type=text name="theTime" size=5>
      </td>
   </tr>
   <tr><td></td></tr>
   <tr>
      <td>
         <input type=button name="start" value="Start" onclick="Start()">
      </td>
      <td>
         <input type=button name="stop" value="Stop" onclick="Stop()">
      </td>
      <td>
         <input type=button name="reset" value="Reset" onclick="Reset()">
      </td>
   </tr>
</table></form></center>


hope this helps
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
(if supported on the server / by hostingservice...) you can schedule Perl-scripts for example with CRON. So you could schedule the above script (without the sleep-line) to run every thursday-evening at 10.00 pm for example.

Read all about it here:
http://www.techtutorials.com/tutorials/unix/cron.shtml
SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial