lupire
asked on
html unique id attribute
Hi,
In order to create 2 different connections through 2 different links,
I have to add the following code in 2 parts of the html code:
<a id="enabled_element" href="#">
As the id attribute should be unique, only the first link is active.
How can I do to activated also the second link?
Thanks for pointing me in the right direction.
In order to create 2 different connections through 2 different links,
I have to add the following code in 2 parts of the html code:
<a id="enabled_element" href="#">
As the id attribute should be unique, only the first link is active.
How can I do to activated also the second link?
Thanks for pointing me in the right direction.
Why does the element have to have the same id - which is obviously not allowed - what is the importance of the enabled_element id - with respect to your code?
Please post more information about your problem - the information you have given is not sufficient for us to be able to assist you.
Please post more information about your problem - the information you have given is not sufficient for us to be able to assist you.
I think it appear disabled/enabled with CSS so, locate the CSS file, look for :
#enabled_element
and replace: #enabled_element
by : #enabled_element, #enabled_element_second
or just use a class as suggested by tommyBoy, so replace : #enabled_element
by : .enabled_element
#enabled_element
and replace: #enabled_element
by : #enabled_element, #enabled_element_second
<a id="enabled_element" href="#">
<a id="enabled_element_second" href="#">
or just use a class as suggested by tommyBoy, so replace : #enabled_element
by : .enabled_element
<a class="enabled_element" href="#">
<a class="enabled_element" href="#">
ASKER
I have to use the id attribute.
When the application stars, it checks the site content for the specific ID (enabled_element). If these IDs are used on a element, then clicking this element will start an action.
It is because the enabled_element is unique.
But I would like to acivate the action on two different elements of the page.
I cannot use class.
Many thanks
When the application stars, it checks the site content for the specific ID (enabled_element). If these IDs are used on a element, then clicking this element will start an action.
It is because the enabled_element is unique.
But I would like to acivate the action on two different elements of the page.
I cannot use class.
Many thanks
>When the application stars, it checks the site content for the specific ID
Could you post(show us) this part?
Could you edit it?
Could you post(show us) this part?
Could you edit it?
ASKER
>>When the application starts, it checks the site content for the specific ID
>Could you post(show us) this part?
>Could you edit it?
Unfortunately I can not edit the code application, I have only to configured the web site.
>Could you post(show us) this part?
>Could you edit it?
Unfortunately I can not edit the code application, I have only to configured the web site.
try this :
good luck...
<a id="enabled_element1" href="#" onclick="this.id='enabled_element';">
<a id="enabled_element2" href="#" onclick="this.id='enabled_element';">
good luck...
ASKER
<a id="enabled_element1" href="#" onclick="this.id='enabled_ element';" >
<a id="enabled_element2" href="#" onclick="this.id='enabled_ element';" >
I have to click twice on an element to start the action. But after I can not start the action on the other element.
I seems after having clicked on an element, the id remains setted on the clicked ID.
The only way to start the action on the other element is to reload the page.
Thanks for your help
<a id="enabled_element2" href="#" onclick="this.id='enabled_
I have to click twice on an element to start the action. But after I can not start the action on the other element.
I seems after having clicked on an element, the id remains setted on the clicked ID.
The only way to start the action on the other element is to reload the page.
Thanks for your help
ok, could you post the code setting the "action"?
ASKER
I am not allowed to modify this code.
>I am not allowed to modify this code.
I don't want to see it to ask you to modify it...
I don't want to see it to ask you to modify it...
ASKER
here is the code:
function() {
ka.c = [];
ka.registerApiConsumer = function(callback, apiNames) {
ka.c.push({a: apiNames, c: callback});
}
ka.setLocale = function(locale) {
ka.l = locale;
}
function h(a, b, c) {
if (a.addEventListener) a.addEventListener(b, c, false);
else if (a.attachEvent) a.attachEvent("on" + b, c, true);
}
h(window, "DOMContentLoaded", function() {window["x-ka-tmp-dom-read y"] = true;}, false);
h(window, "load", function() {window["x-ka-tmp-window-a live"] = true;});
if (!window["x-ka-tmp-window- name"]) window["x-ka-tmp-window-na me"]=windo w.name;
var q = document.getElementsByTagN ame("scrip t")[0];
if (q) {
var g = document.createElement("sc ript");
g.setAttribute("src", "https://start.ka.biz/starter.js");
g.setAttribute("type", "text/javascript");
g.setAttribute("defer","de fer");
q.parentNode.appendChild(g );
h(g, "load", function() {});
h(g, "error", function() {});
}
})();
many thanks
function() {
ka.c = [];
ka.registerApiConsumer = function(callback, apiNames) {
ka.c.push({a: apiNames, c: callback});
}
ka.setLocale = function(locale) {
ka.l = locale;
}
function h(a, b, c) {
if (a.addEventListener) a.addEventListener(b, c, false);
else if (a.attachEvent) a.attachEvent("on" + b, c, true);
}
h(window, "DOMContentLoaded", function() {window["x-ka-tmp-dom-read
h(window, "load", function() {window["x-ka-tmp-window-a
if (!window["x-ka-tmp-window-
var q = document.getElementsByTagN
if (q) {
var g = document.createElement("sc
g.setAttribute("src", "https://start.ka.biz/starter.js");
g.setAttribute("type", "text/javascript");
g.setAttribute("defer","de
q.parentNode.appendChild(g
h(g, "load", function() {});
h(g, "error", function() {});
}
})();
many thanks
looking for : start.ka.biz/starter.js
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
could you post the code of : start.ka.biz/starter.js ?
ASKER
I am not allowed to post it.
Thanks
Thanks
EDIT: I just realized you are probably referring to Outlook Groupware connections of which I am not familiar.