@ leslietsz
Hi leslietz.
Thanks for adding to the discussion !
But I do not understand everything 
I Understand what you wrote here with this: 

Originally Posted by
leslietsz
....one is to find token, by simply right click and view source , find the token part,,,
LeslietzToken.JPG
Now I have the “Token”. 
Is the “Token” here 7767.728 ?
_.........................
But I have no idea what to do with it 
( I do not know what a “Token” is , or what it is for in this example ? )
This which you wrote - I do not understand
:

Originally Posted by
leslietsz
...After you get the token then use the generatepost to retrieve next page data
What exactly should I do with the Token. ??
I do not understand this: “....generatepost to retrieve next page data.....” ??? 
_.......................
Anyway: 1)
I can explain how the code is working, in regard to the "Token" bit_...at least partly :-
Consider This line in Kyle’s code
It Has 8 arguments. ( But I only see 7 boxes_... ??
_ 3 Dates,
_ Stock Code,
¬ _ Stock Name,
_ CCASS Participant ID,
_ Name of CCASS Participant,
) _ ...
The first 7 arguments fill in the 7 boxes.
Clearly the last argument gets the “Token” by_....
_.... The code snippet above I understand as follows, (FWTFIW):
doc.getElementsByName("sessionToken") returns a "DispHTMLElementCollection" thing _.. we Goted ( "did Get like" ) to it from the source code by using the HTML DOM get Element By its Name Method with the argumnet (“sessionToken”), .... which we see in the Image above of the source code is there ( only once ) and to be found, as it was..
(_..._.. BTW. we should not supposed to know about a DispHTMLElementCollection" thing but we can use it through the interface thingy IHTMLElementCollection ... 'cos Kyle said so.... and what a lot og bollox it was_....http://www.excelforum.com/excel-prog...ml#post4446595
_...)
..._.. In this case I DispHTMLElementCollection" returns a "collection" of one element, the “Token”. But it is a "collection" still all be it of only 1. As it is a collection , then we must ( or can ) refer to it by its index number, ( which conventinally starts at 0 ( If we had two elements they would have the index numbers of 0 and 1 ) ) .
So the first ( and only in this case ) element is got at by the direction of ( 0 ) to the first element in the collection.
Further, the value of it is got by applying .Value Propperty of the diverse HTML Object Input Element
_ if you are interested, .open , .setRequestHeader , .send ae given soome Layman's explanations here
http://www.excelforum.com/excel-prog...ml#post4475902
_ I do not know what .abort is ? Possibly it is a java thing so probably out of place in a VBA code, .. like a .Close() is out of place in a VBA code ....
_......................................
So I know roughly what is going on, but i do not know why... Never mind.. ( I cannot remember now if or what i wanted to know anyway .. lol... ) _......._._______________________________________________________
Anyway 2)
[b. I think I can understand this now, thank you so much for the screen shots !!!![/b]

Originally Posted by
leslietsz
......You can find in developer tools, network part..... click on it and scroll to the end you can find Form data, and choose view source
I redid the screen shots as they were a bit difficult to see_.....
GoogleChrome: _...willy wonk bollox
http://www.excelforum.com/showthread...t=#post4477109
_...... and further i had a go at doing it in Internet Explorer:
Internet Explorer: _.. willy wonk Bollox
http://www.excelforum.com/showthread...t=#post4477139
Thanks again for your input. It was a nice surprise and very helpful
It is refreshing to get a helpful response from the OP, furthering the discussion and contributing to making it a good Thread
Alan
P.s. Edit I changed the code in post #14 . I replces Write with print to get rid of unwanted quotes in the text File produced by that code
Bookmarks