473,387 Members | 1,517 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,387 software developers and data experts.

unknown runtime error in IE

hi all in the follwing part of code am getting the unknown runtime
error at <select>

any help ..........................................

Org.getCategories({callback:function(cat) {
var begin="<select name='categorylist' id='categorylist'
onchange='eval(this.value);'>";
var opt="<option value=\"\" >Select Category</option>";
for(var i=0; i<cat.length; i++)
{
var optid="catid"+i;
opt+="<option
value='javascript:loadFields("+cat[i].id+")' >"+cat[i].name+"</
option>";
}
var finalStr=begin+opt+"</select";
try{

document.getElementById("catselect").innerHTML = finalStr;

} catch(ex){
alert(ex.message);
}
}, async:false});

Jun 27 '08 #1
3 2063
On May 26, 11:30 am, vp.softv...@gmail.com wrote:
hi all in the follwing part of code am getting the unknown runtime
error at <select>

any help ..........................................

Org.getCategories({callback:function(cat) {
var begin="<select name='categorylist' id='categorylist'
onchange='eval(this.value);'>";
var opt="<option value=\"\" >Select Category</option>";
for(var i=0; i<cat.length; i++)
{
var optid="catid"+i;
opt+="<option
value='javascript:loadFields("+cat[i].id+")' >"+cat[i].name+"</
option>";
}
var finalStr=begin+opt+"</select";
try{

document.getElementById("catselect").innerHTML = finalStr;

} catch(ex){
alert(ex.message);
}
}, async:false});
Simplify your functions...
I suspect that you are missing a quote " somewhere...
Jun 27 '08 #2
On May 27, 3:49 pm, GArlington <garling...@tiscali.co.ukwrote:
On May 26, 11:30 am, vp.softv...@gmail.com wrote:
hi all in the follwing part of code am getting the unknown runtime
error at <select>
any help ..........................................
Org.getCategories({callback:function(cat) {
var begin="<select name='categorylist' id='categorylist'
onchange='eval(this.value);'>";
var opt="<option value=\"\" >Select Category</option>";
for(var i=0; i<cat.length; i++)
{
var optid="catid"+i;
opt+="<option
value='javascript:loadFields("+cat[i].id+")' >"+cat[i].name+"</
option>";
}
var finalStr=begin+opt+"</select";
try{
document.getElementById("catselect").innerHTML = finalStr;
} catch(ex){
alert(ex.message);
}
}, async:false});

Simplify your functions...
I suspect that you are missing a quote " somewhere...
Try to remove "javascript:" prefix inside "value" attribute. Function
eval() accept valid JavaScript code, but value: will generate syntax
error.
Jun 27 '08 #3
Legaev Andrey wrote:
On May 27, 3:49 pm, GArlington <garling...@tiscali.co.ukwrote:
>On May 26, 11:30 am, vp.softv...@gmail.com wrote:
>>hi all in the follwing part of code am getting the unknown runtime
error at <select>
any help ..........................................
Org.getCategories({callback:function(cat) {
var begin="<select name='categorylist' id='categorylist'
onchange='eval(this.value);'>";
[...]
opt+="<option
value='javascript:loadFields("+cat[i].id+")' >"+cat[i].name+"</
option>";
[...]

Try to remove "javascript:" prefix inside "value" attribute. Function
eval() accept valid JavaScript code, but value: will generate syntax
error.
`javascript:' is a LabelStatement. It will only cause a syntax error with
eval() if LabelStatements are not supported by the implementation. However,
this is unlikely as it requires an implementation of ECMAScript Ed. 1 or 2.
Nevertheless, the LabelStatement is unnecessary here.

Please learn how threaded discussions on Usenet work and reply to the
posting that you are directly referring to. This is even possible with
Google Groups' flawed Web interface.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
2
by: Pablo | last post by:
I have a dilemma. Currently, I may be passing standard text (strings of char) or binary of 1 to 'x' bytes long to a program for comparison with data previously written to a file. The problem...
0
by: Sccr18 | last post by:
I am trying to unlock IDs using active directory. One line of code keeps giving my the same error: System.Runtime.InteropServices.COMException: Unknown error. No matter how I type this line in I...
5
by: Lars-Erik Aabech | last post by:
Hi! Guess it's my day again.. Tried to deploy a test release of a new asp.net web today, and got a terrible error. The web is running swell on three development computers, but when it's copied...
22
by: José Teixeira Junior | last post by:
Hi, How i can add one new unknown control at runtime in my form1? Thaks.
10
by: rwalrus | last post by:
Getting an "unknown runtime error code 0" in IE6 on the last two lines of the function below. Works fine in Firefox 1.5, I can't figure out what IE is complaining about. Both "subtotal" and...
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...
1
by: sasikumarks | last post by:
Hi, Im using the following code to retrieve the user details from the AD server. But when i execute the code,it throws me the error. Please help me in this...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.