Loading HTML with ajax table

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Loading HTML with ajax table

by lazerbo88 on Mon May 29, 2017 1:06 am

Hi,

I have some trouble with my macro, could you help me ?

I would like loading two html pages from a website but the page ajax refresh don't work.

Step 0 : Go to an url that display an ajax table.
Step 1 : Loading the page to a document.
Step 2 : Clicking button "page 2" -> ajax -> data table refresh.
Step 3 : Loading the curent html page with ajax table refreshed ---> Not Working ---> The page loaded is the same that in the first step ...

Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.foxsports.com/fantasy/football/commissioner/Players/Search.aspx?league=155148&page=1&position=8&playerSearchStatus=2&view=1&split=1
 TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
 SAVEAS TYPE=HTM FOLDER=* FILE=qq1.htm
 
TAG POS=1 TYPE=A ATTR=ID:MainColumn_PaginationRepeater_PageLink_1
TAG POS=1 TYPE=A ATTR=ID:fancybox-close
 TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
 SAVEAS TYPE=HTM FOLDER=* FILE=qq2.htm


Thx for your help.

----------------------
VERSION BUILD=9030808
Windows 7
Firefox 53.0.3 (32 bits)
lazerbo88
 
Posts: 2
Joined: Mon May 29, 2017 12:46 am

Re: Loading HTML with ajax table

by chivracq on Mon May 29, 2017 10:25 am

lazerbo88 wrote:
Code: Select all
VERSION BUILD=9030808
Windows 7
Firefox 53.0.3 (32 bits)

Hi,

I have some trouble with my macro, could you help me ?

I would like loading two html pages from a website but the page ajax refresh don't work.

Step 0 : Go to an url that display an ajax table.
Step 1 : Loading the page to a document.
Step 2 : Clicking button "page 2" -> ajax -> data table refresh.
Step 3 : Loading the curent html page with ajax table refreshed ---> Not Working ---> The page loaded is the same that in the first step ...

Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.foxsports.com/fantasy/football/commissioner/Players/Search.aspx?league=155148&page=1&position=8&playerSearchStatus=2&view=1&split=1
 TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
 SAVEAS TYPE=HTM FOLDER=* FILE=qq1.htm
 
TAG POS=1 TYPE=A ATTR=ID:MainColumn_PaginationRepeater_PageLink_1
TAG POS=1 TYPE=A ATTR=ID:fancybox-close
 TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
 SAVEAS TYPE=HTM FOLDER=* FILE=qq2.htm


Thx for your help.

----------------------
VERSION BUILD=9030808
Windows 7
Firefox 53.0.3 (32 bits)

Hum..., I tried to have a look at your Site but it's behind Login&Password... :roll:

=> I cannot have a look nor do a bit of Testing by myself, but hum..., a possible Workaround for you would be to "study" a bit the Structure of the URL's when you navigate to some next Pages...

If Page_1 can directly be accessed with:
Code: Select all
URL GOTO=http://www.foxsports.com/fantasy/football/commissioner/Players/Search.aspx?league=155148&page=1&position=8&playerSearchStatus=2&view=1&split=1

... => Chances are that Page_2 can be accessed directly from:
Code: Select all
URL GOTO=http://www.foxsports.com/fantasy/football/commissioner/Players/Search.aspx?league=155148&page=2&position=8&playerSearchStatus=2&view=1&split=1

... => Etc for Page_3...

Which means that you could loop your Script by using a Var on the 'page=n' Parameter in the URL with stg like:
Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.foxsports.com/fantasy/football/commissioner/Players/Search.aspx?league=155148&page={{!LOOP}}&position=8&playerSearchStatus=2&view=1&split=1
TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
SAVEAS TYPE=HTM FOLDER=* FILE=qq{{!LOOP}}.htm
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5730
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Loading HTML with ajax table

by lazerbo88 on Mon May 29, 2017 1:04 pm

Unfortunately, the page parameter in the url don't work.
lazerbo88
 
Posts: 2
Joined: Mon May 29, 2017 12:46 am

Re: Loading HTML with ajax table

by chivracq on Mon May 29, 2017 3:09 pm

lazerbo88 wrote:Unfortunately, the page parameter in the url don't work.

Yeah, but be a bit more precise...! :idea:
If there is a '&page=1' Parameter on Page_1, I can hardly believe that Page_2 will still have '&page=1', that doesn't sound logical if the Web-Designer went through the hassle of using some '&page=n' Parameter... :?
Or is it that other Parameters in the URL change as well together...?
=> Post a few complete URL's for say the first 5 Pages... (I shouldn't have to ask..., I can't help you from a "It doesn't work"...)
(Or check if the Pages can be accessed without registering, or if you want to create some Test Account... :idea: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5730
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 7 guests

Website Monitoring