Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

automatically submitting on time-out

Featured Replies

I have a database which operates as a test. I want to put an automatic time limit of 80 minutes on it. I can obviously do this with javascript, but how could I get it to automatically submit an -edit command upon the 80 minutes? I can't really do it with a URL link instead, because of the variability of the field entries. Any ideas?

well you would put this between the head (<head></head> ) commands on you document

code:


<script language="javascript'>

<!---//

function sendit(){

alert("Your 80 minutes are up, this form will now be submitted")

document.forms[0].submit()

}

//--->

</script>


then put this in you body tag..

code:


<body 0nL0ad="setTimeout('sendit()',4800000)">


make sure you change the zero in 0nL0ad to the letter "o". couldn't submit the form with and onload tag in it.. which is a pain in the butt.

that should do it.. this is all assuming that the form is all on one page.

if the form spans many many HTML pages this is going to be much much harder to do..

[ April 04, 2001: Message edited by: bman ]

  • 2 weeks later...
  • Author

hm. it's not working. here's my code:

<HEAD>

<TITLE>Coaches Certification Test</TITLE>

<META NAME=GENERATOR CONTENT="Claris Home Page 3.0">

<X-CLARIS-WINDOW TOP=56 BOTTOM=607 LEFT=14 RIGHT=813>

<X-CLARIS-TAGVIEW MODE=minimal>

<script language="javascript'>

<!---//

function sendit(){

alert("Your 80 minutes are up, this form will now be submitted")

document.forms[0].submit()

}

//---></script>

</HEAD>

<BODY BGCOLOR="#FFF3D9" onl0ad="setTimeout('sendit()',60)">

the only thing i changed above is the "0" instead of the "o" in onload. hmm

what doesn't work.. does it just not submit.. or does it submit to soon. because you have a 60 in the set time out.. that should be a lot more than 60, settimeout is done it milisecond..so for 1 minute you 60000 so you 80 minutes you would need 4800000, as my original post said. so it should say

setTimeout('sendit()',4800000)

If thats not the problem than post again with a little more detail about the problem.

  • Author

Okay. Part of the problem was in the syntax, where I had typed "javascript' instead of "javascript" Luckily I still use claris home page so i could tell that the script wasn't "active" by the highlighting. Now, it does the auto-submit, but then i get an error 4 (unknown command) that doesn't occur if i manually submit it, it works fine. i'm not so good on javascript, so if you could help me figure out the offending command, i'd be very grateful! i'm psyched it's working this well already.

thanks

bevin

hmmm...

well normally you would submit with a submit button so you would have code that looked similar to this

<input type="submit" name="-new" value="submit">

or something similar, correct?

well since you are not submitting it with that button you need to find another way of putting that -new in there somewhere. so just go ahead and put this code right near the submit button, probably just before it.

<input type="hidden" name="-new">

that might fix it.. if you have already done that then i'm not sure what the problem will be...

oh and sorry about putting the wrong quotes around javascript.. just looked at my first post and that was my fault.. guess i was typing it in a hurry. laugh.gif" border="0

[ April 16, 2001: Message edited by: bman ]

  • Author

okay, genius boy, you're hired. thanks a lot!!!!! smile.gif" border="0

  • Author

i'll pay you the satisfaction and praise everytime you answer my questions! wink.gif" border="0

woohoo.. sounds good to me.. but satifaction and praise aint gonna get me that new house. haha

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.