On 28.9.2009, at 14:00, Philip Juel Borges wrote:


I have this javascript function in my test.html file which is loaded in the WebView:

function goToPage(mybox) {
window.location ='#' + mybox.value;
}



BTW the function as written above will not work - the parameter you are passing from Cocoa is not field, but already value string, so you need to change the function accordingly...

Okay then. How would I go about doing that? That isn't too clear to me.

--Philip


I'm sorry, I was not very clear.

The cocoa methods I suggested pass the value as the parameter, so your javascript function should look like this:

function goToPage( value ) {
  window.location ='#' + value;
}


And I'm still not sure this method of scrolling works, but this code should at least get your cocoa value into your javascript function.

izidor

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to