473,883 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<A> Cannot be a Container for <A>?

I've tried the following:

<a name="foo" class="foostyle ">Text in foo <a href="bar">link in foo</a>
and more text.</a>

I kinda thought that oughta work. But I found that foostyle is applied
only up to the link in foo. After that the style disappears. This
happens in both Mozilla and MSIE. Even adding contextual selectors to
the style doesn't help.

I played around with it using the Mozilla composer, and found that the
composer always repositions the </a> for the anchor to just before the
<a> for the link. To me that implies that an <A> cannot be a container
for an <A>. Is that correct? Or is there something else that I'm
overlooking?

Since I'm not likely going to change the implementation of 99% of the
browsers out there, it's more important that I figure out what to do
about this. What I'm doing is using a bit of script to switch styles
dynamically, to highlight a piece of text. The reason for doing it this
way stems from the fact that document.anchor s is supported by both
Mozilla and MSIE. I'd like the text to include links, but then the
highlight stops at the link. What I've done for now is to code it as

<a name="foo" href="bar" class="foostyle ">Text in foo with link in
foo and more text.</a>

which works, but has the unsatisfying side effect of turning the entire
section into a link, and limiting me to just one link per section.

http://www.rffutah.org/

is the page I'm talking about. The calendar on the right side is created
by the script, and when you move the mouse over the dates in September
(there are no hot dates in August), then the corresponding sections
above light up. I've removed the text underline, because an entire
section underlined looks unattractive. But if I knew of a way to get
around the "no <A> in <A>" limitation, I'd be a lot happier.
--
Helge Moulding
mailto:hm****** *@excite.com Just another guy
http://hmoulding.cjb.net/ with a weird name
Jul 23 '05
23 2347
Brian wrote,
Google for getElementById and see if that will do what you want.


Thanks for the hint. Works like a charm.
--
Helge Moulding
mailto:hm****** *@excite.com Just another guy
http://hmoulding.cjb.net/ with a weird name
Jul 23 '05 #21
Brian wrote,
Google for getElementById and see if that will do what you want.


Thanks for the hint. Works like a charm.
--
Helge Moulding
mailto:hm****** *@excite.com Just another guy
http://hmoulding.cjb.net/ with a weird name
Jul 23 '05 #22
Brian wrote,
Shawn K. Quinn wrote:
Helge Moulding wrote:
both major browsers behave that way.

Lynx *and* Konqueror, you mean?

(sigh) Those are loser browsers. *Obviously*, he was talking
about W3M and Amaya. Sheesh.


*THAT*'s the ones!
--
Helge Moulding
mailto:hm****** *@excite.com Just another guy
http://hmoulding.cjb.net/ with a weird name
Jul 23 '05 #23
kchayka said the following on 24/08/2004 00:32:
Harrie wrote:
Brian said the following on 23/08/2004 21:57:
href="#" is a bogus construction, and should be avoided at all costs.
http://www.alistapart.com/articles/horizdropdowns/

I'm think that they used it in the 2nd level of <li>'s so that in the
examples one can click on those links and they should be replaced with
valid targets, but to what should it be changed in the 1st level of
<li>'s then?


A real page - I suggest an index page for the associated submenu items.


Hadn't thought about that. It's some extra work, but it sounds like a
good idea.
This ensures your visitors can access those pages even if they can't get
to the links using the menu, as will likely happen with keyboard
navigation and other mouse-challenged situations.
I was thinking about keyboard navigation for all (sub)menu items, but
I'm new to that and still learning. I'm also still reading the WAI
documentation to learn about accessibility issues.
However, DHTML menus generally suck, so I wouldn't recommend using one
in the first place.


I'm slowly comming to that solution myself. I liked the idea of the
JavaScript styled-up menu, because it decrades to a simple (unordend)
list whitout JavaScript. But since JavaScript is not 100% compatible
over different browsers and I don't like the idea of browser detection
and different codings, I thought I'd give the CSS menu a chance.

--
Harrie
Jul 23 '05 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3243
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are writing one object in C# which will take the entire table tag contents and renders. Ie., we need to pass "<table>………… <thead>……</thead>. <tr>.<td> <td>..<tr>.<td> <td> </table>" content to
2
10573
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script type="text/javascript"> <!]> </script> <script type="text/javascript"
1
1651
by: fig000 | last post by:
Hi, I have some code written into the html in a dot.net form: <%if test(Container.DataItem("user_id")) =2%> I've been able to use container.dataitem in these <%%> pairs as an expression to provide values for clauses. I've also been able to call functions as above, as long as I don't use Container.DataItem to pass some value from the bound data to the function. If I do I get the
3
1734
by: z. f. | last post by:
Hi, i'm using code in my aspx page. i have data binding where i use <%# Container.DataItem("DateStart") %> i also use code that makes a loop inside a regular <% %> block how can i pass data from the databinding to the loop that runs in a regular
1
2639
by: Ed West | last post by:
Am getting this error with the following code, particularly this line: <%# Check(DataBinder.Eval(Container.DataItem, "broker_id"))%> I am creating checkboxes and the Check function checks to have that particular checkbox checked by default. I am not using checkboxlist because I want to EASILY save data to DB with a comma separated list which HTML gives you if all the checkboxes have the same name. <asp:datalist id=DataList1...
4
1570
by: Neil Zanella | last post by:
Hello, I would like to know what the difference is among the constructs <%= %> for evaluating an expression and displaying the evaluated result on the page and <%# %>. In particular I would like to know why the <%# %> construct is necessary in locations where the other <%= %> does not do. It seems to me that there is no equivalent of the <%# %> construct in PHP, thus I thought I would post to clarify. Is this an ASP.NET specific...
5
1900
by: ad | last post by:
I find there are some tag like <%= %> and <%# > in my .aspx file. What is the diffreence between <%= %> and <%# %>
2
1492
by: Aahz | last post by:
I know this problem has been discussed before but still cannot work it out, here is my code: <span class="popup" onClick = javascript:window.open('fullimage.aspx?id=<%# DataBinder.Eval(Container.DataItem,"id") %>',"blank","toolbar=no,width=520,height=550","resizable=0")> <IMG src="/ch/gallery/t<%# DataBinder.Eval(Container.DataItem, "id") %>.jpg"
3
2775
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed into a <xml> document but not sure which direction to take. Is there perhaps a starter document which uses sql server as the data source I can tap into.
3
3400
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
0
9938
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9791
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11140
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10414
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7971
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7125
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4218
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.