TwelvestoneFront End

Calling up recipes without page reload


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Thad
 
2010-09-03

I'm working on page that's basically a list of drink recipes, with a list of the drinks by name on the left that call the recipe up on the right on click.

What I'm trying to avoid is making a separate html page for each recipe, as this will eventually become an admin-driven editable page. What I want to do is load the menu on the left with a javascript include, and then have it access a single document with the list of recipes, and dynamically load the corresponding recipe when the drink name is clicked on the left menu.

I've found some Ajax/jquery examples that recreate the front-end functionality, but they all either require adding all the content iterations in the html document or creating several different files to load each separately, and that defeats the purpose of having a single editable source document.

It's a bit of database-type functionality, and something tells me I might have to wrestle up some PHP to pull this off, but wanted to see if any of y'all might have some ideas on how to pull this off more simply and elegantly.

Here are a couple samples I found of the basic funtionality: http://www.blackoutwebdesign.com/ajax.demo.php#1 http://www.angel-computers.co.uk/

Except that instead of using tabs & buttons, my navigation would be simply hyperlinked drink titles.

wowbagger[tip]
 
2010-09-03

I would use a single xml as a source for the left menu, where names of drinks and perhaps location attributes are contained. Then have either the menu load the xml and loop over it to build the menu view, or create it directly via an xslt transformation on the xml.

Thad
 
2010-09-03

I wound up using a simple javascript using ajax to call the content into a div, and placing the different recipes as single html files in a subfolder under the root domain. It's every bit as clean functionality-wise as I was looking for, but I'll have to work on making it more admin-friendly when we get to the phase 2 portion of the site development.

I was considering an xml solution, but I've got little direct experience with it to draw from at present.

Storm
 
2010-09-03

once you do it, you'll love wowbagger forever for suggesting it! k Share your love Thad!!

http://www.w3schools.com/xsl/xsl_transformation.asp

jestros
 
2010-09-07

Originally posted by: Thad I wound up using a simple javascript using ajax to call the content into a div, and placing the different recipes as single html files in a subfolder under the root domain. It's every bit as clean functionality-wise as I was looking for, but I'll have to work on making it more admin-friendly when we get to the phase 2 portion of the site development.

I was considering an xml solution, but I've got little direct experience with it to draw from at present.

It sounds like what you've got would be easily transformed from the html file you have to hold the data, to an xml file. Post up the code so's we can play with it.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFront End

Calling up recipes without page reload