SEARCH YOUR SOLUTION HERE  

Problem with Javascript in Iframe


Can we write javascript in iframe
I want to call a external application javascript in my iframe of the jsp i am writing....issue is we can only have one call of this JS per page,now I am importing some html tags from a 3rd party which also does this Javascript call usig c:import...if this JS is called more than once my call will be ignored.
Only way that I have figured to fix it is by making these calls in separate iframes, by using iframes it appears to the external application that js is called by a separate page and it processes it.
So,what I am looking for is this:
1)First is there a way to do it w/o using iframe:
ex code:
//import a 3rd party url(

Posted On: Monday 19th of November 2012 04:22:47 AM Total Views:  299
View Complete with Replies




Related Messages:

help: problem with radio button   (132 Views)
Hi , please help me. $GetList = mysql_query("SELECT ItemID, Available FROM rewarditems",$link1); while($row = mysql_fetch_array($GetList)) { $ItemID = $row['ItemID']; $Available = $row['Available']; echo(""); if ($Available == 'No') { echo(" "); } if ($Available == 'Yes') { echo(" "); } echo(""); } if the user, click the checkbox, check or uncheck the checkbox, that specified item will update in mysql table. I just need to add onclick='' trigger in every checkbox.
having a problem   (224 Views)
Hi I am having a problem with code i have created to delete a customer from my database, would be grateful if someone could tel me where i have gone wrong
displaing points problem   (98 Views)
i'm having problem displaying number of points scored in a game for every one right answer users scores 2 points... and i'm having little problem in displaying these points in a box below the game :( can any one help me out on that one thank you :) Maths game var kNumberOfProblems = 10; var kTableIdForProblems = "practiceMathTableProblems"; var kTableIdForAnswers = "practiceMathTableAnswers"; var kTableIdForResults = "practiceMathTableResults"; var kMultiplication = 'x'; var kAddition = '+'; var kSubtraction = '-'; var kDivision = '\367'; var kNotAnswered = -1; var kBiggestOperand = Math.floor(Math.random()*101); var gStartTime = 0; var gProblemArray = new Array(); function assert(isTrue, message) { if (!isTrue) { alert(message) } } function myPop (string){ var generator=window.open('', 'name', 'width=400,height=100,toolbar=0,scrollbars=0,screenX=200,screenY=200,left=200,top=200'); generator.document.write('Math Challenge!'); generator.document.write(string); generator.document.write('Close'); generator.document.write(''); generator.document.close(); } function requestPrintTest(operation){ if (document.getElementById) { document.practiceMathForm.problem0.value = ''; document.practiceMathForm.problem1.value = ''; document.practiceMathForm.problem2.value = ''; document.practiceMathForm.problem3.value = ''; document.practiceMathForm.problem4.value = ''; document.practiceMathForm.problem5.value = ''; document.practiceMathForm.problem6.value = ''; document.practiceMathForm.problem7.value = ''; document.practiceMathForm.problem8.value = ''; document.practiceMathForm.problem9.value = ''; clearChildNodes(kTableIdForProblems); clearChildNodes(kTableIdForAnswers); clearChildNodes(kTableIdForResults); if (navigator.product && navigator.product == "Gecko") { setTimeout("printTest("+"'"+operation+"'"+")", 0); } else { printTest(operation); } } else { alert("Sorry, dynamic table feature works with IE5 or later for Windows, and Netscape 6 or later."); } gStartTime = getCurrentTimeInSeconds(); } function requestPrintResults(){ document.practiceMathForm.finishedButton.disabled=true; if ('' != document.practiceMathForm.problem0.value) gProblemArray[0].theirAnswer = document.practiceMathForm.problem0.value; else gProblemArray[0].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem1.value) gProblemArray[1].theirAnswer = document.practiceMathForm.problem1.value; else gProblemArray[1].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem2.value) gProblemArray[2].theirAnswer = document.practiceMathForm.problem2.value; else gProblemArray[2].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem3.value) gProblemArray[3].theirAnswer = document.practiceMathForm.problem3.value; else gProblemArray[3].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem4.value) gProblemArray[4].theirAnswer = document.practiceMathForm.problem4.value; else gProblemArray[4].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem5.value) gProblemArray[5].theirAnswer = document.practiceMathForm.problem5.value; else gProblemArray[5].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem6.value) gProblemArray[6].theirAnswer = document.practiceMathForm.problem6.value; else gProblemArray[6].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem7.value) gProblemArray[7].theirAnswer = document.practiceMathForm.problem7.value; else gProblemArray[7].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem8.value) gProblemArray[8].theirAnswer = document.practiceMathForm.problem8.value; else gProblemArray[8].theirAnswer = kNotAnswered; if ('' != document.practiceMathForm.problem9.value) gProblemArray[9].theirAnswer = document.practiceMathForm.problem9.value; else gProblemArray[9].theirAnswer = kNotAnswered; if (document.getElementById) { clearChildNodes(kTableIdForAnswers); clearChildNodes(kTableIdForResults); if (navigator.product && navigator.product == "Gecko") { setTimeout("printResults()", 0); } else { printResults(); } } else { alert("Sorry, dynamic table feature works with IE5 or later for Windows, and Netscape 6 or later."); } } function printTest(operation){ initializeMathProblemsArray(operation); printChallengeProblems(); enableFinishedButton(); } function getCurrentTimeInSeconds(){ return Math.round(new Date().valueOf()/1000); } function printResults(){ assert((0 != gStartTime), "Corrupt start time."); var elapsedTimeSecs= getCurrentTimeInSeconds() - gStartTime + 1; printAnswersAndResults(elapsedTimeSecs); } function initializeMathProblemsArray(operation){ var arrayIndex = 0, i, j; switch (operation) { case kAddition : for (i = 0; i
ajax form submission and block ui problems   (253 Views)
after finding out that i couldn't use form submit (which refreshes the page) alongside bockui i have decided to move onto ajax. i am not too good at ajax but i get the gist of it. but now block ui does not wish to work at all. here is the javascript i am using: $(document).ready(function() { //if submit button is clicked $('#submit').click(function () { //Get the data from all the fields var status = $('input[name=status]'); var pRent = $('input[name=pRent]'); var rentPaid = $('input[name=rentPaid]'); var pDate = $('input[name=pDate]'); //Simple validation to make sure user entered something //If error found, add hightlight class to the text field if (status.val()=='') { status.addClass('hightlight'); return false; } else status.removeClass('hightlight'); if (pRent.val()=='') { pRent.addClass('hightlight'); return false; } else pRent.removeClass('hightlight'); if (rentPaid.val()=='') { rentPaid.addClass('hightlight'); return false; } else rentPaid.removeClass('hightlight'); if (pDate.val()=='') { pDate.addClass('hightlight'); return false; } else pDate.removeClass('hightlight'); //organize the data properly var data = 'status=' + status.val() + '&pRent=' + pRent.val() + '&rentPaid=' + rentPaid.val() + '&pDate=' + pDate.val(); //disabled all the text fields $('.text').attr('disabled','true'); //show the loading sign $('.loading').show(); //start the ajax $.ajax({ //this is the php file that processes the data and send mail url: "resources/process.php", //GET method is used type: "GET", //pass the data data: data, //Do not cache the page cache: false, //success success: function (html) { //if process.php returned 1/true (send mail success) if (html==1) { //blockui $.blockUI({ message: $('#question'), css: { width: '1024px' } }); $('#yes').click(function() { // update the block message $.blockUI({ message: "Remote call in progress..." }); $.ajax({ url: 'wait.php', cache: false, complete: function() { // unblock when remote call returns $.unblockUI(); } }); }); $('#no').click(function() { $.unblockUI(); return false; }); //if process.php returned 0/false (send mail failed) } else alert('Sorry, unexpected error. Please try again later.'); } }); //cancel the submit button default behaviours return false; }); }); process.php
IE Timout problem   (109 Views)
Hi , I have a problem with Internet explorer as in my applications second page within few minutes I am getting - The web page cannot be displayed. The first page is working fine but in the second page it expires soon - Please help.
Ajax response problem   (111 Views)
hello members, i have wriiten a form in my php page and i did call an ajax function on onsubmit, based on my ajax response my form have to be submit...but i am not getting ajax response text some times. But some times i got it correctly..i have used post method in my ajax function. please check the code and do fix my problem. formid="reserve"; var f = document.getElementById(formid); var keyValue = ""; keyValue = buildKeyValueSearchFunction(f, keyValue); alert(keyValue); ajax_request = createRequestObject(); ajax_request.open('POST', 'checkpaycycle.php' , true); ajax_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); alert(ajax_request.readyState); ajax_request.onreadystatechange = function() { if (ajax_request.readyState == 4 ) { if(ajax_request.responseText!='') { alert(ajax_request.responseText); document.getElementById("error_pgrid").innerHTML=ajax_request.responseText; } } } ajax_request.send(keyValue); return false;
Scriptaculous problem   (109 Views)
! I got a little problem with my websites login page what I started making when I try to run a function in onClick section of button I have to click it two times that the effect comes If I put the code straight into the onClick it works properly I have no idea. I am really noob in JS as I haven't done it much, so sorry if this is stupid. You can see live demo here about the bug http://breakpoint.no-ip.org here is the HTML code which bugs Welcome to breakpoint - Login function checkLogin() { Effect.BlindDown('error'); return false; } function replacePass(obj){ var newO=document.createElement('input'); newO.setAttribute('type','password'); newO.setAttribute('name',obj.getAttribute('name')); newO.setAttribute('id', 'password'); obj.parentNode.replaceChild(newO,obj); newO.focus(); } function replaceName(obj){ if(obj.value == "ACCOUNT NAME") { var newO=document.createElement('input'); newO.setAttribute('type','text'); newO.setAttribute('name',obj.getAttribute('name')); newO.setAttribute('id', 'password'); obj.parentNode.replaceChild(newO,obj); newO.focus(); } }             Incorrect login! Name E-mail            This works Welcome to breakpoint - Login function checkLogin() { Effect.BlindDown('error'); return false; } function replacePass(obj){ var newO=document.createElement('input'); newO.setAttribute('type','password'); newO.setAttribute('name',obj.getAttribute('name')); newO.setAttribute('id', 'password'); obj.parentNode.replaceChild(newO,obj); newO.focus(); } function replaceName(obj){ if(obj.value == "ACCOUNT NAME") { var newO=document.createElement('input'); newO.setAttribute('type','text'); newO.setAttribute('name',obj.getAttribute('name')); newO.setAttribute('id', 'password'); obj.parentNode.replaceChild(newO,obj); newO.focus(); } }             Incorrect login! Name E-mail            Difference is that I put the code straight to the onClick and it works, I really need to put it into function. Check the site and see how it bugs
problem with javascript   (104 Views)
, I have the part of code presented below. It has 2 radiobuttons and 2 text inputs. When user selects the first radiobutton(value="searchw"), I would like to make textsearch1 enabled and textsearch2 disabled. And the opposite process.. when user selects the second radiobutton(value="searcht") I would like to make textsearch2 enabled and textsearch1 disabled. html code: search writer search themes and here is my javascript effort (which is maybe wrong it doesn't work :( ) function definesearchmode() { if (document.definesearch.searche.searchw.checked=true) { document.definesearch.textsearch1.disabled=false; document.definesearch.textsearch2.disabled=true; } else if (document.definesearch.searche.searcht.checked=true) { document.definesearch.textsearch1.disabled=true; document.definesearch.textsearch2.disabled=false; } } I call the script from here: I am newbie to javascript, code has some errors probably that I don't know how to figure it out...
Focusing problems   (133 Views)
I'm a newbie at this so couldn't figure this one out. Test JavaScript var frst=true; function first() { if(frst==true) { window.alert('Don't forget to Capitalize.'); } frst=false; } color smell rain the onfocus handler isn't working. focusing on the textbox doesnt do anything.
elementFromPoint() problems when window has been scrolled?   (151 Views)
, ... I have an HTML file which contains pages of formated text, all within a tag, which has an onclick call to a jscript function. This function gets mouse cursor position at the click event, then passes this position to elementFromPoint(pos.x,pos.y) to return my element object, which I then highlight. I did this using this method because it seemed to work best with my nested elements (always ) - sometimes nested 15-20 layers deep. This enables me to easily view the level of nesting, and start and end of this block of clicked text, which can sometimes be hundreds of lines long, within a file which can be thousands of lines long. I got this working in IE and Firefox, which are the only 2 browsers it will ever be used in. Well, at least I thought I had it working -until I scrolled the page, and suddenly it wasn't working anymore. This bug is the same in both browsers. function gCO(e) { e = e || window.event; var pos = getPosition(e); var obj = document.elementFromPoint(pos.x, pos.y); doHighlight(obj); } function doHighlight(ele) { if (ele.style.backgroundColor == "pink") { ele.style.backgroundColor=''; } else { ele.style.backgroundColor="pink"; } } function getPosition(e) { var cursor = {x:0, y:0}; if (e.pageX || e.pageY) { cursor.x = e.pageX; cursor.y = e.pageY; } else { var de = document.documentElement; var b = document.body; cursor.x = e.clientX + (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0); cursor.y = e.clientY + (de.scrollTop || b.scrollTop) - (de.clientTop || 0); } return cursor; } Is there a way to compensate for my page scroll offset
Ajax problem with IE and mysql/php   (118 Views)
, I have been searching for a solution on how to solve this problem for almost a month now. I'm at a point where I feel like I've traveled around the world 7 times and still haven't found the answer. I hate introductions so I'm just going to go ahead and break down the issue as detailed as I can explain it possible. scenario: user selects a value from a drop down, and the next drop down will then be dynamically changed based on the value selected. problem: ajax sends a request with parameters to a php script and the php script returns an html element(select with options). Problem is ajax retrieves empty results from the server therefore displaying the empty value/content. The code works perfectly fine on Chrome/Firefox.. but IE (surprise surprise) is giving out errors. I took airshow's advice and went ahead and posted the issue here. Thank you in advance for the help. HTML: Select a Year 2002   Make Javascript: var xmlhttp; var year; function showMake(str){ debugger; xmlhttp=GetXmlHttpObject(); if (xmlhttp==null){ alert ("Browser does not support HTTP Request"); return; } year = str; var url="data.php"; var vars = "year="+str; vars = vars +"&sid=" + new Date().getTime(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("POST",url, true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", vars.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(vars); } function stateChanged(){ if (xmlhttp.readyState==4){ if(xmlhttp.status == 200){ [INDENT]document.getElementById("make").innerHTML=xmlhttp.responseText;[/INDENT] } } } function GetXmlHttpObject(){ if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject){ // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } PHP:
AJAX problem, please help me!   (151 Views)
everybody! I have a serious problem with my diploma work! So here it is: My ajax.js file cannot be executed. It does nothing when I click on the buttons... Here's the ajax.js code:4 function opensave(type){ url="open.php"; content=replacer("editor"); var xmlhttp=if(window.XMLHttpRequest){ new XMLHttpRequest(); } else if(){ new ActiveXObject("Microsoft.XMLHTTP"); }; xmlhttp.onreadystatechange=stateChanged(); if(type="read"){ xmlhttp.open("GET",url,true); url+="open=r&filename="+document.getElementById("filename").value+"&extension="+document.getElementById("extension").value; xmlhttp.send(null); } else if(type="write"){ xmlhttp.open("POST",url,true); setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("open=w&filename="+document.getElementById("filename").value+"&extension="+document.getElementById("extension").value+"&content="+content); }; function stateChanged(){ if (xmlhttp.readyState==4){ processdata(xmlhttp.responseText); }; }; };//******************************************************************************************** function replacer(id){ str=document.getElementById(id).value.replace(/"/g,"%dquot%"); return str; };//******************************************************************************************** function processdata(response){ response=response.split("") document.title=response[0]; content=response[1].replace("%dq", /"/q); document.getElementById("editor").innerHTML=content; };//******************************************************************************************** The page which is linked to, doesn't want to "call" it. These methods were implemented in the other JS file, but it messed up the whole thing, so I've separated them. My buttons, which calls the "opensave" method are: My php file - where these buttons are - contains no DTD. Could that be a problem I've used "Transitional" DTD, but them my PHP did wanted to work properly. Did nothing with DTD. Didn't loaded the image, didn't execute the JavaScript... Please help, coz this is a big part of my diploma work, and I've got only 26 days to finish it with a big presentation too... :P Thank u and girls! =) Be nice everybody! =), Of corse! =) Here's the code:
Safari problem with multiple text areas in tiny mce   (119 Views)
Hi Could any body help us to sort it out. i am using two textareas for editing by tinymce, its working fine in ie and ff but in safari it is opening the first textarea editor only. This was my code. tinyMCE.init({ // General options mode : "textareas", //mode : "exact", elements : "description,pedigree", theme : "advanced", plugins : "pagebreak,style,table,save,advhr,advimage,advlink,inlinepopups,preview,searchreplace,print,contextmenu,paste,directionality,fullscreen,nonbreaking", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,cleanup,help,code,|,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,advhr,|,print,|,ltr,rtl", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_resizing : false, // Example content CSS (should be your site CSS) content_css : "css/stylesheet.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); Thanking you in advance
jquery tablesorter checkedbox problem   (234 Views)
I am using Jquery and the tablesorter plugin to sort a table of information. Within the table i have a column of checkboxes. A user can check the boxes and press the submit button which will $_POST the checked boxes onto the next page. Everything works if i dont sort the table, but if i sort the table and then check a few boxes the $_POST array is empty. can anyone point me into the right direction as i'm new to jquery
page refreshing problem in jquery ajax   (121 Views)
Hi all, I have a dropdown and when the value of that drop down changes corresponding pages are displayed using jquery ajax. My problem is that when i refresh the page standing in the page generated by the ajax , the home page containing the dropdown is displaying instead of the same page. I have tried the history plugin of the jquery but it is based on the hash(#) url in the address bar. But here in the above case there is no url appended in the address bar because the page is generated on the change of the dropdown using jquery ajax. I want to see the same page that is generated by the jquery ajax, after refresh button on the browser is clicked. Please help me.
Javascript stop function problem   (144 Views)
Hi! of cause, you already know, i'm gonna say im new to javascript and blahblahblah.... anyway, its a simple changing images animation starting by clicking on button. However, i stuck on stopping animation by clicking "stop" button.... here is my code, please if somebody can take time to look at it, i would really appreciate it! // Preloaded images if (document.images) { demo1 = new Image(); demo1.src = "images/breakdance1.gif" demo2 = new Image(); demo2.src = "images/breakdance2.gif"; demo3 = new Image(); demo3.src = "images/breakdance3.gif"; demo4 = new Image(); demo4.src = "images/breakdance4.gif" demo5 = new Image(); demo5.src = "images/breakdance5.gif" demo6 = new Image(); demo6.src = "images/breakdance6.gif" demo7 = new Image(); demo7.src = "images/breakdance7.gif" demo8 = new Image(); demo8.src = "images/breakdance8.gif" } // Reusable timer function timeimgs(numb) { thetimer = setTimeout("imgturn('" +numb+ "')", 1000); } // Reusable image turner function imgturn(numb) { if (document.images) { // This will loop the image if (numb == "8") { document["demo"].src = eval("demo8.src"); timeimgs('1'); } else { document["demo"].src = eval("demo" + numb + ".src"); timeimgs(numb = ++numb); } } }
ajax problem   (127 Views)
Hi I am new to ajax but i have done one simple menu program using ajax i created one index page with menus if i click each menu i want that linked page in the same window now i am getting as a separate window that is i want to refresh only that particular part and not the whole page i will give you the code that i have done please help me out this is my index.html page were i have my menus My ajax website Home First Page
innerHTML, responseTEXT problem on IE?   (157 Views)
I've try to figure it since 3 days a go..:-( and sorry for my english. what i want to do is displaying a random link on my conduit toolbar and it change randomly everytime EBNavigateComplete event occur. EBNavigateComplete is just one of conduit's event. It works fine on my firefox but the random link never change when i use IE. I know i hate IE but i want to give support to my member who use this....please help me find what wrong with my code below. I've try it on 3 different PC with IE and all the same, the problem is not on the local IE setting. The problem is NOT between IE and EBNavigateComplete but something wrong specifically on my code below. I've try to search a lot forum out there and I think the problem is related to ajax function, innerHTML, responseText on IE. i'm not really advance on php, ajax and javascript, i really apreciate if anyone can look to my code and find what's wrong about it and please explain in detail...thanks a lot before. the code in the HTML component of my toolbar: var http = ''; function createRequestObject() { var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); } else { ro = new XMLHttpRequest(); } return ro; } function handleResponse() { if(http.readyState == 4){ get_id('ad_div').innerHTML = http.responseText; get_id('ad_div').style.display = 'block'; } } function EBNavigateComplete() { setTimeout(do_ajax_call,100); } function do_ajax_call() { http = createRequestObject(); http.open('get', 'http://mysite.com/randomlink_dev.php'); http.onreadystatechange = handleResponse; http.send(null); } function get_id(id) { if (document.getElementById) { return document.getElementById(id); } else { return document.all[id]; } } the simple random link code that being called: http://mysite.com/randomlink_dev.php
A little problem I aam haaving wih a drag and drop   (110 Views)
For the last three days I have been working on developing a view panel that will display the users site stats and there sites info on one of my site. I plan to use a absolute div with a title bar that is the handle for the drag and drop control. My problem is that when I click the title bar it does not drag the div right like the div. I have tried at least 12 ways to drag and drop and all of them failed to keep the position of the mouse when I moved the mouse. My curreent version of the drag and drop is really messed up. I was wondering if someone can help me fix my code so when I click the title bar of the div it will drag normally with the mouse here is my current drag and drop javascript code: var x; var y; var drag = false; elm = document.getElementById('view_title'); elm.onmousedown = function(e) { e = e || event; target = document.getElementById('view'); x = e.clientX; y = e.clientY; ox = elm.style.left; oy = elm.style.top; drag = true; document.documentElement.onmousemove = function(e) { e = e || event; if(drag == true) { target.style.left = (ox-e.clientX-x)+'px'; target.style.top = (oy-e.clientY-y)+'px'; } } document.documentElement.onmouseup = function(e) { e = e || event; drag = false; } } here is my div code: LoadingPlease wait.... And finally my current CSS: #view { width: 400px; height: 350px; visibility: hidden; z-index: 99; top:100px; left:100px; background-image: url(../images/view.gif); font-style: oblique; position: absolute; } view_title {}
JavaScript drop-down menu mouseout hide problem   (157 Views)
! I want to create a dropdown menu to my site and I did it with JS instead of CSS because some functionality was needed that is'nt available in CSS, so I wrote it completely in JS (the styling is in CSS of course). Now, after I've ironed out a lot of kinks, it seems it works. More or less. I think the last problem I have is the following: when the pointer hovers a button/image (call it what you like) in the navigation bar, a submenu appears. That's working fine. If the mouse goes OUT of the submenu, the submenu shall hide, so I thought I'd use the onmouseout event. Here came some problems. The submenu contains elements, too, that's normal, but it's a strange (however standard-folowing) behavior, that if the mouse pointer hovers a submenu element, an onmouseut event is fired, so in the first version the submenu was hidden in this case. I found a solution (I had to make some changes though) to this problem on this site . With that script the submenu doesn't disappear if the mouse hovers an element inside, and it disappears if the mouse goes really out of it. Here is my problem: the mouse has to go slowly. If the mouse goes fast (for example the pointer is over the text, and you pull your mouse fast out of it), it doesn't disappear. It stays there, and you can open the neighbour submenu on the top of it (they are quite wide). I think the browser doesn't fire the appropriate event, because it's going fast and it can't feel that the pointer went over the submenu's box. What can I do, to make the submenu disappear in this case, too I've got some ideas, but I've run into problems when I tried to bring them into effect: - check the mouse position eg. every 3 seconds and hide the submenu if it's needed (problem: to be able to see the mouse position, you need an event) - bind a handling routine to the body element's onmousemove event and hide the active submenu if it's needed (problem: this may increase the CPU usage sharply and produce slower homepage) - close the active submenu if you open an another (problem: that's not a real solution) Anyway, any help would be appreciated,