February 7th, 2014, 01:40 PM
How to expand all tree structure at once in webpage
Hi! I am a Chinese from Malaysia, I have been use google and yahoo to search for css and html answer few weeks already , but because of i am study mechanical engineering , have no coding basic at all , so until now i still cannot solve my problem.
Everyday I have to copy and paste all data from a webpage's tables into Excel; there are more than 100 tables, each table contains 10 rows, each row is a link. When I click on it, it will expand and shown its content, but when I click on the 2nd row , the 1st row content will hide automatically, and when I click on the 3rd row, the 2nd row and other content also will hide automatically...
So I need to click the row 1 by 1 in order to show its contents and copy paste into excel, which is tedious and time consuming.
I have ask my boss for permission to log in and share his table data , this is my extra job i need work for him.
this jsfiddle.net/engchiang/ghP2a/5/ , where its output result is when i open the website , the contents of 10 rows are all hidden.
The upper left corner is source code , the lower right corner is output result. this table consists of 10 rows , each of its 1st cell is link ,
this jsfiddle.net/engchiang/ghP2a/6/ , where its output result is when i click on the 1st cell in 1st row , and the 1st row HTML will show as: tr class="shown" , the other 9 rows HTML will show as: tr class="hidden"
this jsfiddle.net/engchiang/ghP2a/7/ , where its output result is when i click on the 2nd cell in 1st row , and the HTML of the 2nd row will show as: tr class="shown" , but the HTML of the 1st row will change to: tr class="hidden" disabled="true"
then when i click on 1st cell in 3rd row , it show the 3rd row contents and hide the other row contents...
Is there any method that will cause the webpage expand all its tree contents when I open the webpage, or cause the link to not hide its contents automatically when I click on the other link?
I have a google chrome custom css file, which is put in C:\Users\User\AppData\Local\Google\Chrome\User Data\Default\User StyleSheets\
can you provide me a code which can be put into my custom css? if you can solve my problem then i will no need to be work for my boss extra 1,2 hours everyday.
February 10th, 2014, 11:53 AM
somebody please help me, i need to work for my boss extra 1,2 hours everyday and cannot be claim.
February 17th, 2014, 08:23 AM
have you solved this yet?
If not, does this work?
- Use the 'View Source' feature of your browser
- Copy everything into a text document (e.g. Notepad++, or even Notepad, if you must)
- Delete everything in the <head> element except for <title>
- open the resulting HTML file in your browser
February 17th, 2014, 11:34 AM
hi LindaJeanne , thanks for your reply,
the below is the source before Delete everything in the <head> element except for <title>
</title><meta name="viewport" content="initial-scale......></head>
the below is the source after Delete everything in the <head> element except for <title>
did you mean this? And i have paste the source into jsfiddle.net
but both of the result before and after delete are also same.
i have save both this 2 file as html file and shared it on net, the 1st is before delete, the 2nd is after delete:
this site need my boss's password, i dont have any permission, my boss log in this site and save this file as html file and shared it, here is the link:
if you could not download this file, then i paste its source to here,
February 17th, 2014, 11:36 AM
someone have write a css code below to me before:
i have put this code into my chrome custom css file, but the table row is just became bigger , still cannot show its contents , i have uploaded this 2 pictures , the 1st is before using this css , the 2nd is after using this css :
February 17th, 2014, 11:50 AM
Oh! So it's not the data that's showing. I thought you were trying to get the
高于 12.5 @ 2.20
160.00 SGD Single 10/02/2014 01:21:37 160.00 0.00
If the computer you're on is able to authenticate automatically (that is, if you don't need to type a password each time), then doing a search-and-replace on "onclick" and changing it to "onload" on the saved HTML file may give you what you need.
February 17th, 2014, 03:57 PM
hi LindaJeanne, i have copy and paste the source into notepad , and replace all onlick to onload, and save as html file format. but when i click the link in each table row, it will not expand and show its contents.
the 2 files i have shared to you also will not expand and show its contents after click its link in each table row.
i then ask my boss login, and i right click>inspect elements in chrome, and edit attribute onclick to onload, then i click its link in table row, it will not expand and show its contents.
February 17th, 2014, 04:08 PM
I think that to see all the rows at once, you'd need the help of whoever runs that website, unfortunately.
Wish I could offer more help =^/
February 18th, 2014, 07:27 AM
hi LindaJeanne, thanks a lot, i have google search for an similar example, and this example is similar to my problem:
is this one example can be edit to show all the contents?
February 19th, 2014, 09:51 AM
The thing that complicates yours is the requirement for authorization on each click -- I don't know how to get it to recognize authorization for all the rows at once. It seems to have been designed specifically to prevent that.
February 21st, 2014, 12:36 PM
hi LindaJeanne, want to ask you again, do you know excel VBA? i want to use Excel VBA to extract webpage data into excel, last time i use .document.all.tags("table").Rows.Cells.Click
to simulate the mouse left click to click table in this website
the table contain 38 cells,
it will show different contents when click on each cell, the mouse left click can be simulate by .document.all.tags("table").Rows.Cells.Click
now i meet a problem in this table,
this table contain 9 rows, the text in 1st cells in each rows is a hyperlink, the text "Under 16.0 @ 1.70" will show new contents when click on it,
.document.all.tags("table").Rows.Cells.Click is unable to use in this situation, the entire cell is a hyperlink in the previous example, but this one only its text is hyperlink.
can you help me on this? Thank you !
February 25th, 2014, 05:56 AM
hi LindaJeanne, thanks for your reply, you are so helpful, i will not forget, i have just use getElementbyid to solve this problem.