Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
|
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2007, 12:47 PM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ajax- loading content

Hello,

I' ve started programming a web page with Ajax and I am wondering how to load different content in web page. My problem is:
Is better way to load main content(HTML file) through iframe and then load needed data and insert them into the main content or to program the whole page in javascript by using DOM functions and load only data and insert them into made DOM?

Please consider that the the whole page has a lot of different built contents. I really need proffesional advice.

Regards,
SC

 
Old May 3rd, 2007, 02:09 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Quote:
quote:Originally posted by spacecraft
  I really need proffesional advice.

Regards,
SC
Well if you really need professional advice they are plenty of paid consultants to be found :) Here's mine gratis.

The iframe method is a bit passé now that 90% of standard browsers (desktop ones) support access via XMLHttpRequest, and most low-level devices that don't support it struggle with (i)frames anyway, so I'd suggest XMLHttpRequest. It's also easier to manage multiple simultaneous requests. If you are pulling content from external services you'll need a server-side proxy anyway as modern devices don't let you access the contents of an (i)frame if the domain is different to the main page.
Wrox's Professional Ajax covers the different options at some length and gives a fuller picture of their pros and cons.

--

Joe (Microsoft MVP - XML)
 
Old May 3rd, 2007, 06:29 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for you answer.
I have read Professional Ajax and I know that XMLHttpRequest is better solution. I was probably not enough clear, soo I will describe my problem again.
Which way is better:
- to load DOM from a file like HTML and also make XMLHttpRequest to load data from a server and then insert them into loaded DOM,
- to program the DOM in javascript and also make XMLHttpRequest to load data from a server and then insert them into made DOM?

Thank you again.
SS






Similar Threads
Thread Thread Starter Forum Replies Last Post
Recommend an AJAX IDE - JoyiStar AJAX WebShop. kingstar Ajax 4 December 15th, 2006 05:12 AM
Ajax and javascript loading pppswing Ajax 0 September 21st, 2006 01:27 AM
new Ajax article: Creating an Ajax Search Widget jminatel Ajax 0 May 11th, 2006 02:50 PM
Choosing content depending on content of other ele dsekar_nat XSLT 1 February 27th, 2006 05:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.