Solved

IE javascript error

Posted on 2009-07-03
4
378 Views
Last Modified: 2013-11-19
I am using the following Ajax file upload plugin ( http://valums.com/ajax-upload/comment-page-1/#comment-1005 ) and I am getting the following error:

Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

The issue only occurs in IE.

Any help?
0
Comment
Question by:sydron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Shahzad Fateh Ali
ID: 24771523
I have tested this plugin and it works fine. Can you paste your html source here for further reference
0
 

Author Comment

by:sydron
ID: 24771583
Here is my local html file.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
	<title>
	
	
	</title>
	<meta http-equiv="Pragma" content="no-cache"> 
	
 
<link rel="stylesheet" type="text/css" href="/css/classic/screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/classic/print.css" media="print" />
 
<link rel="stylesheet" type="text/css" href="/css/classic/stylesheet.css" id="stylesheet" />
<link rel="stylesheet" type="text/css" href="/css/classic/proof.css" id="proof" />
<link rel="stylesheet" type="text/css" href="/css/classic/grid.css" />
<link rel="stylesheet" type="text/css" href="/css/classic/dataentry.css" />
 
<link rel="stylesheet" type="text/css" href="/css/classic/window.css" />
<link rel="stylesheet" type="text/css" href="/css/classic/smallgrid.css" />
<link rel="stylesheet" type="text/css" href="/css/classic/calendar.css" />
 
 
<script type="text/javascript" src="/global.js"></script>
<script type="text/javascript" src="/scripts/overlib/overlib.js"></script><!-- overLIB (c) Erik Bosrup -->
<script type="text/javascript" src="/scripts/jquery/jquery-latest.pack.js"></script>
<script type="text/javascript" src="/scripts/jquery/plugins/form/form.js"></script>
 
 
<link rel="stylesheet" type="text/css" href="/css/classic/calendar2.css">
<script type="text/javascript" src="/scripts/calendar2.js"></script>
 
	
 
 
 
 
</head>
<body>
<div align="center">
 
 
 
 
 
 
	<script type="text/javascript" src="ajaxupload.3.2.js"></script>
<script type="text/javascript">
	function setUploader(upload, preview, image) {
		new Ajax_upload(upload, {
			action: '/iselect/media/dsp_upload.cfm',
			name: 'media_filename',
			autoSubmit: true,
			responseType: 'json',
			onChange: function(file, extension) {},
			onSubmit: function(file, extension) {
				$(upload).after('<img src="/images/icons/wait_small.gif" id="loading" />');
			},
			onComplete: function(file, json) {
				
				if (json.ERROR) {
					
					// display the error message
					$('#image_error').show();
					$('#image_error_message').html(json.ERRORMSG);
					
					$(preview).attr('src', unescape ( json.SRC  ) );
					$(image).attr('value', '' );
 
					// disable all input
					$(".metadata").attr("disabled", "disabled");
					
				} else {
					
					// display success message
					$(preview).attr('src', unescape ( json.SRC  ) );
					$(image).attr('value', json.FILE);
					$('#image_error').hide();
					$('#image_error_message').html('');	
 
					$(".metadata").attr("disabled", "");
								
				}
				
				$('#loading').remove();	
			}
		});
	}
	
	//disable all the form fields
	$(".metadata").attr("disabled", "disabled");
	
</script>
 
 
 
<script type="text/javascript">
	var x = setUploader('#upload', '#preview', '#poster');
</script>
</div>
 
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
 
</body>
</html>

Open in new window

0
 
LVL 9

Accepted Solution

by:
Shahzad Fateh Ali earned 500 total points
ID: 24771634
you need to call your code after your page has been loaded. Try the modified code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
        <title>
        
        
        </title>
        <meta http-equiv="Pragma" content="no-cache"> 
        
 
<link rel="stylesheet" type="text/css" href="/css/classic/screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/classic/print.css" media="print" />
 
<link rel="stylesheet" type="text/css" href="/css/classic/stylesheet.css" id="stylesheet" />
<link rel="stylesheet" type="text/css" href="/css/classic/proof.css" id="proof" />
<link rel="stylesheet" type="text/css" href="/css/classic/grid.css" />
<link rel="stylesheet" type="text/css" href="/css/classic/dataentry.css" />
 
<link rel="stylesheet" type="text/css" href="/css/classic/window.css" />
<link rel="stylesheet" type="text/css" href="/css/classic/smallgrid.css" />
<link rel="stylesheet" type="text/css" href="/css/classic/calendar.css" />
 
 
<script type="text/javascript" src="/global.js"></script>
<script type="text/javascript" src="/scripts/overlib/overlib.js"></script><!-- overLIB (c) Erik Bosrup -->
<script type="text/javascript" src="/scripts/jquery/jquery-latest.pack.js"></script>
<script type="text/javascript" src="/scripts/jquery/plugins/form/form.js"></script>
 
 
<link rel="stylesheet" type="text/css" href="/css/classic/calendar2.css">
<script type="text/javascript" src="/scripts/calendar2.js"></script>
 
        
 
 
 
 
</head>
<body>
<div align="center">
 
 
 
 
 
 
        <script type="text/javascript" src="ajaxupload.3.2.js"></script>
<script type="text/javascript">
        function setUploader(upload, preview, image) {
                new Ajax_upload(upload, {
                        action: '/iselect/media/dsp_upload.cfm',
                        name: 'media_filename',
                        autoSubmit: true,
                        responseType: 'json',
                        onChange: function(file, extension) {},
                        onSubmit: function(file, extension) {
                                $(upload).after('<img src="/images/icons/wait_small.gif" id="loading" />');
                        },
                        onComplete: function(file, json) {
                                
                                if (json.ERROR) {
                                        
                                        // display the error message
                                        $('#image_error').show();
                                        $('#image_error_message').html(json.ERRORMSG);
                                        
                                        $(preview).attr('src', unescape ( json.SRC  ) );
                                        $(image).attr('value', '' );
 
                                        // disable all input
                                        $(".metadata").attr("disabled", "disabled");
                                        
                                } else {
                                        
                                        // display success message
                                        $(preview).attr('src', unescape ( json.SRC  ) );
                                        $(image).attr('value', json.FILE);
                                        $('#image_error').hide();
                                        $('#image_error_message').html('');     
 
                                        $(".metadata").attr("disabled", "");
                                                                
                                }
                                
                                $('#loading').remove(); 
                        }
                });
        }
        
        //disable all the form fields
        $(".metadata").attr("disabled", "disabled");
        
</script>
 
 
 
<script type="text/javascript">
      $(function(){
             var x = setUploader('#upload', '#preview', '#poster');
      });
</script>
</div>
 
<p> </p>
<p> </p>
<p> </p>
<p> </p>
 
</body>
</html>

Open in new window

0
 

Author Comment

by:sydron
ID: 24771737
Perfect. That fixed it. Thanks so much.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP: Filling Out/Creating a PDF 29 97
converting document.write() to innerHTML 7 47
Two decimal 5 26
How to show popup no matter what a user clicks on navigation wise 10 32
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question