View Full Version : Dynamic Ajax Content Questions

05-16-2006, 08:10 PM
Dynamic Ajax Content

I have a couple of questions regarding the Dynamic Ajax Content script.

1) on the main page of the site I am trying to force load content into a div but it doesn't seem to be working. I have tried a couple of different options but can't seem to figure it out. My test pages are here:

http://www.joeprestondesign.com/topaztest/ - main page
http://www.joeprestondesign.com/topaztest/html/sfbgpub.html - page I am trying to load
http://www.joeprestondesign.com/topaztest/styles/main.css - css file in case I am doing something wrong with the divs

2) In the page I am trying to load I would like to be able to have content load into a div on that page as well. When I view just that page (../html/sfbgpub.html) the content loads, but the problem I am having is that I have resorted to using flash buttons for navigation (I couldn't figure out another way to have the links stay in an active state when the content from the link is loaded) and I can't seem to get flash to load the javascript:ajaxpage('test.htm', 'contentarea'); link.

I am starting to think that I should use iframes but I didn't want to jump the gun. Thanks ahead of time for any help.

12-06-2006, 06:03 PM
I am having the exact same problem. Can anyone help? Please???

12-06-2006, 06:47 PM
strange, because this ajax script works fine for me from flash.

my flash buttons code is

on (release)
getURL("javascript:ajaxpage('content.html', 'container_div')");


if your doing you action script like this then it should work.

12-06-2006, 07:39 PM
Thanks for the response--I have that code, but its still not working for me...?
Thoughts anyone?

03-30-2007, 05:33 AM
Has anyone figured this out? I've been scouring the web for almost a week now and can't find a way to make this work. I'm using the Dynamic Ajax Content method and it works just fine with my HTML but not at all with my Flash.

I have a Flash 8 nav embedded with SWF Object into the top of the page and am trying to call pages to load into my id="pagecontent". Is my actionscript correct or am I just wacked?

btn_where.onRelease = function(){
getURL("javascript:ajaxpage('where.html', 'pagecontent')");}

Is there some sort of script you need to use to allow JavaScript to work with Flash? Never used the two together before..

03-30-2007, 02:49 PM
the javascript is'nt firing.... you have to use eval() on the javascript in the loaded page.

04-11-2007, 05:57 AM
Hmm... what does that mean exactly? Sorry, pretty new to this stuff.

I DID figure out that this seems to be server-side script (which I didn't know before) so as long as I have it live on a server it works. That was my main problem.

Now I'm trying to figure out how to load the absolute URL through the Flash navigation. Here's my code:

btn_where.onRelease = function(){
getURL("javascript:ajaxpage(_rootdomain+'where.html', 'pagecontent')");}

Still not working, having problems with this now.. Any help would be greatly appreciated!

Thanks in advance.

04-11-2007, 12:41 PM
Actually, I found out that loading the absolute URL isn't what I was really looking for. What I want to do is call out a page in the address bar everytime you click on the navigation.

Very similar to this:http://www.contentwithstyle.co.uk/Articles/38/fixing-the-back-button-and-enabling-bookmarking-for-ajax-apps . . . . Although this is pretty intensive coding and I can't quite get this working either.

Anyone have experience with this?