HighDots Forums  

Noob AJAX question -

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Noob AJAX question - in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default Noob AJAX question - - 03-25-2009 , 07:13 PM






I've got 5 pages that are pretty identical except for the center box... same
height/width/everything. And it just occured to me that I could use AJAX to
load this content instead of using PHP includes on several PHP pages (to
clone the identical content).

Could someone point me towards a basic tutorial on how to call data without
reloading the page? I'm essentially swapping two divs for two other divs
each time I click a new option on the menu.



Reply With Quote
  #2  
Old   
Al Sparber - PVII
 
Posts: n/a

Default Re: Noob AJAX question - - 03-25-2009 , 08:06 PM






If you use Ajax your nice pages will become inaccessible.

--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/apm
An Accessible & Elegant Accordion




"Mike" <mike (AT) nospam (DOT) com> wrote

Quote:
I've got 5 pages that are pretty identical except for the center box...
same height/width/everything. And it just occured to me that I could use
AJAX to load this content instead of using PHP includes on several PHP
pages (to clone the identical content).

Could someone point me towards a basic tutorial on how to call data
without reloading the page? I'm essentially swapping two divs for two
other divs each time I click a new option on the menu.



Reply With Quote
  #3  
Old   
Massimo Foti
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 03:37 AM



"Mike" <mike (AT) nospam (DOT) com> wrote

Quote:
I've got 5 pages that are pretty identical except for the center box...
same height/width/everything. And it just occured to me that I could use
AJAX to load this content instead of using PHP includes on several PHP
pages (to clone the identical content).

Could someone point me towards a basic tutorial on how to call data
without reloading the page? I'm essentially swapping two divs for two
other divs each time I click a new option on the menu.
PHP and includes are the best solution. Using Ajax the content will not be
visible to search engines and have accessibility problems.

If you can live with that (like on an intranet or the like). This could
help:
http://www.massimocorner.com/libraries/csi/

Once again, let me stress includes are a superior solution.


--
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion, JavaScript and Dreamweaver:
http://www.massimocorner.com
----------------------------




Reply With Quote
  #4  
Old   
DWFAQ.info
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 05:50 AM



Heya Mike,

Here's a link to spry master detail There's also a video tutorial in adobe
video workshop.

http://labs.adobe.com/technologies/spry/samples/data_region/DetailRegionEffectsS
ample.html

http://www.adobe.com/designcenter/video_workshop/

Instead of 5 pages with php include you might want to consider using one page,
create recordset that filters database id through URL parameter, then display
info on page by placing the binding into the page from the bindings tab. Thne
you can have 5+ pages using one file by showing info from database so
page.php?id=1 shows info for page 1 and page.php?id=2 shows info for page 2 and
so forth.

Hope that helps!


Reply With Quote
  #5  
Old   
Al Sparber - PVII
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 09:35 AM



"DWFAQ.info" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Heya Mike,

Here's a link to spry master detail There's also a video tutorial in adobe
video workshop.

http://labs.adobe.com/technologies/spry/samples/data_region/DetailRegionEffectsS
ample.html

Nice solution. The content is totally inaccessible. The original poster
might want to read this before embarking down the Ajax highway:
http://www.projectseven.com/testing/ajax_magic/content_switcher/explain-it.htm


--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/apm
An Accessible & Elegant Accordion






Reply With Quote
  #6  
Old   
Mike
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 11:36 AM



What precisely do you mean by inaccessible?

Are you only referring to the fact that I won't be able to land directly on
the contact page, for instance?

Wouldn't that be solvable by creating a backup PHP page for each of the 5
pages specifically for landing purposes?

If it weren't for the animation I'm proposing in thread "Using jquery to
animate this (link included)", I wouldn't care as much about the AJAX. But I
don't think what I'm looking to accomplish is do-able without it (see said
thread).

But I could be wrong! No one's touched that post yet. :-S



"Al Sparber - PVII" <pviiteam (AT) projectSPAseven (DOT) com> wrote

Quote:
Nice solution. The content is totally inaccessible. The original poster
might want to read this before embarking down the Ajax highway:
http://www.projectseven.com/testing/ajax_magic/content_switcher/explain-it.htm



Reply With Quote
  #7  
Old   
Al Sparber - PVII
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 12:08 PM



"Mike" <mike (AT) nospam (DOT) com> wrote

Quote:
What precisely do you mean by inaccessible?

Are you only referring to the fact that I won't be able to land directly
on the contact page, for instance?
I mean that a search engine will not "see" any of the content that is being
called via Ajax.

Quote:
Wouldn't that be solvable by creating a backup PHP page for each of the 5
pages specifically for landing purposes?
In a way, but it depends how you do it (Google: Hijax).

Quote:
If it weren't for the animation I'm proposing in thread "Using jquery to
animate this (link included)", I wouldn't care as much about the AJAX. But
I don't think what I'm looking to accomplish is do-able without it (see
said thread).

But I could be wrong! No one's touched that post yet. :-S
There is a chance you are not clearly understanding what Ajax really is.
JQuery is a script library and its animation functions do not require that
you also use Ajax. It can be used to simply manipulate content that is
already on the page (and therefore accssible to search engines, people with
script disabled, and assistive readers for the blind). A common
misperception of Ajax is that in the vast majority of cases, the content
involved is actually downloaded in total so the same results can be had by
loading the page with all the content also loaded (statically or via
conventional database query) and then manipulating its position and
visibility to shape it any way you want.


--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/apm
An Accessible & Elegant Accordion






Reply With Quote
  #8  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 12:15 PM



..oO(Mike)

Quote:
What precisely do you mean by inaccessible?
Try it without JavaScript (like in a text browser for example).

Quote:
Are you only referring to the fact that I won't be able to land directly on
the contact page, for instance?

Wouldn't that be solvable by creating a backup PHP page for each of the 5
pages specifically for landing purposes?
And why not drop the whole AJAX idea and use these 5 flat pages instead?
It's still the most reliable and userfriendly way. Of course AJAX has
its uses here and there, but usually it's far overestimated and just an
overrated hype, which creates more problems than it solves.

Make the entire thing work without relying on JS first, then add bells
and whistles if necessary.

Micha


Reply With Quote
  #9  
Old   
Mike
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 12:38 PM



I understand this, but have you seen the link? Those BG images, even
downsampled via GIMP, are roughly 200k each. This is necessary for the site
to work at resolutions as high as 1600. This is why I mentioned the idea not
really being considerable without using AJAX. I can't load 1MB worth of
images on the front landing page... that would be bad. :-(

"Al Sparber - PVII" <pviiteam (AT) projectSPAseven (DOT) com> wrote

Quote:
There is a chance you are not clearly understanding what Ajax really is.
JQuery is a script library and its animation functions do not require that
you also use Ajax. It can be used to simply manipulate content that is
already on the page (and therefore accssible to search engines, people
with script disabled, and assistive readers for the blind). A common
misperception of Ajax is that in the vast majority of cases, the content
involved is actually downloaded in total so the same results can be had by
loading the page with all the content also loaded (statically or via
conventional database query) and then manipulating its position and
visibility to shape it any way you want.




Reply With Quote
  #10  
Old   
Mike
 
Posts: n/a

Default Re: Noob AJAX question - - 03-26-2009 , 12:40 PM



See thread entitled "Using jquery to animate this (link included)" posted
this morning.

(The site *is* working with flat pages. And I'm at the bells and whistles
part now.)

There's a reason I referred you guys to it! :-) But everyone's avoiding that
post. Grr. Is there something repulsive in its subject line or something?

"Michael Fesser" <netizen (AT) gmx (DOT) de> wrote

Quote:
And why not drop the whole AJAX idea and use these 5 flat pages instead?
It's still the most reliable and userfriendly way. Of course AJAX has
its uses here and there, but usually it's far overestimated and just an
overrated hype, which creates more problems than it solves.

Make the entire thing work without relying on JS first, then add bells
and whistles if necessary.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.