This is a discussion on "<SPAN> help" within the JavaScript Forum section. This forum, and the thread "<SPAN> help are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
<SPAN> help
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
<SPAN> help
Hi,
I have a group of values, basically its words and their synonyms. The “word” and it’s “synonym” have the same ID. I’m creating it using <SPAN> like this, so it looks like a hyperlink. FAST <span onclick="AddToContainer(‘1’)" style="cursor:hand;color:blue;text-decoration:underline">FAST</span> WHILD<span onclick="AddToContainer(‘2’)" style="cursor:hand;color:blue;text-decoration:underline">WHILD</span> QUICK<span onclick="AddToContainer(‘1’)" style="cursor:hand;color:blue;text-decoration:underline">QUICK</span> SUNNY<span onclick="AddToContainer(‘3’)" style="cursor:hand;color:blue;text-decoration:underline">SUNNY</span> PERFECT<span onclick="AddToContainer(‘4’)" style="cursor:hand;color:blue;text-decoration:underline">PERFECT</span> BRIGHT<span onclick="AddToContainer(‘3’)" style="cursor:hand;color:blue;text-decoration:underline">BRIGHT</span> I also have a SPAN called spContainer: <span id="spContainer" runat="server" /> What I need to do is upon clicking on each word add it to span container. I also need to make it disable(not clickable) together with it’s synonym(s). For example I click on FAST making it disabled, and at the same time make it’s synonym QUICK also disabled. I need some help with JavaScript function AddToContainer. Thank you |
|
|
|
||||
|
Re: <SPAN> help
Okay, so I can see a few problems here.
First and foremost, you cannot have two elements on the same page with the same ID, this is completely against the DOM -- ID should be unique. I can think of a few things to help you but I'm not entirely sure what you after. Can you post the code you currently have? If you don't have any can you explain exactly should be happening. Thanks,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: <SPAN> help
Quote:
Yes, i do not have anything at this point , becausei have no clue where should i start from. So from the beginning, I’m imitating the .Net GridView control using repeater control. The database call returns me the list of words and their synonyms.(like in my original post). The word and it’s synonym has the same ID(in database). Instead of using hyperlink I use <SPAN> with some adjustments to make it look like a hyperlink. So now, you click on the link, I need to make it disabled so user can not click on it again and add this value into another <SPAN> named spContainer. Once it inside spContainer you should be able to click on it too to remove it, and enable(make it clickable) it back in the list. I also need to check for the synonym of the clicked word and if there is one make it disabled as well. So this is pretty much it. Thank you for your help Rakuli |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can <span></span> tags have position relative? | Oak | Web Page Design | 13 | Mar 9th, 2008 17:04 |
| how do i extend the background on a span | aflacduck | Starting Out | 4 | May 27th, 2007 19:51 |
| Div and Span tags... | jjgamepro17 | Web Page Design | 4 | Nov 7th, 2006 19:22 |
| Span questions | maxelcat | Web Page Design | 2 | Aug 7th, 2006 11:07 |
| Wrapping by span | hessodreamy | Web Page Design | 3 | Sep 14th, 2005 07:34 |