close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Progress bar just keeps spinning, form never submits

Thread began 10/23/2015 7:12 am by gstoyle396649 | Last modified 10/23/2015 3:37 pm by Ray Borduin | 2774 views | 7 replies |

gstoyle396649

Progress bar just keeps spinning, form never submits

I'm trying to put a progress bar on a simple login form (using your mysqli user authentication).

When the form is submitted the progress bar appears, but it never goes away and the form is not submitted.

I've tried the same on a few other forms and the same thing happens.

Sign in to reply to this post

Ray BorduinWebAssist

If you give me the url to the page I can take a look.

Sign in to reply to this post
Did this help? Tips are appreciated...

gstoyle396649

I'm working on localhost so that's not possible at the moment I'm afraid.

However, all I have done is apply the progress bar to a form as I've done many times.

The code on the page is very simple - the only difference being it uses the mysqli extension. This is the first project I've done which uses that...and is the first one where the progress bar doesn't work.

I can provide the code...

<?php require_once('Connections/conn.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
<?php
@session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["project"] = "".((isset($_POST["project"]))?$_POST["project"]:"") ."";
}
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$Authenticate = new WA_MySQLi_Auth($conn);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "User";
$Authenticate->Table = "sms_projects";
$Authenticate->addFilter("login", "=", "s", "".((isset($_POST["username"]))?$_POST["username"]:"") ."");
$Authenticate->addFilter("pwd", "=", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."");
$Authenticate->storeResult("login", "username");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "index.php";
$FailedRedirect = "login.php";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();
}
?>
<!doctype html>
<html>
<head>
<script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
</head>

<body>
<fieldset>
<legend>
<h2>Login</h2>
</legend>
<div id="form1_ProgressWrapper">
<div id="form1_ProgressWrapper">
<form action="" method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td width="12%">Project:</td>
<td width="88%"><p>
<label>
<input type="radio" name="project" value="cerp" id="project_0">
CERP</label>
<label>
<input type="radio" name="project" value="seb" id="project_1">
Sebastian River</label>
<br>
</p></td>
</tr>
<tr>
<td>Username:</td>
<td><input type="text" name="username" id="username"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="submit" id="submit" value="Login"></td>
</tr>
</tbody>
</table>
</form>
</div>

</div>

</fieldset>
<div id="form1_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('form1', 'form1_ProgressMessageWrapper', WADFP_Theme_Options['Bar:CaboSunset']);
</script>
<div id="form1_ProgressMessage" >

<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/cabo-bar.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>
</div>
</body>
</html>

Sign in to reply to this post

Ray BorduinWebAssist

It has nothing to do with the server side code.

It looks like you have this line of code repeated:
<div id="form1_ProgressWrapper">
<div id="form1_ProgressWrapper">

that may be the issue.

Sign in to reply to this post
Did this help? Tips are appreciated...

gstoyle396649

I'm not sure how that line of code got repeated.

However, I have removed it and the problem still exists. The progress bar appears but the form doesn't submit - I have to close the tab to clear it.

Here is the code without the repeated line...

<?php require_once('Connections/conn.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
<?php
@session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["project"] = "".((isset($_POST["project"]))?$_POST["project"]:"") ."";
}
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$Authenticate = new WA_MySQLi_Auth($conn);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "User";
$Authenticate->Table = "sms_projects";
$Authenticate->addFilter("login", "=", "s", "".((isset($_POST["username"]))?$_POST["username"]:"") ."");
$Authenticate->addFilter("pwd", "=", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."");
$Authenticate->storeResult("login", "username");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "index.php";
$FailedRedirect = "login.php";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();
}
?>
<!doctype html>
<html>
<head>
<script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
</head>

<body>
<fieldset>
<legend>
<h2>Login</h2>
</legend>
<div id="form1_ProgressWrapper">
<form action="" method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td width="12%">Project:</td>
<td width="88%"><p>
<label>
<input type="radio" name="project" value="cerp" id="project_0">
CERP</label>
<label>
<input type="radio" name="project" value="seb" id="project_1">
Sebastian River</label>
<br>
</p></td>
</tr>
<tr>
<td>Username:</td>
<td><input type="text" name="username" id="username"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="submit" id="submit" value="Login"></td>
</tr>
</tbody>
</table>
</form>
</div>

</fieldset>
<div id="form1_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('form1', 'form1_ProgressMessageWrapper', WADFP_Theme_Options['Bar:CaboSunset']);
</script>
<div id="form1_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/cabo-bar.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>
</div>
</body>
</html>

Sign in to reply to this post

Ray BorduinWebAssist

The issue is that you have an id of your form button set to "submit", which is a reserved name in forms since forms have a .submit() method. Just change the button ID and it should fix the problem.

Sign in to reply to this post
Did this help? Tips are appreciated...

gstoyle396649

OK that's done it, thanks.

Do you specify that anywhere in the documentation?

Sign in to reply to this post

Ray BorduinWebAssist

We don't document html and javascript in general. Here is a list of reserved words in html and javascript:

http://www.w3schools.com/js/js_reserved.asp


you should avoid all of these in IDs and variable names. You can see that submit is on the list. This isn't just true for our extensions it is for building web pages in general.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...