Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:20:44+00:00 2026-06-15T18:20:44+00:00

Since Instamapper is closing down and I am doing this project where I am

  • 0

Since Instamapper is closing down and I am doing this project where I am trying to get to the Moon counting how much km I have walked I tried to make my web app, which I could use instead. I got everything working except I wanted to automatically submit my form with data every 5 sec. I tried to use .submit() but it isn’t working.

EDIT:
The submit() function is not working, here is the error from the console:

Uncaught TypeError: Property ‘submit’ of object # is
not a function

Here is the code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"     type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    setTimeout(function(){
        $('form#target').submit();
    }, 5000);
    });
    </script>
<?php
if(isset($_POST['submit'])) {
    echo 'works';
}
$device = 'vPhone';
$date = new DateTime();
$timest = $date->getTimestamp();
?>
</head>

<body>
<form action="" method="post" id="target">
<input type="text" value="<?=$timest?>" name="timestamp" />
<input type="text" value="<?=$device?>" name="device" />
<input type="submit" name="submit" id="submit" />
</form>
<script>
var x=document.getElementById("target");
  if (navigator.geolocation)
    {
    navigator.geolocation.getCurrentPosition(showPosition);
    } else {x.innerHTML="Geolocation is not supported by this browser.";}
  function showPosition(position)
    {
      x.innerHTML += "<input type='text' name='lat' value='" + position.coords.latitude + 
  "' disable><br> <input type='text' name='lat' value='" + position.coords.longitude + "'     disable> "; }
</script>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:20:45+00:00Added an answer on June 15, 2026 at 6:20 pm

    It’s name="submit" id="submit" that’s causing the problem here. Change that to something else – anything, really, I used name="notsubmit" id="notsubmit" – and your form gets auto-submitted.

    Source: http://api.jquery.com/submit/#comment-106178333

    Apparantly these attributes somehow override the jQuery submit function so that it is no longer accessible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since I have no errors I don't know if this is the right place
since they have same rendering engine, this problem shows in both. it works great
Since this question is back to four votes to close, I'm trying again to
since this morning I keep getting this error when trying to launch my MVC
Since I am developing an iOS >= 5.0 application, I am trying to change
Since now I have only used plugin for editing and the way I use
Since this morning my local install of EE 1.6.8 is failing to load the
Since CS3 doesn't have a web service component, as previous versions had, is there
Since Javascript does not have any functionality by itself to communicate over raw sockets
Since multiple requests can slow down the speed at which a site loads, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.