How to find an xpath present in the current page? - xpath

I have the Xpath "//td[contains(#class,'list-padding radar_text')]/a[contains(#href,'id')]"))".
In my web page, once after submitting a form,page will be reloaded with some dynamically created details. the given XPath is for one of the field. before fetching the value of this XPath i want to check whether this Xpath exist in that page.

Related

Required Xpath Logic

I am developing a data scraping program by using xulrunner and .net I and able to achieve all the thing just I am unable to implement the logic to find similar elements on page ,details are as below
1) If I select any element/text then I get its xpath so I wish
Selects all similar elements page wide.I think we can achieve this by removing the position part from the selection xpath.
2) If I select any element/text then I get its xpath so I wish
Selects all similar elements next to the selected element
3)If I select any element/text then I get its xpath so I wish
Selects all similar elements within the parent element
I am really unable to understand how to implement it

Smarty to check select box value

I have two HTML Forms in a webpage. One having a select box. So i may want to check in second form if first form has selected some value and if it has, capture that value. I am using Smarty templates for these HTML form. Is there some workaround with this ? Thanks.

Using schema.org microdata for Database Content

I was wondering if one can mark text fields with schema.org microdata for fields which will contain values retrieved from a database, but which are initially empty upon loading the web page. Basically, I have some fields that I would like to mark using microdata, which will not contain any data until the values are retrieved from a database, the population of which would be initiated by users.
The microdata format is about making data machine-readable.
You 'could' mark up the text fields but I'm not sure why you'd want to.
A search engine will only see the empty field which it won't be filling it in, so no help there.
It's possible that a browser could do something with that data after the user has filled it in, but I can't imagine what.
If your form is saved and presented on another page, then that page is a perfect candidate for microdata markup.

making primeFaces ajax call in dataTable

I am using JSF 2 with PrimeFaces 2.2. I tried making an ajax call through a select box onchange event in a dataTable. I was able to see the System.outs printing but, I could not see the components given in the update attribute getting updated. I have given the dataTableId in the update attribute.
I guess the problem now is the selectbox is getting populated again and an ajax call is made. Should we give only the parent tags in the update attirbute, for the ajax call to work. Please help me out in this.
When the ID in the update attribute does not start with :, it becomes relative to the ID of the current component inside the same NamingContainer component. But since the h:dataTable is an NamingContainer component, you need to reference it by an absolute ID. Rightclick the JSF page in the webbrowser and choose View Source to see the generated HTML DOM tree. Locate the HTML <table> element which is generated by the <h:dataTable>, determine the value of its id attribute and use exactly that id in the update attribute, prefixed with :.

div loading is not proper while using ajax

I have to load a div with a list of check boxes using ajax. I have writen ajax code to fetch the string containing the list of check boxes.`
document.getElementById("roleCheckBoxes").innerHTML="";
$('#roleCheckBoxes').append(xmlhttp.responseText.toString());
the data are fetching properly but the display alone not reflecting the string which I gave instead it displays a the list of check boxes with all checked.
Maybe the checkboxes in the HTML you get contain checked="true"?

Resources