Bug 130806 - KHTML didn't Display js event with asyncron XMLHTTPRequest (Ajax) Requests
Summary: KHTML didn't Display js event with asyncron XMLHTTPRequest (Ajax) Requests
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-14 10:41 UTC by Juergen Heinemann
Modified: 2023-01-07 05:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Heinemann 2006-07-14 10:41:09 UTC
Version:           3.5.3 (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3.5 
OS:                Linux

if writing script with js:event innerHTML oder createElement by asyncron XMLHTTPRequest.
Konqueror didn't Display the returned Values.
If i set a style.display Attributes befor innerHTML then it works.
Exmaple:
[XHTML]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>event</title>
   <meta name="GENERATOR" content="Quanta Plus" />
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <script language="javascript" type="text/javascript">
   /* <![CDATA[ */
		function SendRequests(obj,item)
		{
			var xo = false;
			var url = 'http://'+window.location.hostname+'/receiver.php';

			try {
				xo = new XMLHttpRequest();
			} catch(e) {
				try {
					xo = eval("new A" + "ctiv" + "eX" + "Ob" + "ject('Micr" + "osoft.XM" + "LHTTP');");
				} catch(e) {
					xo = false;
				}
			}
		
			if ( ! xo ) {
				alert("XMLHttpRequest Error!");
				return false;
			}
		
			var Listener = function()
			{
				switch( xo.readyState ) {
					case 4:
						if ( xo.status == 200 ) {
							if( xo.responseText.length >= 4 ) {
								var ret = eval( unescape( xo.responseText ) );
								try {
										var elem = document.getElementById(obj);
										// FIXME KHTML 3.5.3
										// elem.style.display = '';
										elem.innerHTML = ret.join( ' ' );
								} catch( err ) {
									xo.abort();
								}
							}
						}
				}
			}
			if ( item.length >= 3 ) {
				xo.open( "POST", encodeURI( url ), true );
				xo.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
				xo.setRequestHeader( 'Accept-Charset', 'utf-8, unicode-1-1;q=0.8' );
				xo.setRequestHeader( 'Accept', 'text/plain, text/html' );
				xo.setRequestHeader( 'Content-Length', item.length );
				xo.onreadystatechange = Listener;
				xo.send( "sendrequest=[\""+ encodeURI( item ) +"\"]" );
			}
			return false;
		}
   /* ]]> */
   </script>
   <style type="text/css">
      /* <![CDATA[ */
         #Display { display: block; min-height: 20px; }
      /* ]]> */
   </style>
</head>
<body>
<div>
   <div id="Display">
   </div>
   <input onkeyup="javascript:SendRequests('Display',this.value);" type="text" />
</div>
</body>
</html>
[/XHTML
PHP Script.
[PHP]
<?php
	sleep(1);
	header( "Content-Type: text/plain; charset: UTF-8;" );
	print strftime( "[%d,%m,%Y,'%T']", time() );
?>
[/PHP]
Comment 1 Allan Sandfeld 2010-04-16 19:04:02 UTC
So the case is that you load some content, but it isn't shown after being inserted, but simply reseting the display will show it?

This sounds like the modified DOM node might need to be restyled.
Comment 2 Andrew Crouthamel 2018-11-02 23:07:11 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Andrew Crouthamel 2018-11-16 05:23:54 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 4 Justin Zobel 2022-12-08 23:51:17 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 Bug Janitor Service 2022-12-23 05:21:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2023-01-07 05:23:48 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!