473,324 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Unknown Runtime Error in IE 8

Hi folks,

I am a new bee in Java Script and I have been facing many problems with different browsers. Most of the times it's with IE. The code I write works fine with Chrome and Firefox where as throws errors with IE. Anyways, coming to the actual problem, I have the requirement of creating a dynamic script element something like

<script type="text/javascript" src="myUrl"> function1( args1)</script>

I used DOM to do this and my code looks

var hip = document.createElement('script')
hip.type = 'text/javascript';
hip.src = "jscript file location";
hip.innerHTML = sjcap( defectSet );

Here defectSet is a fieldSet define prior to this new script element's definition and sjcap is a function in my class where I write the above piece of code.

Now the problem is, this works perfect with chrome and throws error "Unknown runtime error" in IE. I use IE 8. I have seen similar problem in this forum. but, I couldn't see any useful solution from it.

Few people said, IE doesn't support innerHTML for few elements like td, tr , tbody and few other says, take out "/" character in the strings.

Could some one suggest me on how to solve this problem please.
Jul 27 '10 #1
6 4572
Dormilich
8,658 Expert Mod 8TB
Few people said, IE doesn't support innerHTML for few elements like td, tr , tbody
that’s correct. (ref.)

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="myUrl"> function1( args1)</script>
function1() will not exist. either use the src or the content.
Jul 27 '10 #2
@Dormilich
So..

should I set this function1() as below

hip.content = function1() rather hip.innerHTML = function1()
Jul 27 '10 #3
Dormilich
8,658 Expert Mod 8TB
much more simple. call the external source in one script tag and the define the function in another (but doing the latter dynamically is hilarious, why creating an extry script tag for a function definition, when you just can write down the function definition in the current script).
Jul 27 '10 #4
Hello Dormilich,

I already have this function1() defined in a separate class and somewhere in the creation of my form, I have to dynamically call this function. So, I think, I must create a script Element with src set to the other class path and the value/content/text/innerHTMl set to function1().

This notation worked perfectly in Chrome where as giving problems in IE. I can not again write all that other class function details in my script tag. I am using DOM to create tags not writing html in strings.
Jul 27 '10 #5
Dormilich
8,658 Expert Mod 8TB
I already have this function1() defined in a separate class and somewhere in the creation of my form, I have to dynamically call this function. So, I think, I must create a script Element with src set to the other class path and the value/content/text/innerHTMl set to function1().
nope. if that "class"* definition is already loaded, you can call that function in any other script area/tag.

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="myUrl"></script>
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript"> function1(args1);</script>
* - btw. JavaScript does not know the concept of Classes (like in Java or C), because it’s a prototype-based language (a completely different approach)
Jul 27 '10 #6
Yes, that class is already loaded and that worked when used hip.innerHTML = function1() in Chrome. The problem is it's not working in IE. How to make it work in IE ??
Jul 27 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Ivan Debono | last post by:
Hi, I keep getting an Unknown runtime error on line 3 below: 1 If oField.Type <> 136 Then 'adChapter 2 If Right(oField.name, 3) = "_id" Then 3 For Each...
8
by: sudhaoncyberworld | last post by:
like below approach i need to add bulk of data in innertext, but for this simple case itself it is giving error, i badly need this approch and i failed with search also , so pl give me a soln asap,...
0
by: Sean OConnor | last post by:
I have three servers, public web server (e.g. web1), file server (file1), and web services server (service1). web1 is in the DMZ and file1 and service1 are internal. I'm calling the webservices...
7
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
20
by: vjayis | last post by:
hi when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me., here is my javascript code., ...
21
by: sheldonlg | last post by:
I have googled for '"Internet Explorer" "Unknown runtime error"' and not found anything useful. I have the following (for simplicity of presentation here): <div><table><tr><th...
3
by: vp.softverm | last post by:
hi all in the follwing part of code am getting the unknown runtime error at <select> any help .......................................... Org.getCategories({callback:function(cat) { var...
0
by: Julien Hoffmann | last post by:
Hi all, Me too I thought I could give out my solution to a similar problem ; hopefully it will help. Long story made short : On a VB.NET 3.5 + AJAX web site, I wanted my visitors to be able to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.