Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-21-2009, 07:13 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default send Objective C string to Java

I need to shoot a variable to my java script, which will basically load something different based on the variable...

I've found code on how to send Java to C...
in the Java:
function myName()
{

var Name = 'John';
return Name;
}

then in the Objective C:
NSString *stringToSend = [NSString stringWithFormat:@"myName()"];
NSString * cName = [webView stringByEvaluatingJavaScriptFromString:stringToSen d];
NSLog(@"The Name is %@", cName);


How would I do the opposite? Thanks in advance!
__________________
Check out our Apps!
Boxen4Oxen
VisCenter

Film Budget

Everwell TV
starwarsdevwookie59 is offline   Reply With Quote
Old 09-25-2009, 07:39 PM   #2 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

I need to get this done soon
__________________
Check out our Apps!
Boxen4Oxen
VisCenter

Film Budget

Everwell TV
starwarsdevwookie59 is offline   Reply With Quote
Old 09-26-2009, 05:57 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

:-)
__________________
Check out our Apps!
Boxen4Oxen
VisCenter

Film Budget

Everwell TV

Last edited by starwarsdevwookie59; 09-27-2009 at 05:09 PM.
starwarsdevwookie59 is offline   Reply With Quote
Old 09-27-2009, 05:27 PM   #4 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 157
Default

Anybody... PLEASE!! I really need this done, I'm on a deadline. I realize you guys are too, but, please? thanks.
__________________
Check out our Apps!
Boxen4Oxen
VisCenter

Film Budget

Everwell TV
starwarsdevwookie59 is offline   Reply With Quote
Old 09-28-2009, 04:47 PM   #5 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 791
Default

You do realize Java has nothing to do with javascript, which is what you seem to need ? Clear it up when you ask if you want people to actually try to take a look at it.
I don't have experience with that, but can't you just make up an URL with a GET parameter sending in your variable?
nobre84 is offline   Reply With Quote
Old 09-28-2009, 04:50 PM   #6 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,028
Default

I'm not sure if you are in a UIWebView or something like that; but what Nobre suggests is certainly an option, I did something similar once.
scotopia is offline   Reply With Quote
Reply

Bookmarks

Tags
java, objective, script, send, string

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 328
22 members and 306 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, djohnson, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:07 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0