Making a button inactive until a slideshow is finished

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
baixiwei
Forum Newbie
Posts: 4
Joined: Thu Jun 24, 2010 1:53 pm

Making a button inactive until a slideshow is finished

Post by baixiwei »

Not sure whether this is a PHP question or an HTML question, but here goes. I'm designing an online survey. Participants click through a series of pages which are created using PHP. At the end of each page is an HTML form which includes a submit button and possibly some other form elements. The submit button transitions to the next page and at the same time passes on the data entered on the current and all previous pages.

Now, on a few of my pages, participants are supposed to view a slideshow created as an embedded swf file. They click through the slideshow using its internal navigation. On pages like this, I need to make sure that they have viewed the whole slideshow before they can go on to the next page. So, the submit button on pages like this should be either invisible or unclickable until the last slide in the slideshow is reached, at which time the button appears or becomes clickable.

So my question is, how can I make the submit button's behavior be dependent on their usage of the embedded swf file in this way?

Or would it be better just to create a frameset and make the slideshow as a series of HTML files within one frame instead of as an embedded swf file?

Thanks a lot in advance!
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Making a button inactive until a slideshow is finished

Post by JakeJ »

It's actually a javascript question. But I don't know javascript well enough to advise you. Only well enough to point you in the general direction.
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: Making a button inactive until a slideshow is finished

Post by cpetercarter »

It depends on the swf object. Some objects are designed so that they trigger "events" when certain things happen eg a "start playing" event or a "I have reached the last slide in this slideshow" event. These "events" are often wrapped in a thing called a "Javascript API", which means that they can be picked up in Javascript and used to change the status of things on the web page, such as your submit button, or to send an Ajax request back to the server etc. But without knowing a lot more about your slideshow, we cannot give you more advice.
baixiwei
Forum Newbie
Posts: 4
Joined: Thu Jun 24, 2010 1:53 pm

Re: Making a button inactive until a slideshow is finished

Post by baixiwei »

Thanks for your reply! Actually, the swf is not made yet, I can pretty much make it whatever it needs to be in order for it to work.
Post Reply