Hi
I am trying to write my first XML app and am having quite a bit of trouble. I'm not asking people to write my code for me here but I'd really appreciate it if you could at least point me in the right direction and tell me what approach I have to take please. I have a feeling that Ajax would be the best method.
Thank you.
*******************************************************************************
So what I'd like to do is populate a select box with my xml list of CENTRES, when the user chooses one I would like to output the selected CENTRE and under it the relevant SUBCENTRE/S for it in a list so it would look something like this:
CENTRE: Accounts Payable:
> Buying
Here is some info
Here is the deadline date
> Selling
Here is some info
Here is the deadline date
So two questions really:
1) How do I populate my select box with the CENTRES?
2) How to I output the results from the choice?
******************************************************************************
So this is my xml file right? But I don't really know if it's right or where to go from here.
<?xml version='1.0'?>
<!DOCTYPE CENTRE [
<!ELEMENT CENTRE (SUBCENTRE+)>
<!ELEMENT SUBCENTRE (NAME,DEADLINE)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT DEADLINE (#PCDATA)>
]>
<CENTRES>
<CENTRE>
<NAME>CENTRE 1</NAME>
<SUBCENTRES>
<SUBCENTRE>
<TITLE>SubCENTRE 1a</TITLE>
<DEADLINE>1st Jan</DEADLINE>
</SUBCENTRE>
<SUBCENTRE>
<TITLE>SubCENTRE 1b</TITLE>
<DEADLINE>1st March</DEADLINE>
</SUBCENTRE>
</SUBCENTRES>
</CENTRE>
<CENTRE>
<NAME>CENTRE 2</NAME>
<SUBCENTRES>
<SUBCENTRE>
<TITLE>SubCENTRE 2a</TITLE>
<DEADLINE> 1st Feb</DEADLINE>
</SUBCENTRE>
<SUBCENTRE>
<TITLE>SubCENTRE 2b</TITLE>
<DEADLINE>3rd Nov</DEADLINE>
</SUBCENTRE>
</SUBCENTRES>
</CENTRE>
</CENTRES>
ASKER
It only needs to work on IE because it's an intranet page.
And the dataset is pretty small, just about 7 centres with between 1-3 subcentres each and each subcentre has a title, a line of info, a link url and a deadline date. That's about it.
So my ASP is absolutely basic, so I was planning just to use Javascript to do all the processing.
But that's where I'm completely stuck. How do I retrieve this data and create a select box from the Centres and then output the appropriate bits according to the selection? I'm still really confused about how to go about this. Never done it before.
Thanks again