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 6629481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:16:01+00:00 2026-05-25T22:16:01+00:00

A page on my site are auto-reloading every 15th second. It’s being done by

  • 0

A page on my site are auto-reloading every 15th second. It’s being done by using jQuery’s .ajax function.

My problem are, that everytime the page are being loaded by the user, the form in the dialogs work fine.
But when it’s reloaded automatically by the page itself, the inputs are being moved OUTSIDE the form.

Many on the internet writes, that it is possible to move it back into the form by appending a div into the first form found. My problem is, that when i try to move my “input-wrapper” back into the form, i get a hirachy-problem.

Can anyone help? Or point out an alternative solution?

My jQuery-script:

<script type='text/javascript'>
  var intval;
  var xmlhttp;
  function init() {
    $('#dialog:ui-dialog').dialog('destroy');
    $('.ui-dialog').dialog({ modal: true, draggable: false, resizable: false, autoOpen: false, open: function(event, ui) { stopTimer(); }, close: function(event, ui) { startTimer(); } });
    $('#targets').dialog({ width: 400, buttons: { 'close': { text: 'Luk', height: '30px', click: function() { $(this).dialog('close'); } }, 'submit': { text: 'OK', class: 'submit', height: '30px', click: function() { $(this).find('form').trigger('submit'); } } } });
    $('#targets" & id2 & "Opener').click(function() { $('#targets').dialog('open'); return false; });
  };
  function startTimer() { intval = setTimeout('ajaxRefresh()', 15000); };
  function stopTimer() { clearTimeout(intval); if(xmlhttp) xmlhttp.abort(); };
  function ajaxRefresh() { xmlhttp = $.ajax({ url: '/', data: {h: 'ok'}, beforeSend: function() { stopTimer(); }, success: function(result) { $('body').html(result); } } }) };
  $(document).ready(function() { init(); startTimer(); $('#targetsFormWrap').parent().appendTo('#targetsForm'); });
</script>

The HTML:

<div id='targets' class='ui-dialog' title='The Dialog Title' style='text-align: center; display: none;'>
  <form id='targetsForm' name='targetsForm' method='post'>")
    <div id='targetsFormWrap'>")
      <input id='input1target' name='input1target' type='text' value='' style='width: 95%; />
      <input id='input2target' name='input2target' type='text' value='' style='width: 95%; />
      <input id='input3target' name='input3target' type='text' value='' style='width: 95%; />
    </div>
  </form>
</div>
  • 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-05-25T22:16:02+00:00Added an answer on May 25, 2026 at 10:16 pm

    you are trying to add targetFormWrap to targetsForm right? so just do:

    $("#targetsForm").append($("#targetsFormWrap"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've done site scraping of secure page of any site on http by below
I have an auto complete box on my site. I'm using Tokeninput . When
I have an auto refresh script that refreshes a page every 3 seconds. The
I'm making a site with a background image on every page. The image is
I'm creating a site using jekyll.rb . I have a page called about.html: <div
I'm working on a 10 page web site with a database back-end. There are
I'm loading some feeds and displaying them as links on my site page. When
I'm looking for a way to programmatically reset a page to that page's site/feature
Each page of my site has 10 (almost) identical divs, varying only in the
Does anyone know of a site or page, or know the order of execution

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.