Hi Adam
I am trying to execute following code which present in index.erb file
on blackberry platform. But my application gets hanged once alert
message “In Result” is displayed. Same javascript code working
successfully if tried on blackberry browser and if I test the appl. on
iphone then its working fine.
Here is the code from index.erb file (Ref for service -
http://developer.yahoo.com/common/json.html)
<script type="text/javascript">
function ws_results(obj) {
try{
alert("In result");
alert(obj.ResultSet.totalResultsAvailable);
}catch (ex)
{
alert("Error: "+ex+" Code = "+ex.code+" Message =
"+ex.message);
}
}
</script>
<script type="text/javascript" src="
http://search.yahooapis.com/
ImageSearchService/V1/imageSearch?
appid=YahooDemo&query=Madonna&output=json&callback=ws_results"></
script>
<h1 id="pageTitle">
MyThirdApp
</h1>
</div>
<ul id="home" selected="true" title="MyThirdApp">
<li>Add links here...</li>
</ul>
So please let us know how can we resolve this issue?
Below I am giving few end lines from log file
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getLength: 965
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
Accept-Charset
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHost: localhost
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection|
getRequestProperty: referer
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField: x-
rim-original-encoding
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
default-style
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:428 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/base.css
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/blackberry.css
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getHeaderField:
content-type
I 11/24/2009 12:11:46:459 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results;deviceside=true
I 11/24/2009 12:12:06:569 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results
I 11/24/2009 12:12:18:510 3cc7c000 Sync| addSyncCommand: 2
I 11/24/2009 12:12:18:557 eb758000 Sync| Sync all sources
started.
T 11/24/2009 12:12:18:557 eb758000 DbAdapter| executeSQL: SELECT
source_id,source_url,token,name from sources ORDER BY source_id
T 11/24/2009 12:12:18:557 eb758000 DbAdapter| executeSQL: SELECT
session FROM sources WHERE session IS NOT NULL
I 11/24/2009 12:12:18:557 eb758000 Sync| Status: Sync
failed for Amitmodel. Details: Client is not logged in. No sync will
be performed.
I 11/24/2009 12:12:18:557 eb758000 Sync| Sync engine
blocked for 300 seconds...
T 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
I 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/app/index_erb.iseq
I 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| dispatch start
I 11/24/2009 12:12:27:921 eb8e2000 APP| RhoApplication:
Using menu - {"Home"=>:home, "Refresh"=>:refresh, "Sync"=>:sync,
"Options"=>:options, "Log"=>:log, :separator=>nil, "Close"=>:close}
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Home, value: home
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Refresh, value: refresh
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Sync, value: sync
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Options, value: options
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Log, value: log
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: separator, value: NilClasscom.xruby.runtime.lang.RubyConstant
$3@2603b378
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Close, value: close
I 11/24/2009 12:12:27:921 eb8e2000 WebView| set_menu_items end
I 11/24/2009 12:12:27:921 eb8e2000 APP| inside
RHO.serve_index: /apps/app/index_erb.iseq
T 11/24/2009 12:12:27:921 eb8e2000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:12:27:921 eb8e2000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>MyThirdApp</title>
<link href="/public/css/base.css" type="text/css" rel="stylesheet"/
>
<link href="/public/css/blackberry.css" type="text/css"
rel="stylesheet"/>
</head>
<body>
<script type="text/javascript">
function ws_results(obj) {
try{
alert("In result");
alert(obj.ResultSet.totalResultsAvailable);
}catch (ex)
{
alert("Error: "+ex+" Code = "+ex.code+" Message =
"+ex.message);
}
}
</script>
<script type="text/javascript" src="
http://search.yahooapis.com/
ImageSearchService/V1/imageSearch?
appid=YahooDemo&query=Madonna&output=json&callback=ws_results"></
script>
<h1 id="pageTitle">
MyThirdApp
</h1>
</div>
<ul id="home" selected="true" title="MyThirdApp">
<li>Add links here...</li>
</ul>
</body>
</html>
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getLength: 965
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
Accept-Charset
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHost: localhost
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection|
getRequestProperty: referer
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField: x-
rim-original-encoding
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
default-style
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/base.css
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/blackberry.css
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getHeaderField:
content-type
I 11/24/2009 12:12:27:967 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results;deviceside=true
I 11/24/2009 12:12:48:403 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results
I 11/24/2009 12:13:06:323 3cc7c000 RhodesApplicati| openLink
I 11/24/2009 12:29:50:733 3ec98000 RhodesApplicati| STARTING RHODES:
***----------------------------------***
T 11/24/2009 12:29:50:842 3ec98000 ClassFactory| getNetworkAccess
I 11/24/2009 12:29:50:842 3ec98000 NetworkAccess|
Postfix: ;deviceside=true
T 11/24/2009 12:29:50:858 ba030000 PushListeningTh| Block push thread
until data is recieved
T 11/24/2009 12:29:50:873 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:50:889 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:50:905 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:46 3ec98000 APP| RHO loaded
I 11/24/2009 12:29:51:61 3ec98000 APP| Calling
RHO.initialize
T 11/24/2009 12:29:51:77 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:77 3ec98000 APP| rhoconfig:
start_path => /app
T 11/24/2009 12:29:51:77 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:77 3ec98000 APP| rhoconfig:
options_path => /app/Settings
T 11/24/2009 12:29:51:77 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:77 3ec98000 APP| rhoconfig:
rhobundle_zip_url =>
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
rhobundle_zip_pwd =>
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
MinSeverity => 0
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
LogToOutput => 1
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
LogCategories => *
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
ExcludeLogCategories =>
T 11/24/2009 12:29:51:108 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:124 3ec98000 APP| rhoconfig:
KeepTrackOfLastVisitedPage => 0
T 11/24/2009 12:29:51:124 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:124 3ec98000 APP| rhoconfig:
LastVisitedPage =>
T 11/24/2009 12:29:51:124 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:124 3ec98000 APP| rhoconfig:
syncserver => att1,att2
T 11/24/2009 12:29:51:124 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:124 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.version
T 11/24/2009 12:29:51:124 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.version
T 11/24/2009 12:29:51:139 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:139 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.script
T 11/24/2009 12:29:51:139 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.script
I 11/24/2009 12:29:51:155 3ec98000 DB| Database (re)
opened
T 11/24/2009 12:29:51:155 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.script
T 11/24/2009 12:29:51:171 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.script
T 11/24/2009 12:29:51:171 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:171 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.script
T 11/24/2009 12:29:51:171 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.script
I 11/24/2009 12:29:51:186 3ec98000 DB| Start open DB
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.data
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.data
I 11/24/2009 12:29:51:186 3ec98000 DBJournal| Create:
file:///SDCard/Rho/MyThirdApp/db/syncdb.journal
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.journal
T 11/24/2009 12:29:51:202 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.journal
T 11/24/2009 12:29:51:202 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:233 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
I 11/24/2009 12:29:51:249 3ec98000 DB| End open DB
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.properties
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.properties
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.properties.new
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Create file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.properties.new
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.properties
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.data
T 11/24/2009 12:29:51:280 3ec98000 DbAdapter| executeSQL: SELECT
source_id,source_attribs from sources
T 11/24/2009 12:29:51:327 3ec98000 DbAdapter| executeSQL: select
source_attribs from sources where "source_id" = '1201'
T 11/24/2009 12:29:51:327 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:343 e5d78000 RhodesApplicati| Starting
HttpServerThread main routine...
I 11/24/2009 12:29:51:358 3ec98000 RhodesApplicati| RHODES STARTUP
COMPLETED: ***----------------------------------***
I 11/24/2009 12:29:51:358 e5bee000 Sync| Starting sync
engine main routine...
T 11/24/2009 12:29:51:358 e5bee000 DbAdapter| executeSQL: SELECT
last_updated from sources
I 11/24/2009 12:29:51:374 e5bee000 Sync| Sync engine
blocked for 300 seconds...