PDA

View Full Version : Using AJAX to add content to differrent web page


mikekist
03-25-2008, 09:03 PM
I'm using AJAX XMLHttpRequest calls to add content from text files to the content area of my web page (not the home page). The problem comes up when I click on a menu item on the home page to direct to an alternate page and then I want to fill in the content based on which home page menu item was clicked.

Can I do this somehow with AJAX, do I need a javascript function to help out or will I have to resort to other programming possibilities?

Any help would be greatly appreciated,

Mike

http://exeedra2.kistenterprises.com

binaryWeapon
03-26-2008, 02:37 AM
The only javascript solution that I could think of would be cookies: set a cookie when you click on a menu item, and then have the other page interpret the cookie and fill the content based on the cookie.

Best of Luck!

A1ien51
03-26-2008, 04:37 PM
One thing about filling in content with text files and Ajax. You are killing your chances of your website being indexed by any search engine. They do not understand JavaScript so your content will not be indexed. Just a fair warning before you get into it any deeper.

Eric