javascript from remote server, present in different way

I was wondering how the following could be achieved. I already have a web page where I query the database and generate HTML and send to the page. Now I want to write on top of this existing page to query the results but to format it differently.

User clicks on the link on page 1, on the server the data is retrieved and sent back to the page and the page displays the table...

Now I want,

User clicks on a link on page 2, which in turns points to link 1 on page 1, get the output and format it differently to show as a different table.

Please help.
Who is Participating?
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.


clarifications :
1. Is it that u want the same data to be displayed in 2 differnt formats.
2. or is it that when u click on a link on page 1 - u query the db & get different results ???

if its case 1. then things can be handled differently

u can create 2 pages with different formats based on the same query & show only page1 to the user.
now when the user clicks on the link on page 1 - instead of querying the DB again & getting the result - simply redirect the user to the page2 - which shows the records in different format.

this same logic can be applied if its case 2 as well

let me know - if i am getting u right !

please give example of what do you mean by page i, page 2

something like page one will have customer infor,...etc
samimaAuthor Commented:
Thanks Anand.

I want something like case 1 but my problem is that page 2 has no access to the database that page 1 has. So, I cannot use what you suggested.

Let me tell you what I exactly want.
There is a site that accesses the personal records of employees of a company and displays some info on their web page. They also provide a sniplet that you can put in your page's HTML to show this info on your web page. When I do this I do get all the required info but in the format that is set by them. I want to reformat it to fit the look and feel of my website.

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

can i have a look at what exactly u r getting [sniplet format] & how is it preformatted.

once i look at it - may be i cld guide u on how to reformat it - in ur own way.

also tell me how the results wld be used on page2 .. is it that the sniplet ur talking abt - has them in it - or its provided seperately ... just to know exactly what u want

also if u can provide a link to ur page - i cld see it running [if possible]

Parse data with <cfhttp> rework it on your local server, create a query, populate it with the parsed data and display the data whatever way you wish.

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
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
Web Servers

From novice to tech pro — start learning today.

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.