Results 1 to 4 of 4

Thread: Using Ajax in Dreamweaver CS4

  1. #1
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using Ajax in Dreamweaver CS4

    I wanted to make a menu for my website, that would allow the viewer to click the menu, view the different texts, but the page won't reload. I researched how to do this and found the instructions on this page:

    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    However, apparently the codes don't work with my program, because it keeps saying no CSS properties apply to the current content.

    Are there any changes in the code I can make so this works? I'm new at web design so I'm not entirely sure about how to do that....

    Thanks for the help!!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Dreamweaver is like an HTML writing robot, and it's not particularly creative or smart. It can save you time, although often you will encounter problems from its limited skills.

    Regardless, continue to use DW if you want (I'd recommend against it unless you keep an eye on code view to be sure it's not doing anything weird). However, for any advanced scripting that will of course fall outside the range of what DW can handle. So you'll need to edit it all manually in the code view, hope that DW doesn't automatically update any of that code for some reason (usually it won't, not to say never), then preview in a real browser.

    Any time you're using Ajax or something that complicated, it's actually important to test it in the final environment. So upload it to your website, view it in a browser (or 3) and see if it works.

    Another important point is that the preview in DW is completely irrelevant. It may or may not be helpful to you as the designer, but the final output of DW is HTML just like something you'd type by hand. Then that is uploaded to your website and is viewed in a real browser. Unless someone is browsing your site in DW (and I don't think that's possible-- and it would make very little sense), it doesn't make any difference if there is an "error" or inconsistency in the way DW sees something.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well the real question was, how to I get my files to load using this format.

    Here is a line of code from the example website:
    <a href="javascript:ajaxpage('ajaxfiles/external2.htm', 'rightcolumn');">Ferrari Page</a>

    I tried to replace these files with my own, but it would never open. I'm just curious what the problem may be and if I can use ajax programing with dreamweaver...thanks!
    Last edited by christyaklein; 08-30-2011 at 05:46 PM.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    That's not AJAX that is a call to a function in a javascript file, that function probably executes the AJAX. I'm also not certain that calling it that way will work.

    I'd recommend using JQuery's AJAX, it is simpler to work with.

    http://api.jquery.com/jQuery.ajax/

    I use dreamweaver for 95% of my coding and haven't found an editor that can do what it can do. Most importantly formatting misformed XML (into a readable format, not corrected) and multiline find and replaces with Regex. It also will add the doctype and char encoding to files if specified in the preface (which I have default to my specs). I rarely use the design mode though as it is usually incorrect and modifies your code, it can be usefully if uncertain of a decimal entity. CS3 was crashing on me a lot but since upping to CS4 it's working great.
    Corrections to my coding/thoughts welcome.

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
  •