dojo ajax dropdownlist - dojo

I am trying to set a web application using ajax dojo technology. For this I need an exemple showing how to send and receive data with dojo library.I use also J2ee in my project.
Please if you have a constructive example show it to me.
Client side: JSP with ajax dojo its purpose is to send a selected item to the server side.
Server side:Servlet catch the data sent and construct sql query with it finally send it again to jsp
JSP receive the result of the query (xml file)
dojo construct the seceond dropdownlist automaticallt.
Just i need an exemple of send and receive.
Many Thinks.

Have you looked on Dojo's website? From your question, it sounds like what you want is dojo.data.ItemFileReadStore. The Dojo website has many examples of the uses of ItemFileReadStore, including one in which one FilteringSelect is dependently linked to another, which seems to be what you describe.
As to your request for examples of send and receive in JSP: a Google search for JSP tutorial turns up a site called jsptut.com as the first result. Have you looked there?

Related

vb.net POST variables

I am performing an integration to a third party site and they have asked me to redirect to their URL with a bunch of POST variables.
The only way I can work out how to do this is by creating an HTML form with hidden fields, and then trigger a JS click event on a button to POST the form to their site.
Ideally I would like to do this from the VB code as the data may be sensitive and there are bits I don't want to render in the client side.
Has anyone any experience of doing this successfully. I have googled around but can only find ways to use GET variables on the URL or POST and read the response.

Download JSON data from a web form

I am writing an app that asks for some data from a web-based form and then displays the returned JSON data. But I can't seem to get a handle on how "fill in" the form and get the data returned. The website developer has made a development form for testing this so I can see how it works. If I go to that website and enter data into the fields and press "Submit", it returns JSON-formatted text and displays it in the web browser's window.
What I need to do is have my app populate those fields with data and submit them to the server. The server returns the JSON data and I capture and process it in my app.
I would appreciate any advice on how to do this. As you may have guessed, I am a very new to iOS development. Thanks in advance.
Firstly, you'll need to know what form data you're going to send in a POST request. If you don't know where to find that, take a look at this.
Consider using AFNetworking to make that POST request with JSON feedback. Here's a good example.
Good luck!
This walkthrough by Matt Long is particularly good: http://www.cimgf.com/2010/02/12/accessing-the-cloud-from-cocoa-touch/.
Essentially, you just need your fields in the post data to match the fields that are present in the html form. Those fields should be evident by posting the form in chrome and watching the request in the network tab in developer tools.

scraping dynamic content

I am working on a web scraping project. do any body have idea of scraping dynamic content.
Dynamic content on base of query string is similar to static content but dynamic content based on some event of a control within same page is the point where i am stuck. because in this case page url remain same.
I am using C#.
Thanks in advance
Your question is rather general.
I'm not sure what you mean by event of a control, but as long as a browser generates http request you can catch it using tools like Firebug for Firefox or tools built in Google Chrome and see what is actually being sent to the server. So called AJAX requests are nothing else than standard http requests, it's just that web page is not reloaded as a whole.
Based on that information and page source it is possible to figure out how to create range of reguests that would simulate user interaction with dynamic elements on the page.

Can't send data via xmlhttp

I could use xmlhttp and asptear or any other components to post data to external sites on WINDOWS 2003(iis 6).
not i am using 2008 server(iis 7) and i can't get worked that components to send data.
could you please guide me ?
(PS. components are tearing the pages but don't send post data, seems like tear as GET method)
You want to post from a server-side language running on IIS? ASPTear is for classic ASP so assuming that:
ASPTear supports POST, it just defaults to GET.
You could also use "Msxml2.ServerXMLHTTP" (example).

Retrieving dynamic text from a website in vb.net (VS2008)

I want to be able to retrieve dynamic data from a web page (share prices). I started out by retrieving the html code before I realised that as it is live data, the html code will be of little use. Although I am looking to capture specific data, all i wish to do is process a webpage that I specify which will return the text off that website and not the HTML code. Basically a copy and paste of the entire page would be great..
Any ideas would be really appreciated!
'Screen Scraping' by parsing HTML is so early 2000s...what I would do is read up on Amazon's Mechnical Turk. You can develop a queued architecture where you submit urls to this Mechnical Turk service. The service would automatically distribute these bits of work to users who would then do the dirty task of copying and pasting out the valuable stock quote information you require. Users around the world would anxiously await delivery of the next URL to their Mechanical Turk inbox...pinning for the opportunity to copy/paste out another share price for your application. Sure, it might take a few minutes to update your prices, but hey, they would be HAND parsed by REAL people around the globe! Just think of the possibilities!
Well, the HTML contains the text of the website, so you "just" need to parse the HTML.
EDIT: If the data is not in the HTML but loaded dynamically, the situation is different. As I can see, you have two options:
Find out how the data is loaded (i.e. read the JavaScript on the page). If it is updated via some web service, you could query the same web service in your program.
Use a web browser to get the data and then get the dynamic HTML tree of the page. Maybe the WPF Webbrowser control can help you with this, but I'm not sure since I've never done this myself.
Is it possible to find this same data provided in a ready-to-consume format rather than scraping HTML for it? It seems like there's probably public web-services for stock quotes.
For example: A quick search for "Stock price webservice" turned up http://www.webservicex.net/stockquote.asmx; an ASMX web-service that is easy to consume in .NET.
In your Visual Studio project you should be add a reference to this service via the "Add Web Reference" command; the dialog you're given varies depending on whether your project is targeting for .NET 2.0 or .NET 3.0/3.5.
I added a reference to the service named StockPriceProxy:
Public Function GetQuote(ByVal symbol As String) As String
Using quoteService As New StockPriceProxy.StockQuote
return quoteService.GetQuote(symbol)
End Using
End Function