Objects not showing post export

Topics related to using ToolBook for building web apps.

Re: Objects not showing post export

Postby Clifton » Fri May 16, 2014 6:42 pm

Of course, PowerPac functions do not actually work in "reader" mode. ToolBook is not able to execute JavaScript in its authoring environment. You must export your page to see the effect. I wonder if that is also a problem or misconception.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Objects not showing post export

Postby Robert Stevenson » Fri May 16, 2014 8:18 pm

Ahhhhh ... and now I see ... this only works once exported. Sounds like I need to create a native version with the old script and a web version with the PowerPac. My concern now is that the student may be able to simply enter the correct answer over and over again ... I guess I'll find out. Thank you again for hanging in their with my learning process. Appreciated!
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Objects not showing post export

Postby Clifton » Sat May 17, 2014 6:27 am

Attached is a little tbk that demonstrates your scenario. I've included a little bit of AE code to prevent objects from appearing and disappearing during the wait time (like if a person answered the question multiple times). If you set the parameter preventMultiDelay = true, then pgTBObjSet() will cancel any waiting timers on the object specified. This function is one of more powerful functions in the PowerPac in that it can manipulate nearly every object and property and some that are not even available to the normal AE system. Permitting multi-delays allows for interesting effects, but it may not be a good feature for this particular scenario—so it can be turned off in the parameters.

Not sure exactly what you intend to do with preventing multiple student answers, but it should not be a problem.
Attachments
pgTBObjSet_delay.zip
Example tbk (ToolBook v9.01 file)
(38.23 KiB) Downloaded 97 times
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Objects not showing post export

Postby Robert Stevenson » Sat May 17, 2014 10:26 am

Sweet! Just curious if post export this has to be tested on a server? I get the Javascript alert that "Page p0 does not exist and could not be loaded" when I attempt to preview the export locally.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Objects not showing post export

Postby Clifton » Sat May 17, 2014 3:09 pm

ToolBook v9.01 exports will NOT run from a local hard drive—hence the error regarding p0 not found. You must put the files on a web server. Best approach is to install XAMPP as a local server on your hard drive. It makes testing during development a lot easier. Once your start the XAMPP server, you just point your browser to http://[computer name or ip]/[folder location]/index.html
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Previous

Return to Web (DHTML) Development

Who is online

Users browsing this forum: No registered users and 4 guests

cron