Prefill web form with data stored in app - iphone

With the iPhone UiWebView is it possible to prefill an html form with username and other
account details that are stored in the app's data folder. Using iOS 5.1 sdk
So I would need to read the file with the customers's information stored and then prefill the web form from the UIWebView. I need to know if this can be done and if so any tutorials how to do it would be useful.
Thanks

You could read the data from your app's bundle then run a JavaScript function that takes the data as parameters and uses it to pre-populate the form.
You can execute the Javascript in your UIWebView by using the method
stringByEvaluatingJavaScriptFromString:
I'm not a JavaScript expert so I don't want to comment on the best way to write the JavaScript function to pre-populate the form but I know its possible.

Related

How to add a joomla form in frontend then add media to form data in backend?

I want to add a form in the front end of the
website .. then submitted data needed to display in the backend.. I want to add a media to every data that submitted. after that I want to publish selected form data with uploaded media in front end... how can I do.? Am new in Joomla
There are several form extensions check this link
http://extensions.joomla.org/extensions/extension?searchall=forms&filter%5Btags%5D%5B%5D=&filter%5Bcore_catid%5D=&filter%5Bincludes%5D=&filter%5Bversions%5D=&filter%5Btype%5D=&filter%5Bhasdemo%5D=&filter%5Bnewupdated%5D=&filter%5Bscore%5D=&dir=DESC&limitstart=&controller=filter&view=extension&layout=list&Itemid=145&clearorders=0&clearfilters=1
I picked up this extension for you
http://extensions.joomla.org/extensions/extension/contacts-and-feedback/forms/visforms
What you have to do is. Install a free extension. Create a form for the frontend. Remember not to give access to the upload field as you are going to upload the media. There is Visforms, Chronoforms etc that can solve your purpose. You can save to database, edit your form at backend, upload and do lots of stuff.

ASP Classic - Passing form data to Iframe

I'm looking to pass data from a form into an iFrame, but I have a slight problem.
The form page I can edit with no restrictions
The page I send the data to I cannot edit unless its html or JavaScript
The data needs to end up in an iframe within this page, which I can edit with no restrictions
I'm incorporating a search function into a CMS system which is why I cannot edit the iframe's parent page, and why I am using iframes at all.
At the moment the data sends to the parent page but is not picked up within the iframe, I am sending via the POST method.
I got it..
Added and extra page which converted the post data into session data,
if anyone knows a better way i would like to hear it though.
And they are the same domain, but editing the CMS system would have taken ages to look through as its not mainstream or developed by me.
Maybe I'm oversimplifying the problem, but can't you use the "target" attribute of the form tag to post to the Iframe?

Copy string from UIWebView

I've put UIWebView in my app which loads login page, after user logs in, can I write some function that will copy specific link from that UIWebView that is specific for every user?
The best way to do this would probably be to include a JavaScript function in the page that returns the link or data you need. See [UIWebView stringByEvaluatingJavaScriptFromString:]
Another way could be to retrieve the HTML in your iOS code, get the data you need, and then set that content in the UIWebView using the loadHTMLString:baseURL: method.

How do I extract the HTML source of a website in my iPhone app?

I'm using Xcode to build an app to monitor a web page to see if the HTML changes. I want to extract a website's HTML source to compare it to the same website's HTML source at a later time to see if the website has changed. I can't find anything that would allow me to do this.
If it's not possible to extract the HTML of a site, I need some way to check for changes in the website.
Use NSURLConnection to retrieve the page as an NSData instance, and save it in an ivar (for example). Then retrieve it again into another NSData instance and compare the two instances using NSData isEqualToData:.

the way to Post or Get the input data to a site in iphone application

is it possible to Post or Get the input data to a site by using objective C in iphone application,for example in HTML create a form it collect the input data from user and post to the server site
Take a look at ASIHTTP http://allseeing-i.com/ASIHTTPRequest/