Re: Run Javascript Function From Objective-C.
Re: Run Javascript Function From Objective-C.
- Subject: Re: Run Javascript Function From Objective-C.
- From: Izidor Jerebic <email@hidden>
- Date: Mon, 28 Sep 2009 14:21:04 +0200
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 (email@hidden)
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:
This email sent to email@hidden