Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Flash Button load <div> with Dynamic Ajax content "ajaxcars"

  1. #1
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Flash Button load <div> with Dynamic Ajax content "ajaxcars"

    Hi I am trying to get the Dynamic Ajax content "ajaxcars" sample from dynamicdrive.com to work with a flash button. The sample works great using <a href> in html. However when I call on the javascript in Flash with get URL (javascript) It does not work. Has anyone successfully done this? If so can you please show examples or offer suggestions on how you did it. Thank You in advance.


    JW

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    What is the gerURL command that you're using? I have done this before, though I don't have any examples readily available I can show you.

    But it should work, if coded properly. If you post your getURL code, I'll take a look.

  3. #3
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    //jweiss
    try this

    Code:
    on (release) {
    	getURL("javascript:ajaxpage('your-page.html', 'your-DIV');");
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I had this problem yesterday and this was the exact solution I came across as well. This should solve your problem no question.

  5. #5
    Join Date
    Jul 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    I have succesfully used this method today, but am having trouble getting the first page to load without first clicking on the 'home' button. It starts with an empty div untill a button is pressed.

    Now, i've tried passing the variable to the movie using FlashVars and the button in the flash appears to animate (home/first button) but then the ajax part doesn't work until i interact with it.
    Code:
         <param name="flashVars" value="button=1"/>
    Does anyone know how i can tell flash to load home.html into my div upon 1st load please? Otherwise, i end up with an empty div until a button is pressed.

    Many thanks

  6. #6
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Same but different

    Hey. I realize this is an old thread but I'm so close to a nice working solution with my project that is based on this concept. I have an all flash site but want to include a utube video and google map so I've set up an Empty Div to hold these two when needed and then call an empty html when it's not needed.
    This is working perfectly on everything except Internet Explorer it replaces the page to a complete white screen grrr. I've tried all manner of changing opacity and such but still no joy.
    in my html css for the div
    #rightcolumn{
    position:absolute;
    height: 400px;
    width: 500px;
    left: 50%;
    top: 50%;
    margin-top: -280px;
    margin-left: -245px;
    z-index:3;
    filter:alpha(opacity=.1);
    and opacity:.1;
    }

    * html #rightcolumn{ /*IE only style*/
    height: 400px;
    }

    and within my flash I have

    var divURL:String = "clear.htm";
    getURL("javascript:ajaxpage('"+String(divURL)+"', 'rightcolumn');");


    The clear html itself is just an empty container

    Would appreciate any help with this been fighting Bill Gates for 2 days now.
    Alternatively how would I change the css for the div to be hidden as opposed to loading in the empty html?
    Last edited by Cortez; 11-25-2008 at 07:16 PM.

  7. #7
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    First the easy question:
    Alternatively how would I change the css for the div to be hidden as opposed to loading in the empty html?
    You can hide an element by giving it a display:none style property;

    About the rest... the error is probably in your AJAX script (out of my area of expertise). If it's working in other browsers, that's most likely it. The HTTP Request object is called differently in different browsers.

    I would suggest some reduction testing. Get the AJAX script to work in IE with HTML. Then add Flash.

  8. #8
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    A whole new world to me honestly AJAX really I just found that script on this forum and mixed it with my flash. Reading up on it I realize I need to do some more reading up on it for my websites.
    I started to rebuild and realized I've got the wrong doc type would this cause the problem with IE but not the others?

    One other question about the css
    to call the html into the div from flash i used this code

    var divURL:String = "clear.htm";
    getURL("javascript:ajaxpage('"+String(divURL)+"', 'rightcolumn');");

    how do I properly reference the css in order to attach a different style to the div?

    Thanks for the help!

  9. #9
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey Guys, i'm trying to use a flash button in place of a hyperlink for the facebox "http://www.dynamicdrive.com/dynamicindex4/facebox/index.htm" and the above suggestions don't seems to work...

    ...any Idea?

    -TheAgapist

  10. #10
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by TheAgapist View Post
    Hey Guys, i'm trying to use a flash button in place of a hyperlink for the facebox "http://www.dynamicdrive.com/dynamicindex4/facebox/index.htm" and the above suggestions don't seems to work...

    ...any Idea?

    -TheAgapist
    Facebox is another beast. It isn't triggered by a direct javascript call. At least, not by default. You have to set up a JS function that, when clicked, relays the proper information to facebox. If you search around here, you'll see examples of how I've done this in the past with Lightbox and Lightbox++.

    I'm not familiar with Facebox so I can't comment on the specifics of making this work.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •