Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Sending a HTML Form at a certain time of day

  • 05-07-2016 10:53am
    #1
    Registered Users, Registered Users 2 Posts: 769 ✭✭✭


    Can this be done with Javascript??

    I know you can set a delay and send it after a period of time.....but can you send a form with a dropdown at a specific time?


Comments

  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    Can this be done with Javascript??

    I know you can set a delay and send it after a period of time.....but can you send a form with a dropdown at a specific time?

    Do you want to send it from a web application or from a computer?

    If just from your computer I would use python and the requests library to construct the request, and then just set the script to run at a specific time.

    Alternatively use curl to construct the request and again, set it to run.


  • Registered Users, Registered Users 2 Posts: 1,717 ✭✭✭Raging_Ninja


    Depends. Javascript isn't really a server side language. You could create an application and (if using windows) use the Task Scheduler to run it. But not enough info to go on here.

    What do you mean by "sending a HTML form"? Is this an email you want sent? Or are you sending a file to an API endpoint?


  • Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭biko


    I'm confused too. Do you want people to be able to fill in a form at any time of day, but only send it somewhere at a particular time?


  • Registered Users, Registered Users 2 Posts: 769 ✭✭✭EIREHotspur


    Thanks for all the replies guys.

    It is Notifications for Apps.

    HTML page with a form.....would like the option to send at a specific time of Day or days into the future.

    Thing is I do not control the server that processes the form...


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    This is almost certainly something you'd want to do server side not client side.

    Even if you use JavaScript to delay the submit from the client, you'd then need to persuade your users to leave their browser open and on the web page until the allotted time.

    Time to rethink your architecture I'm afraid.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 403 ✭✭counterpointaud


    Thanks for all the replies guys.

    It is Notifications for Apps.

    HTML page with a form.....would like the option to send at a specific time of Day or days into the future.

    Thing is I do not control the server that processes the form...

    "HTML page" and "form" kind of suggest a client-server architecture, in which the client asks the server when it wants something. Server-push/push notifications is a different beast.


  • Registered Users, Registered Users 2 Posts: 769 ✭✭✭EIREHotspur


    Ah ok.....no problem....I see what you mean.

    There are solutions out there to put up your own server to do them but beyond my knowledge I'm afraid so will have to forego it.

    Thanks lads.


  • Registered Users, Registered Users 2 Posts: 6,262 ✭✭✭Buford T Justice


    If you have the form locally on your machine then you could look to using something like selenium, though you would need to have the machine on for it to run


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    Ah ok.....no problem....I see what you mean.

    There are solutions out there to put up your own server to do them but beyond my knowledge I'm afraid so will have to forego it.

    Thanks lads.

    Do you want to explain what you need this for? Many of us have the skills to stick a server online and give you access. Theres a ton of free solutions out there. You could use OpenShift which is Red Hats free cloud service to upload your code and set up a cron job to send the message. Its really not that hard and we'd be happy to help.


Advertisement