Kevin wrote:
[attribution restored]
> [Garrett Smith wrote:]
>> Consider using links for the menu items that need to act like links.
>>
>> <a id="CHeader" href="/csection/">
>> <ul class="menu" id="CMenu">
>> <li><a href="http://example.net/">eggs</a></li>
>> </ul>
>
> [...]
> I don't see how I can set the "<a href="http://example.net/">"
> statically. The "http://example.net" is stored in the XML DOM that I
> haven't yet imported.
First, get your terminology right. You are _not_ importing a/the XML
Document Object Model (DOM); you are importing, at most, an XML _document_.
Second, you can either use server-side XSLT so that you don't need to import
anything client-side, or you can use client-side XSLT to transform the XML
document resource from the server (depends on your target environments), so
that in both cases you might not need client-side scripting at all.
> Please correct me if I'm wrong, or explain to me how I can use your
> code above?
You can use my correction of that code verbatim (of course, you will still
have to do the CSS part). It is structurally what must be the result of the
XML transformation process.
> I experimented with "this," namely I set my button to,
>
> "<input name="myButton" type="button" onclick='window.location=' +
> this.value ..." // please ignore bad syntax here
The value of this button is this button's caption. That is most likely not
where you want to navigate to. In fact, it does not make sense to use a
button for navigation where a hyperlink would have sufficed.
> Thomas, I'm reading up on XSLT server-side now to transform the XML
> document into an HTML fragment. I don't know what that is, I'll read
> about it now. Thanks.
You're welcome.
But keep in mind that this is a threaded one-to-many communications medium.
So please keep at least the names of all relevant attribution lines, avoid
summary followups (unless it's only a thank you to all), and trim your
quotes to the relevant minimum, especially usually do not quote any
signatures.
<http://jibbering.com/faq/#posting>
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$>
|