Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
how to get article's content when click the option?

I'm working with MVC, using RSS to get feed from wired.com . But I need when I press the options, I want the contents to appear at the bottom. but I couldn't go further than that. How can I do this?

<body>
    <div id="news"></div>
    <script>
        fetch("https://www.wired.com/feed/rss")
            .then(response => response.text())
            .then(str => new DOMParser().parseFromString(str, "text/xml"))
            .then(data => {

                console.log('data', data);
                const items = data.querySelectorAll("item");

                console.log('items', items);

                let html = '';

                html += `<select onchange="showDescription(event)">`;

                items.forEach(el => {

                    let title = el.querySelector("title").innerHTML.replace("<![CDATA[", "").replace("]]>", "");

                    const description = el.querySelector("description").innerHTML.replace("<![CDATA[", "").replace("]]>", "");

                    html += `<option value="">${title}</option>`;

               });

                html += `</select>`;
                document.getElementById("news").innerHTML = html;

            })

    </script>

</body>

After excecuting the above code I am getting the following :enter image description here

I want this one : enter image description here

Thank you for help.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!