473,772 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.onreadysta techange = handlePortals;
http.send(null) ;
}

function handlePortals()
{
if(http.readySt ate == 4)
{
var sl = document.getEle mentById('porta l');
sl.options.leng th = 0;

var xml = http.responseXM L.getElementsBy TagName('data')[0];
var num = xml.childNodes. length;

if(xml.getEleme ntsByTagName('c ontent')[0].firstChild.dat a !=
'null')
{
for(i=0;i<num;i ++)
{
sl.options[sl.length] = new
Option(xml.getE lementsByTagNam e('content')[i].getElementsByT agName('name')[0].firstChild.dat a,
xml.getElements ByTagName('cont ent')[i].getElementsByT agName('id')[0].firstChild.dat a);
}
}
}
}

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

http.open('get' ,
url+'?id='+frm. id.value+'&name ='+frm.name.val ue+'&keyword='+ frm.keyword.val ue+'&pagetext1= '+frm.pagetext1 .value+'&pagete xt2='+frm.paget ext2.value+'&li nktext='+frm.li nktext.value+'& barcodetext='+f rm.barcodetext. value,
true);
http.send(null) ;

document.getEle mentById('page' ).style.visibil ity = 'hidden';
//alert('Portal Updated');

getPortals();
}

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

Feb 22 '06 #1
1 1655
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
1810
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 image is linkable to a popup window displaying the same image only larger. Can this even be done? If so any ideas? Thanks in advance. <HEAD>
2
4758
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 : ----------- <div id="index" style="position:absolute; width:200px; height:115px; z-index:1; left:-400px; top: 286px visibility:false;">
0
3227
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 converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
1
1672
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 download is available to customers running genuine Windows Software" message on that page! ) and I am following the instructions here: http://www.devguru.com/features/tutorials/msd/msd_tutorial.html on how to install and use the debugger.
19
3827
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
5157
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 Remove</title> </head>
9
8559
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 this script: <a href="#" onclick="MM_goToURL('parent.frames','color2.html');return document.MM_returnValue">TEST</a> ....to something that I can use within a Flash movie, which as far as I can tell means that it needs to reside in the...
9
2403
by: Jerim79 | last post by:
Here it is: <?php if($_SERVER=='POST'){ $Number=$_POST; $Email=$_POST; $Number2=0; $error=0;
3
1845
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 properly but doesn't work. More about the script; This script will log date, time, ip address, by day, by month, by year and analysis of downloads. It has 4 log files for one module (year, date...) Now the problem is if i create new module, it...
0
9619
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10261
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9911
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.