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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 02-10-2011, 12:51 PM   #1 (permalink)
Registered Member
 
harshit2811's Avatar
 
Join Date: Aug 2010
Location: Baroda
Posts: 50
harshit2811 is on a distinguished road
Send a message via Yahoo to harshit2811
Default Fetching data from Web page in UIWebView..

Hello ,

I am suck with some weird type of requirements. I added one UIWebView in my application. I opened thehttp://www.guidgenerator.com/online-guid-generator.aspx web site in my webview.

This site is useful to generate the GUID (128 bit unique id). just have a look.
when i generate that GUID i want to copy that string in my application.
So is there any way through which i can inspect HTML web page having generated GUID and i stored that in my local database???

pls reply if you are not clear with requirements......

Thanks in advance.
harshit2811 is offline   Reply With Quote
Old 02-10-2011, 01:23 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

There is certainly a way that you could do what you're asking. Or, you could just use CFUUIDCreate.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 02-10-2011, 11:28 PM   #3 (permalink)
Registered Member
 
harshit2811's Avatar
 
Join Date: Aug 2010
Location: Baroda
Posts: 50
harshit2811 is on a distinguished road
Send a message via Yahoo to harshit2811
Default

Quote:
Originally Posted by dljeffery View Post
There is certainly a way that you could do what you're asking. Or, you could just use CFUUIDCreate.
Thanks for reply,

Basically i dont want GUID number at all . This is just one example
The real problem i am facing is , if i load any web page in my webview and i want to store some info from that page.

suppose , i open one site xyz.com , i logged in and do some task , site gives me the "TASK ID" by some way on web page . Now i want to store that "TASK ID" in local database of my application.( sqlite) so i can populate list of "TASK ID" (UItableView) user has already done.

Note:
This is not client-server model. I just want to fetch data from web page.

Let me know if you need more info.

Last edited by harshit2811; 02-10-2011 at 11:31 PM.
harshit2811 is offline   Reply With Quote
Old 02-11-2011, 02:44 AM   #4 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

OK. So what have you tried so far, and where are you stuck?
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 02-11-2011, 03:10 AM   #5 (permalink)
Registered Member
 
harshit2811's Avatar
 
Join Date: Aug 2010
Location: Baroda
Posts: 50
harshit2811 is on a distinguished road
Send a message via Yahoo to harshit2811
Default

Quote:
Originally Posted by dljeffery View Post
OK. So what have you tried so far, and where are you stuck?

Thanks,
Meanwhile i got some tricks to get element value of web page.

What i have done is , I override the web view controller delegate method.

- (void)webViewDidFinishLoadUIWebView *)webView
{
NSString *js_result = [webView
stringByEvaluatingJavaScriptFromString:@"document. getElementById('txtResults').value;"];

This gives me value of text box. Now it works bt still i need some efficient way. Is this method effect performance issue?? Will it fetch large string also like paragraph , custom object etc..???
}
harshit2811 is offline   Reply With Quote
Old 02-11-2011, 10:51 AM   #6 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

When you say you need an efficient way, are you actually seeing performance issues with your current implementation? Because I wouldn't expect you would; it should be perfectly fine.

And yes, you can fetch a paragraph. Or even an entire document's html. But not a custom object, only text. Not sure what you'd do with an actual JavaScript object in Objective-C anyway.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 02-24-2011, 02:11 AM   #7 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 633
ilmman is on a distinguished road
Default

Hi, I think I am trying to do something similar but I'm not sure how to extract certain text.. For example

HTML Code:
<tr class=" ">
			<td class="title"><a class="title" href="/forum-replies.cfm?t=1647460">iPhone 4 back scratch? How?</a>
				
				</td>
			<td class="group">&nbsp;</td>
			
			<td class="reps" style="background-color: #eae7e3;">7</td>
			<td class="reads" style="background-color: #e9e5e0;">113</td>
			
			<td class="oldest"><a href="/user/311187"><b>Magic is Might</b></a><br>Today at 5:04 pm</td>

			<td class="newest"><a href="/user/257524"><b>Revelation</b></a><br>10 minutes ago</td>
			
				<td class="goend">
			
				<a href="/forum-replies.cfm?t=1647460&amp;p=-1&amp;#bottom" style="color:silver" title="Jump to last post"><img src="/img/forum/arrow.gif" width="16" height="17" alt="Jump to last post" border="0"></a>
			</td>
		</tr> 
		
		
		<tr class=" ">
			<td class="title"><a class="title" href="/forum-replies.cfm?t=1645673">iPhone 5 - let the rumours begin (Part 2)</a>
				<script type="text/javascript">thread_page_list(1645673,5);</script> 
				</td>

			<td class="group">&nbsp;</td>
			
			<td class="reps" style="background-color: #cebeab;">89</td>
			<td class="reads" style="background-color: #cbb9a4;">1557</td>
			
			<td class="oldest"><a href="/user/26479"><b>-DrD-</b></a><br>Tuesday at 3:26 am</td>
			<td class="newest"><a href="/user/92131"><b>Goliath Manhood</b></a><br>11 minutes ago</td>
			
				<td class="goend">

			
				<a href="/forum-replies.cfm?t=1645673&amp;p=-1&amp;#bottom" style="color:silver" title="Jump to last post"><img src="/img/forum/arrow.gif" width="16" height="17" alt="Jump to last post" border="0"></a>
			</td>
		</tr> 
I want to write a code (using getElement???) to display "iPhone 4 back scratch?" and i"Phone 5 - let the rumours begin (Part 2)". Looking around for ages but not sure.. I am able to use getElementById to get the whole text of the whole day div but I just want to extract that information only...
ilmman is offline   Reply With Quote
Reply

Bookmarks

Tags
inspecting data, uiwebview

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: 376
14 members and 362 guests
blasterbr, buggen, Clouds, dre, EvilElf, jeroenkeij, jimmyon122, Mah6447, n00b, nyoe, pungs, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

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