I have read about the srcElement property, but I don't think it will solve my problem.
http://www.webdevelopersjournal.com/articles/jsevents3/jsevents3.html
http://www.webreference.com/js/tips/000726.html
ok, so there is no keyPress, or "someone-focus-something" or onClick function like in Java programming that waits for a special keypress or click event anywhere on the site? The functions must be attached to an element?
/Diana
It worked if I wrote:
if (cNodes[x].nodeType == 1 && cNodes[x].focus) {
cNodes[x].focus();
break;
}
It seems that I have elements that not can be set to focus.
Anyway, the getAttribute did not work. It says getAttribute is not a function. My brower may not support that, I don't...
-I can't call a function when I click on the link.(I get bad performance then.)
-getElementsByTagName don't work on my browser.
I have tried document.getSelection(), it did not work. I don't know why, maybe because my browser just support JavaScript language version 1.4. and a subset of the W3C...
Hello,
How do I get the Id of a node that is tabbed(focused)?
I have a menu mainly made by div tags and a-tags. If the user tabulate to a special menu I want to save that id into a cookie. Next time I would like to get the cookie and make that menu focused again.
I want this to happen on...
Yes, that is what I wanted!
Do you also knew how to get the id of the focused element right now?
I want to get the id of the focused element and save it into a cookie(in onUnload). Next time the page is opened, the element is focused again.
/Diana
My code look like this:
<div id="menu0" class="clF">
<a href="template_07.htm" class="clS">Accessories</a><br>
<a href="template_07.htm" class="clS">Remove</a><br>
</div>
It worked if I gave the <a> tag a id. Is there a possibility to give focus to the div tag and then step down to...
Hello,
I wonder how to focus a text within the <a> </a> tag with means of JavaScript. (The tabulation shall start from that text.)
Like:
var el=document.getElementById("menu1");
el.getfocus();
/Diana
Hello,
I would like to have something that has the width: 10px, to place in front of a text.
Explanation:
I have an image followed by a text like this:
<img src="a.png" id="a1">
<a href="#" onclick="link(); return false" class="cl1">Hello!</a><br>
<img src="no.png" id="a2">
<a...
Hello,
I would like to give my <img>-tag a width and an heigth in a css-file.
Do I have to give the img-tag a class name? Like:
<img class=img> I want to prevent that. (I have lots of img-tags)
/D
Hello,
My menu, implemented in javaScript takes 8 seconds to load on the page, is there a possibility to first show a message, like: "the menu is loading..." in the meantime? I just use javaScript and html. Does someone know such a script?
Is has to take as less memory as possible.
/Diana
ok, then I post the following code in this message:
* subMenyer *
************************************************/
if ( eval( 'typeof( (subMenu'+i+'))' ) != 'undefined'){
var j=0; //ökar för varje submeny, börjar om igen efter varje huvudmeny
while( (eval(...
Thank you very much for trying to help me!
I post the functions:
first the function initiateMenu() is called, then foldInit().
It's function initiateMenu() that contains the 88 arrays!
The function foldInit() contains a for-loop and 3 while-loops.
function initiateMenu(){
menu=new...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.