Log in

View Full Version : how to expand all tree structure at once in webpage



engchiang
02-10-2014, 05:36 PM
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 url [removed] , 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 url [removed], 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 url [removed] , 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.
Thank You!!

traq
02-10-2014, 06:11 PM
Your jsfiddles have errors, and do not demonstrate the behavior you are describing. Please provide a link to a working example or to the actual page in question so we can check it out.


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?
It would depend on how the scripts work. The answer is "probably!", but we wouldn't be able to tell you without seeing the actual code involved.

Is this your site? If so, you would be better off collecting this data before it is rendered on the website (say, by creating an API where you could download the info in a JSON or CSV format).

If it is not your site, I would recommend finding out if such an API is available. Also, be sure to check the site's Terms of Use and make sure that what you are doing is permitted.

engchiang
02-11-2014, 10:51 PM
hi traq, thanks for your reply, i have save the webpage and put into my file hosting site, this is the document link

[removed]

engchiang
02-17-2014, 03:30 PM
hi traq , could you download this file? if not i can paste its source code to here.

i have put the code below into my css file previously:

TR.hidden{
display:table-row !important;
}

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 :
https://www.dropbox.com/s/q3upxqnma8hmlew/001a.jpg
https://www.dropbox.com/s/0qh4anmeczg4b3y/001b.jpg

traq
02-17-2014, 09:16 PM
It would be best if you could link to your actual page, or provide a working example that shows the same problem.

I'll take a look later today.

engchiang
02-18-2014, 12:22 PM
i have google search for an example, and i this one shows the same problem:
http://jsfiddle.net/jaltez/LgrNF/

traq
02-18-2014, 08:42 PM
(E) 4.3 We hereby grant to you a personal, non-exclusive, non-transferable right to use the relevant software, for the sole purpose of using/playing products on the Website


(G) 3. Except to the extent required to use a product for the purpose of placing bets or wagers, no part of the Website may be reproduced or stored, modified, copied, republished, uploaded, posted, transmitted or distributed, by any means or in any manner, or included in any other website or in any public or private electronic retrieval system or service including text, graphics, video, messages, code and/or software without our express prior written consent.

[emphasis added]

It is reasonably clear that what you are attempting to do is against the Terms of Service of the website in question, and (because you provided member-only content in your linked files) the terms of your membership agreement with them. DynamicDrive's policy does not allow us to help you defeat or circumvent your agreements with other websites. Because of this, I am closing this thread. Do not open a new thread on this topic.

My best recommendation is to contact the site directly and see if you can get permission to use the data in question. If they choose to make it available to you, they could likely provide an API to access the data much more conveniently. Best of luck.