Dynamic Pages and AJAX

I have a page that is generated dynamically with a list of Press Releases.  There is another page that pulls the HTML via an AJAX call.  The problem is, is that the HTML page is dynamic.  Is there a way to populate the page before the AJAX call pulls the HTML?
LVL 7
rgranlundAsked:
Who is Participating?
 
Julian HansenCommented:
I am going to guess that Page A populates by JavaScript / AJAX.

What you might need to do is instead of AJAX'ing Page A you instead look inside the page to see what it is doing to create itself and then replicate that code to Page B. Potentially place the code in a script file that is then loaded by both pages.
0
 
Ryan ChongCommented:
>>There is another page that pulls the HTML via an AJAX call

what do you mean by "another page"? is there one page or two pages in total?
0
 
Julian HansenCommented:
Let's try and nail this down

Page: A => generated dynamically with a list of Press Releases
Page: B => pulls the HTML via an AJAX call

Requirement:
Is there a way to populate the page before the AJAX call pulls the HTML

Interpretation:
Is there a way to populate A before the AJAX on B requests it

I am not sure this makes sense though. When the AJAX call is made the page is rendered before it gets to the browser so in essence what you are asking is already happening. As you still have the question I have to assume something else is going on.

The question therefore is: is Page A dynamically generated in the browser (by AJAX) so that what you are actually asking is how to call a page by AJAX that in turn populates itself by AJAX? Although this does not sound correct either.

Can you clarify?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
rgranlundAuthor Commented:
Page-A populates itself when it loads in the browser.  However, the info on this Page-A is used elsewhere, Page-B.  So, when the AJAX Call on Page-B is "fired" Page -A does not or has not been rendered. I think.  I'm a little confused myself.  The bottom line is I need the info from that page but it seems that it does not populate itself when it is accessed by the AJAX Call.

I will continue to research the issue and any additional help you can offer is greatly appreciated.
0
 
Ryan ChongCommented:
Page-A populates itself when it loads in the browser.  However, the info on this Page-A is used elsewhere, Page-B.
so is Page-A considered as a parent page while Page-B is an iframe or something like that?? how can these 2 pages co-exist in a "same" page?
0
 
Julian HansenCommented:
how can these 2 pages co-exist in a "same" page?
I think what he is saying is that Page A loads and then populates itself by AJAX.
Page B now needs the content of page A so it is loading the .html by AJAX but the code on A is not running correctly to populate itself so no content is showing on B.
0
 
rgranlundAuthor Commented:
This is the best solution, however, I realized what the issue was. It is too long to describe but in a nutshell, I used the "KISS" approach instead of over thinking it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.