 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
cybermcm
Joined: 14 Aug 2008 Posts: 3
|
Posted: Thu Aug 14, 2008 9:12 pm Post subject: AJAX and message box problem |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Thu Aug 14, 2008 9:44 pm Post subject: Re: AJAX and message box problem |
|
|
| 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 |
|
 |
cybermcm
Joined: 14 Aug 2008 Posts: 3
|
Posted: Fri Aug 15, 2008 7:47 am Post subject: |
|
|
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
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Fri Aug 15, 2008 8:27 am Post subject: |
|
|
| 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 |
|
 |
cybermcm
Joined: 14 Aug 2008 Posts: 3
|
Posted: Fri Aug 15, 2008 12:11 pm Post subject: |
|
|
mark you did it and saved my day!
thx a lot! |
|
| Back to top |
|
 |
|
|
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
|
|