Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 3, 2012, 06:57 PM   #1
mikezang
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
How to parse html page including java script?

I try to parse a HTML page that use java script to create some content, I found stringWithContentsOfURL can't give me right result, because there is no contents created by java script, what can I do?
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Dec 4, 2012, 04:19 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Embed a UIWebView (not necessarily visible), load the page, let the JS run and then interact
robbieduncan is offline   0 Reply With Quote
Old Dec 4, 2012, 04:24 AM   #3
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by robbieduncan View Post
Embed a UIWebView (not necessarily visible), load the page, let the JS run and then interact
Can it be run in background like Safari?
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Dec 4, 2012, 04:33 AM   #4
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
If you mean whilst your app is suspended I suspect no. If you mean whilst your app is the active app then yes, it would load happily.
robbieduncan is offline   0 Reply With Quote
Old Dec 4, 2012, 06:13 AM   #5
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by robbieduncan View Post
If you mean whilst your app is suspended I suspect no. If you mean whilst your app is the active app then yes, it would load happily.
But it is said UI only can be run in Main thread...
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Dec 4, 2012, 06:16 AM   #6
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
1) I said nothing about threads: you have decided to add this
2) An offscreen (or simply z-layered behind the other views) view implies nothing about threads
robbieduncan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Apple Script -> Copy and Paste HTML content - Not working gguerini Mac Programming 2 Apr 10, 2013 04:49 PM
java script conflict..... pelsar Web Design and Development 3 Mar 12, 2013 06:57 PM
Apple Releases Java Updates for OS X, Including Malware Removal Tool MacRumors MacRumors.com News Discussion 59 Feb 21, 2013 01:34 PM
How to parse JavaScript part in HTML source? mikezang iPhone/iPad Programming 3 Dec 24, 2012 11:58 AM
Can I edit an existing html page using iWeb? bldmn Mac Applications and Mac App Store 6 Aug 7, 2012 06:27 AM

Forum Jump

All times are GMT -5. The time now is 06:39 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC