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 8
rgranlundAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>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
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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.