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

main.js in Dashcode

When you run the widget in an iBook on an iPad the load process does not automatically start the function MainProgramProcessor();


To overcome this issue I have a button which has a click on event assigned to call the 'function MainProgramProcessor();' this works fine but I would like the process to be automated so that control passes to the code I have written to control the process when the widget is launched. [I hope that makes sense]


The following is the load function:



function load()

{

dashcode.setupParts();

// Default Date Value

var textFieldToChange = document.getElementById("textField7"); // replace with ID of text field

var newTextField = "dd/mm/yy"; // value to change range to

textFieldToChange.value = newTextField;


MainProgramProcessor(); //not working on startup

}

Posted on Oct 29, 2013 6:28 PM

Reply
1 reply

Oct 29, 2013 6:46 PM in response to adnixon

With a bit of further investigation the above routine is started but this code does not set the focus:


var Field = document.getElementById("textField"),

Field1 = document.getElementById("textField1");


if (Field.value === "")

{

document.getElementById("textField").focus();


}


You actually have to click on the textField to manually set the focus.

main.js in Dashcode

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