wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Parsing html in Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Parsing html in Ajax" Watch "Parsing html in Ajax" New topic

Parsing html in Ajax

Nimish Patel
Ranch Hand

Joined: Jun 29, 2005
Posts: 84

I am using Ajax.I get responsetext in ajax in this format.

<input type="text" name="person" value="nimish" />

now I want to get "nimish" in this html.
How can I parse this html?


Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
You will have to do string manipulation to get it. Can I ask why can't you jjust have the server return just that value to the page in the first place.

Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
As an option, you can write that into hidden iframe and use javascript to get a value.
It is sorta covered in the JavaRanch Style Guide.
subject: Parsing html in Ajax
Similar Threads
jQueryForm() / jQuerySubmit issue
Simple Ajax example doesn't work
[S2] Secure and non-secure message appear in IE 7 using https
Question on using Ajax.Updater
Update User's Session with AJAX tip