Is there a way to put in a progress bar or disable submit button to keep user from double clicking or leaving page before uploads are complete. I tried Andy's ajax uploader, which is nice, but not workable in a situation where user might upload images in any order
Nov 10, 2011, 12:33 AM
Veteran / Moderator (18436 posts)
Nov 10, 2011, 12:33 AM
Post #2 of 9
Views: 6484
Hi,
You could try changing the button, so its something like:
..then for the buttons in modify.html/add.html, add in:
..to the submit button.
I've tested this locally, and it looks like it works fine
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
You could try changing the button, so its something like:
Code:
<form method="POST" action="<%config.db_cgi_url%>/add.cgi" onsubmit="document.getElementById('submit_button').disabled = true">..then for the buttons in modify.html/add.html, add in:
Code:
id="submit_button"..to the submit button.
I've tested this locally, and it looks like it works fine

Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Nov 10, 2011, 8:02 AM
Veteran / Moderator (18436 posts)
Nov 10, 2011, 8:02 AM
Post #4 of 9
Views: 6452
Hi,
Do you have the enctype="" multipart bit in the <form ? Without that, it will *try* to send the file - but GLinks won't be able to grab the file
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Do you have the enctype="" multipart bit in the <form ? Without that, it will *try* to send the file - but GLinks won't be able to grab the file
Code:
<form .... enctype="multipart/form-data">Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Nov 10, 2011, 9:41 AM
Veteran / Moderator (18436 posts)
Nov 10, 2011, 9:41 AM
Post #6 of 9
Views: 6442
Hi,
Send over FTP + GLinks info via email, and I'll take a quick look for ya
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Send over FTP + GLinks info via email, and I'll take a quick look for ya
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Nov 10, 2011, 2:38 PM
Enthusiast (559 posts)
Nov 10, 2011, 2:38 PM
Post #7 of 9
Views: 6439
I use a separate page in an iframe but it might work in the add template.
First off find a loading gif (plenty on google image search) and upload it to your image directory.
On the add.html template (if that's what you're using) add the following (in red):
<%include include_form.html%>
<script language="javascript" type="text/javascript">
function showTable() {
document.getElementById("image").style.display = "block";
}
function hideTable() {
document.getElementById("image").style.display = "none";
}
window.onload = hideTable;
</script>
<div class="formsubmit">
<input type="reset" name="reset" value="Reset" class="submit" />
<input type="submit" name="add" value="Submit" class="submit" onClick="showTable()" />
</div>
<div>
<img src="/image_directory/loading.gif" width="" height="" alt="Loading">
</div>
</form>
I don't know if it will work in your situation but it's worth a try.
First off find a loading gif (plenty on google image search) and upload it to your image directory.
On the add.html template (if that's what you're using) add the following (in red):
Code:
<form action="<%config.db_cgi_url%>/add.cgi" enctype="multipart/form-data" method="post"> <%include include_form.html%>
<script language="javascript" type="text/javascript">
function showTable() {
document.getElementById("image").style.display = "block";
}
function hideTable() {
document.getElementById("image").style.display = "none";
}
window.onload = hideTable;
</script>
<div class="formsubmit">
<input type="reset" name="reset" value="Reset" class="submit" />
<input type="submit" name="add" value="Submit" class="submit" onClick="showTable()" />
</div>
<div>
<img src="/image_directory/loading.gif" width="" height="" alt="Loading">
</div>
</form>
I don't know if it will work in your situation but it's worth a try.
Nov 11, 2011, 12:30 AM
Veteran / Moderator (18436 posts)
Nov 11, 2011, 12:30 AM
Post #9 of 9
Views: 6389
Sorry, should have replied. I got it working. The JS code was fine - but it was something weird going on with his add.html template (for some reason - add=1 was not being passed along to add.cgi, so it never knew you were trying to add the link - thus why there were no errors, and the link was never added :))
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!