Jump to content

XSL variable with value from a html form


Guest Seldon

Recommended Posts

Guest Seldon

Hi!A have a html document, with two frames. In the first frame (html doc), there's aform, with a textbox (<input type="text" ... >), in which I can write some strings (names for example).In the second frame, there's an xml document, with an xsl stylesheet.If the textbox has some value, then from the xml should only those records appear, which has the element, with the same value.I think, the key, to do this, is to make an xsl variable, and give it the value of the textbox. But I can't do that.The xml is like this:

<Root><Table> <name>Jim</name> <location>London</Location></Table><Table> <name>Jack</name> <location>Paris</Location></Table><Table> <name>Joe</name> <location>London</Location></Table></Root>

For example, if I write to the texbox: "London", and reload the xml, then only those nodes should appear, which has the "location": "London".If I had a variable with the current value of the textbox, it would be easy with an xsl:if, but the problem is that I can't give the value to the variable.I tried much ways, but every time, the xsl variable gets the name, not the value of the textbox. I tried some javascript code, but it worked not.So, is there any way to solve my problem?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...