• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 504
  • Last Modified:

QueryPath Value of Element

I'm trying to extract the value of an <li> tag like so:

  <li class="pagenumber ">1</li>

In this case the value is 1. Any ideas?
0
kjenney
Asked:
kjenney
  • 2
1 Solution
 
GaryCommented:
Extract it to post in a form submission?
You will need to use js to get the value and append the querystring.
But this vaue would be known at page load so you could just place it in a hidden field in the form.

Explain more...
0
 
kjenneyAuthor Commented:
This question is related to QueryPath so I was expecting a QueryPath statement as a solution.

I figured it out:

$pagenumber = circqp->branch()->find('li[class="pagenumber"]')->text();                          
echo $pagenumber."<br>";

Open in new window

0
 
kjenneyAuthor Commented:
This question is related to QueryPath so I was expecting a QueryPath statement as a solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now