I am using evalJS to attempt to call a function in a webview and pass a parameter to that function. It will work perfectly if I pass a string but if I try to pass a variable nothing happens.
var calendarView = Ti.UI.createWebView(); calendarView.url = '../views/calendar_list_view.html';this will work fine
calendarView.evalJS(scrollDate('03/03/2011'));but if I try to pass a variable it does nothing
var date = "03/03/2011"; calendarView.evalJS(scrollDate(date));then the webview has a JS function
function scrollDate(date) { document.getElementById(date).scrollIntoView(); }