I’ve scoured the internet for hours and only can find complex Ajax. I need to complete this test in an hour for a test I have at school and cant figure this out. Heres my XML
<?xml version="1.0" encoding="utf-8" ?>
<cookies>
<cookie>
<name>cookie name #1</name>
<type>cookie type #1</type>
</cookie>
<cookie>
<name>cookie name #2</name>
<type>cookie type #2</type>
</cookie>
<cookie>
<name>cookie name #3</name>
<type>cookie type #3</type>
</cookie>
</cookies>
All I need to do is get the cookie “name” and and “type” and put them in a div like this
<div id="something"><p></p><p></p></div>
So what I need is the name in the first p and the type in the second p. I also need an if, or each statement so I can account for all the cookies. I know this is simple but it will help me pass the test and get into AJAX and help my understanding of it much better too!!
1 Answer