XSL / XML: Syntax for calling

A

Alan Searle

I hope someone can help me with this simple question ...

I have a set of XML files which the users can open and view with the
formatting set by a single XSL file. This works great.

In the XSL file I have some processing using javascript. This also
works fine and, for example, the users can run some simple sorting using
the following call to javascript (also contained in the XSL):

<td class="top" onclick="sort('job_id');">Job</td>

Now I would like to pluck out some information from the XML and display
this in the header and, for this, I have written another little
javascript program called getheader(). I am trying to include this as a
simple display (i.e. without any clicking or activation) and am not sure
of the syntax.

For example, should it be ...

This ...

<B>javascript:getheader()</B>

.... or this ...

<B>getheader()</B>

.... or this ...

<B>"getheader();"</B>

.... or something else completely?

Here I find that IE falls over on the call so I think that I need to be
sure that I am calling my code correctly before I can start debugging it.

I am a bit embarrassed asking this simple question: I have found lots of
great examples on the internet but find that that often don't explain
how the procedures are called ... and I am a bit of a newbie to
javascript and XML.

Anyway, I hope that someone can help me or can point me towards a good
'HOWTO' or tutorial somewhere?

Many thanks for your help.

Regards,
Alan Searle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top