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

DOM script not working in IE

Hi all, I have a problem with my script, I'm using javascript DOM to
update my page.

The getPortals() function updates a select list whichs shows portals.

The doUpdate() function updates a portal and after that it re-builds
the select list by calling the getPortals function at the end of the
update function.

This is working in Opera (without the alert() at the doUpdate()
funtion), but it is not working correct in Internet Explorer, It only
updates it just one times after that the update is not made in IE, I
have checked with alerts that the doUpdate() script is calling the
script.

Now the wird part, if I put an alert() after I called the doUpdate()
function and updated the field (see the script below) it is working in
IE but no longer in Opera :S.

Perhaps I'm doing something wrong?

Regards,

Arno

Part of the Script:
------------------------------------------------------------

function getPortals() {
var url = 'libs/xml/getPortals';

http.open('get', url, true);
http.onreadystatechange = handlePortals;
http.send(null);
}

function handlePortals()
{
if(http.readyState == 4)
{
var sl = document.getElementById('portal');
sl.options.length = 0;

var xml = http.responseXML.getElementsByTagName('data')[0];
var num = xml.childNodes.length;

if(xml.getElementsByTagName('content')[0].firstChild.data !=
'null')
{
for(i=0;i<num;i++)
{
sl.options[sl.length] = new
Option(xml.getElementsByTagName('content')[i].getElementsByTagName('name')[0].firstChild.data,
xml.getElementsByTagName('content')[i].getElementsByTagName('id')[0].firstChild.data);
}
}
}
}

function doUpdate() {
var url = 'libs/xml/update';
var frm = document.forms['update'];

http.open('get',
url+'?id='+frm.id.value+'&name='+frm.name.value+'& keyword='+frm.keyword.value+'&pagetext1='+frm.page text1.value+'&pagetext2='+frm.pagetext2.value+'&li nktext='+frm.linktext.value+'&barcodetext='+frm.ba rcodetext.value,
true);
http.send(null);

document.getElementById('page').style.visibility = 'hidden';
//alert('Portal Updated');

getPortals();
}

------------------------------------------------------------

Feb 22 '06 #1
1 1640
Seems that it is not allowed to call getPortals(); within the doUpdate
function :S

I have removed the getPortals(); at the end and added a button that
calls the getPortals(); function.

This seams to work fine.

But I want the list to be updated authomaticlly, anyone got any ideas?

Feb 22 '06 #2

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

Similar topics

9
by: Flynn | last post by:
My understanding of javascript is very limited. Could some one help me out. I found this code for an image gallery viewer. It works fine on my site, but I'd like to modify it so that the mainpic...
2
by: Nasir Wasim | last post by:
How can Access DIV Properties in Script while using Netscape 7.2. I want to use the div id with it's Visibility and left propertyin script but it's not working :-( Main File : ----------- ...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
1
by: Steve Richter | last post by:
have just installed the Microsoft script debugger for windows 2000: http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en ( notice the "this...
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
2
by: Tereska | last post by:
I want to delete script added before. I'm adding script dynamically and i'm removing later. Why it is still working? I have something like this: <html> <head> <title>JS Script...
9
by: whitgurley | last post by:
I've searched the web as well as I can for a solution to this problem but have found nothing and just don't know enough about JavaScript to figure out what's going. What I'm trying to do is convert...
9
by: Jerim79 | last post by:
Here it is: <?php if($_SERVER=='POST'){ $Number=$_POST; $Email=$_POST; $Number2=0; $error=0;
3
by: malaysiauser | last post by:
Dear all, Last year I install a download control script in Linux server. its working. This year i'd changed my hosting server to other company. i'd tried install the script. It was installed...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.