1) zlizliGroup: Members Posts: 3Joined: 29 Apr 2008Location: IP: 70.21.--.--
Posted:
Hi, Angus,
Thanks for the great script. I am using the "loadinto" feature to load another web page into an area of a web page. It worked in one setting which is within a wiki that uses smarty. However, in another setting which is simple php/html file, I can only get the second page to load into the designated area if I insert an "alert" statement in the "addEvent" section in the javascript section of the php/html file. Otherwise nothing happens after I click the link (no page is loaded). Furthermore, I noticed that the "addEvent" was called twice when I clicked the link once (two alerts).
I am using the 1.0beta version of htmlhttprequest.html and accompanying js.
Thanks a lot for your help.
Z
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
Does the demonstration file work OK on my website for you?
It might be a strange interaction with another script...? Do you have a link to the page in question?
- Angus.
3) zlizliGroup: Members Posts: 3Joined: 29 Apr 2008Location: IP: 68.37.--.--
Posted:
Yes, the demo works fine. You are correct! I do have another js script in the same html document. After I took that out, yours worked fine. That script is doing mouse-over menu thing. It uses addEventListener as well but only for "mouseover". I don't know whether it might interfere with your script. Unfortunately the page is still under development so I don't have one to the public. However, that script for mouseover is an open-source script named mm_menu.js. I can send it to you if I can have your email address.
Thanks again for your help.
Z
4) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 203.173.--.--
Posted:
Try reversing the order of the scripts with this one last.
- Angus.
5) zlizliGroup: Members Posts: 3Joined: 29 Apr 2008Location: IP: 70.21.--.--
Posted:
Thanks, Angus. I did that but it did not help. However, I dug into the mm-menu.js code and found that the problem was with a line "if (document.captureEvents) document.captureEvents(Event.MOUSEUP);". If I commented out that line, everything works fine so far. I googled about document.captureEvents and got the impression that it was needed only for Netscape 4. I am not a javascript expert. Is it true? If it is, then I can live with that line commented out.
Thanks,
Z
6) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
It is rather old school yes :). I suspect that, if you don't care about NS4 compatibility, you can just leave it out!
Firefox technically still implements parts of the old NS4 event spec in places, this could be one of those weird issues.