Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-27-2007, 03:44 AM
WebProWorld Pro
 

Join Date: Jul 2003
Location: Canada
Posts: 268
ackerley1 RepRank 0
Default AJAX Giving me Fits!!

I am trying to create a site using AJAX page/link handlers, but I have coming across a few problems while implementing it.

Take a look here: Welcome to Think Belize

In FF my issues are:
1) the page will not expand with the content. the Content ends up spilling over both the right and bottom of the page.
2) The default content just ends up getting pushed down iand s displayed below the desired content instead of being hidden.

In IE my issues are:
1) The AJAX doesn't work on pages that have proper content (Works when I strip <p> and <h> HTML tags)
2) On longer pages the content background does not extend (fixed on index.php, but not on /list/results.php, and can't figure out why.)

Any insight into why this is happening??

Thanks in advance.

Rob
__________________
Rob
Reply With Quote
  #2 (permalink)  
Old 11-27-2007, 11:16 AM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 389
DaveSawers RepRank 1
Default Re: AJAX Giving me Fits!!

Doesn't look like your problem is with AJAX. More likely it is with your HTML/CSS.

For AJAX content, the best way to deal with it is to place the HTML returned from the AJAX call into a div somewhere on your page. Give the div an appropriate id ('divid') and then use the following in your Javascript when the AJAX has completed...

var returnhtml=xmlHttp.responseText;
var divobj=document.getElementById('divid');
divobj.set_html(returnhtml);

This should work for all browsers and does not require you to strip HTML tags or do other strange things.

To make the content expand with the page, simply make the enclosing div 100% wide (or some other appropriate value)
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #3 (permalink)  
Old 11-27-2007, 08:05 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 

Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,186
bj RepRank 2bj RepRank 2
Default Re: AJAX Giving me Fits!!

You have your clearing element in the wrong place, not to mention a bunch of invalid markup.
Reply With Quote
  #4 (permalink)  
Old 11-29-2007, 03:18 PM
seiretto's Avatar
WebProWorld Pro
 

Join Date: Nov 2006
Location: Huddersfield, Yorkshire, UK
Posts: 131
seiretto RepRank 0
Default Re: AJAX Giving me Fits!!

Hi Rob,

Its a nightmare when your AJAX does not play as expected.

Try using Firebug - a plugin for Firefox:
Firebug - Web Development Evolved

Just install the plugin and use it (no need to add any code to your pages), just right-click an object and select "Inspect Element" to debug the code.

Its error reporting will save you hours.

Happy coding

Dave.
__________________
Experienced UK website host hosting sites for over a decade; Need to host mutliple domains and websites check out our Reseller hosting or try our UK managed servers
Reply With Quote
  #5 (permalink)  
Old 11-30-2007, 05:03 PM
WebProWorld Member
 

Join Date: Aug 2006
Posts: 85
imsickofwebpro RepRank -1
Default Re: AJAX Giving me Fits!!

I don't like the word Ajax anymore... everyone should call it Spry Spry Spry. Hence, use Spry.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX and SEO. kgun Search Engine Optimization Forum 17 11-30-2007 05:51 PM
AJAX and SEO dak888 Search Engine Optimization Forum 10 05-16-2007 09:44 AM
AJAX, do I need it. kgun IT Discussion Forum 11 02-18-2007 07:01 AM
AJAX and SEO Zvolen Search Engine Optimization Forum 8 12-21-2006 04:39 AM
Google Says Taiwan Label Fits International Naming Conventi WPW_Feedbot Search Engine Optimization Forum 0 10-07-2005 09:30 AM


Search Engine Optimization by vBSEO 3.2.0