PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
AJAX and message box problem

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML
View previous topic :: View next topic  
Author Message
cybermcm



Joined: 14 Aug 2008
Posts: 3

PostPosted: Thu Aug 14, 2008 9:12 pm    Post subject: AJAX and message box problem Reply with quote

Hi community,

I'm playing with AJAX (I'm a newbie), but it is working better the I thought.
I created a message box with some output:


Then I want to refresh the box (which is inside of a div element) and this also works but the box design has changed (2 scrollbars):


Is this an HTML/CSS problem or an AJAX problem?
It occurs with IE and FF?

Any hint?

greetings,
CyberMCM
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Thu Aug 14, 2008 9:44 pm    Post subject: Re: AJAX and message box problem Reply with quote

cybermcm wrote:
Is this an HTML/CSS problem or an AJAX problem?


Yes, no. Either the AJAX generated content is too big for your div/iframe/whatever, or your HTML code or your CSS styles are broken. Not really a PEAR related problem, therefore.
Back to top
View user's profile Send private message
cybermcm



Joined: 14 Aug 2008
Posts: 3

PostPosted: Fri Aug 15, 2008 7:47 am    Post subject: Reply with quote

hi mark,

thx for your reply, I found the error.
The problem was that I reloaded the div inside my php file which I picked for refresh Embarassed

but now I realized a new problem:
On the first load everything is fine but after the refresh the character encoding of my text in the message box is corrupted.

Any idea why?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Fri Aug 15, 2008 8:27 am    Post subject: Reply with quote

cybermcm wrote:
but now I realized a new problem:
On the first load everything is fine but after the refresh the character encoding of my text in the message box is corrupted.


Your AJAX scripts needs to declare the character set that is used, e.g. by this line of code (if ISO-8859-1 is used):
Code:

header('Content-type: text/html; charset=iso-8859-1');
Back to top
View user's profile Send private message
cybermcm



Joined: 14 Aug 2008
Posts: 3

PostPosted: Fri Aug 15, 2008 12:11 pm    Post subject: Reply with quote

Idea mark you did it and saved my day!

thx a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software