Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Widget Message Box

I have created a widget in Dashcode to run in an iBooks.


The code in the main.js calls an 'alert' which displays a message box as follows:


try

{

if(Test !== 99999999) throw "Input an amount:";

}

catch(err)

{

errorMsg(err)

}


//the Error Message function:


function errorMsg(error)

{

txt="Input Error:\n\n";

txt+= error + "\n\n";

txt+="Click OK to continue..\n\n";

alert(txt);

}


This code works with the exception that in iBooks author the processed Error produces a Box with a Title like this:


"x-iBooks-th://6D8CF691-8F1B-4DCE-8828-ED2D7D24B544"


Input Error:


Input an Amount:


Click OK to continue..


Is there anyway within the jScript that you can either delete the title or change what is displayed?

Posted on Nov 10, 2013 7:04 PM

Reply
Question marked as Best reply

Posted on Nov 11, 2013 8:07 PM

After doing some reasearch I have established that an 'alert' title cannot be modified in jScript. As a solution I have created a 'textarea' and simply write the error messages to that location supported with a process to delete each message as required. Its probably a better solution because you dont need the user to tap the 'Ok' button to proceed.

3 replies
Question marked as Best reply

Nov 11, 2013 8:07 PM in response to adnixon

After doing some reasearch I have established that an 'alert' title cannot be modified in jScript. As a solution I have created a 'textarea' and simply write the error messages to that location supported with a process to delete each message as required. Its probably a better solution because you dont need the user to tap the 'Ok' button to proceed.

Widget Message Box

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.