# Wikipedia Viewer assistance

**URL:** <https://forum.freecodecamp.org/t/wikipedia-viewer-assistance/88072>\
**Category:** I Built This\
**Created:** [February 16, 2017, 6:01pm UTC](https://forum.freecodecamp.org/t/wikipedia-viewer-assistance/88072 "2017-02-16T18:01:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![psuschak92](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/psuschak92/32/22442_2.png) [@psuschak92](https://forum.freecodecamp.org/u/psuschak92)\
**Post date:** [February 16, 2017, 6:01pm UTC](https://forum.freecodecamp.org/t/wikipedia-viewer-assistance/88072/1 "2017-02-16T18:01:47Z")

</div>

> **[Wikipedia Viewer](https://codepen.io/paulSus92/pen/egEmrm)**
>
> ...

I’m working on the wikipedia viewer right now. I was wondering if someone knew how to help with a problem I’ve run into that has something to do with the page reloading when an AJAX request is made. It happens every time I hit enter to submit the text in the input field. I’m using jquery to display the api info, but the page keeps refreshing and it disappears right away. Any thoughts as to what’s going on here?

---

<div class="post-metadata">

**Author:** ![psuschak92](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/psuschak92/32/22442_2.png) [@psuschak92](https://forum.freecodecamp.org/u/psuschak92)\
**Post date:** [February 16, 2017, 9:03pm UTC](https://forum.freecodecamp.org/t/wikipedia-viewer-assistance/88072/2 "2017-02-16T21:03:14Z")

</div>

I figured it out! Forms automatically do a page refresh, so I had to use e.preventDefault in my JS.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 2:36pm UTC](https://forum.freecodecamp.org/t/wikipedia-viewer-assistance/88072/3 "2021-06-01T14:36:42Z")

</div>


