PDA

View Full Version : Need Help with Dynamic Ajax Content not loading in IE



ndez
10-07-2010, 12:18 AM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem: I am currently running this script on my clients site, it's running perfect in Firefox, however in IE it is not working.

Here is the url: http://febc.convio.net/site/PageServer?pagename=febc_giftcatalog_1

If you click on the bottom button overlayed on the image that says "See Other Gifts" it should load the new page which again it does in Firefox IE it gives me an error that says it's on line 40 of my js file.

Please help I have been staring at this for hours!

bluewalrus
10-07-2010, 12:28 AM
It doesn't work in my ff, it says 404, which means the page isnt found. The page being linked to is :http://febc.convio.net/site/febc_page1_2.html?1286410996214

The value after the question mark also needs a name so it can be controlled.


http://febc.convio.net/site/febc_page1_2.html?id=1286410996214

For example this would be called as "id" and it's value would be "1286410996214".

ndez
10-07-2010, 12:48 AM
Hi there, thanks for getting back with me it was working in Firefox now not so much so weird may have been caching. Anyways I have the url set to go to:http://febc.convio.net/site/PageServer?pagename=febc_giftcatalog_2 so it can then lose this but still having an issue

Not sure if my javascript code is right it looks ok just not sure why its not working

bluewalrus
10-07-2010, 02:12 AM
I'm pretty sure the problem is that you are displaying a whole page in that contentjs div.

http://febc.convio.net/site/PageServer?pagename=febc_giftcatalog_2

The pages you request should just have just the content you want displayed in the div.

Say you have


<html>
<head>
</head>
<body>
<div id="contentjs">
</div>
</body>
</html>

If you pull in another page containing


<html>
<head>
</head>
<body>
this is the content you need
</body>
</html>

You get


<html>
<head>
</head>
<body>
<div id="contentjs">
<html>
<head>
</head>
<body>
<div id="contentjs">
this is the content you need
</div>
</body>
</html>
</div>
</body>
</html>

Where as what you wanted is


<html>
<head>
</head>
<body>
<div id="contentjs">
this is the content you need
</div>
</body>
</html>

So to do that you have your file containing the raw code and have the styling already on that page. This is best done with a server side code because you can use conditional to state what to display but you can do it with plain text.

ndez
10-07-2010, 02:34 AM
Excellent I'll try that, I did find that my div placement was off so that's why it wasn't working originally.

Thanks so much for your help on this!