help with <description> element
I need to perform some action when the user clicks on the description element in the box. Is it possible to associate a function with the description element and printing the value of the description element from which we came from in the function called.
like
<description value="hello" somehandle_to_function_on_click="fun();">
fun(){
alert(some_handle_to_val);
}
plz lemme know what the handles could be..
thanks in advance...
# 1 Re: help with <description> element
I am assuming you are making an RSS feed. Remember that <description> is not an HTML/XHTML tag. It has not events attached with it and therefore cannot register an onclick event.
# 2 Re: help with <description> element
<description value="hello" onclick="fun(this);">
fun(){
alert(arguments[0].value);
};
this worked for me...
ne ways thank you..
# 3 Re: help with <description> element
I would have guessed that it would work in an internet browser, but does it also work in an RSS reader? I am pretty sure that a browser will enterpret anything with <> around it as an HTML tag.
# 5 Re: help with <description> element
If you aren't doing an RSS feed, why are you using the <description> tag?
# 6 Re: help with <description> element
i have some text where each and every word has to be identified as a seperate entity.. so rendering it using <description> on each and every word..
is there a better way of doing this ?
# 7 Re: help with <description> element
EDIT: After reading your other post, things are now much clear.