close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Progress Bar for links

Thread began 10/07/2015 2:14 pm by wdtp.com | Last modified 10/08/2015 3:52 pm by Ray Borduin | 541 views | 5 replies |

wdtp.com

Progress Bar for links

Is it possible to use a Progress Bar with a link instead of a form?

For example, if a user click a link to a page with complex PHP calculations that requires a few seconds to render can the Progress Bar be implemented and triggered from a link completely separate from any form?

Sign in to reply to this post

Ray BorduinWebAssist

Yes, but the easiest way would be to still use a form. Add a form with a progress bar without any form elements in it and even add style="display:none" so the form doesn't actually display.

Set the form action to the page you want to link to and have the link submit the form.

Do that by adding a function to the page like:

<script>
function doProgress() {
WADFP_jQuery('#form1').submit();
}
</script>



then the link would be something like: <a href="javascript:doProgress()">go</a>

Sign in to reply to this post

wdtp.com

Thanks for the quick reply!

In this case there are several links on the page that I would love to trigger the Progress Bar with and I'd like to avoid setting up individual invisible forms for each link. What's the harder way to trigger without a form?

Sign in to reply to this post

Ray BorduinWebAssist

I'd still use the form... just update the function to allow you to pass in the link url.

<script>
function doProgress(url) {
document.getElementById("form1").setAttribute("action",url);
WADFP_jQuery('#form1').submit();
}
</script>

<a href="javascript:doProgress('pageurl.php')">go to page</a>
Sign in to reply to this post

wdtp.com

Thanks! The problem now though is that the URL needs to have a query string that is not getting passed along with the form. I guess I could add the fields to the invisible form and then get the link to set the values when clicked which then submits the form which passes the correct query string. That seems like a lot of trouble. I was hoping there was an easier way to trigger the Progress Bar to appear outside of a form submit event like an onClick event.

Sign in to reply to this post

Ray BorduinWebAssist

If you change the form method to post it will maintain the url parameters you pass in.

Sign in to reply to this post

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...