How can I pick up data from one place and put in a new place

Applying eValid to AJAX applications that require advanced DOM-based methods.

How can I pick up data from one place and put in a new place

Postby Sharwyn » Tue Oct 29, 2013 3:10 pm

Bonjour:

Please forgive me if my english is not correct.

Could you please clarify the following query:

How to extract the dynamically generated text from one page and use it as input in next page:

In creating a task, a randomly generated number is displayed in first page
(Text: Case number is 1671)

I want to extract the number say 1671 from the text to reuse on the next page.

Merci!
Sharwyn
 
Posts: 1
Joined: Tue Oct 29, 2013 10:45 am

Re: How can I pick up data from one place and put in a new p

Postby eValid » Wed Oct 30, 2013 11:05 am

Hello Sharwyn,

Your english is fine, to answer your question:

To copy an embedded text value FROM one page and insert it into a particular
place on another page (the TO location) you need to use the DOM Value
Manipulation commands:

http://www.e-Valid.com/Products/Documen ... ation.html

First, find (using the PageMap) the index of the element where the the
source value is located and also note it's property name.

Knowing this information you can issue a commands like this:

IndexSet INDEX
ValueGetElement 0 innerHTML ""

which says, from window 0 (the root window) and sourceIndex INDEX, get
the assigned value from the propety innerHTML and store it in an internal
variable called ElementValue for later use.

ValueSet STRING also can be used to set the FROM value.

Second, to insert that save value into a locaton on another page you need
to find the same data (the INDEX and the name of the property) and then
issue commands like this:

IndexSet INDEX
ValuePutElement 0 innerHTML ""

Which says, put the internal value STRING at page element INDES into
the element at that index named innerHTML.

Both sequences assume an unnamed frame, hence the "" at the end of the
command. Also, if one page is window 0 (the root) and the other window
is window 1 or 2 or 3...the subwindows from the root...you have to
also specify the window number.

You'll find some examples at the end of this page:

http://www.e-Valid.com/Products/Documen ... ation.html

Hope the solves your problem.

-- eValid Support
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to AJAX Applications & DOM Processing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons