Title: JavaScript alert on sidebar
Last modified: August 20, 2016

---

# JavaScript alert on sidebar

 *  [biok](https://wordpress.org/support/users/biok/)
 * (@biok)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/javascript-alert-on-sidebar/)
 * Hello,
    I hope someone can help me, I’m sure this has a very simple explanation
   but I have been trinity to resolved this problem but I can’t find out what is
   wrong.
 * I have a call to a php file in my sidebar.
    <?php include(“newsletter-signup.
   php”); ?> this file is in the theme folder with the rest of the files.
 * The content of this file is this:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * I removed the content of the php section to leave only what is giving me the 
   problem. when I click on the submit button, the alert shows up but the page under
   it goes to a 404 error page, and when I click the ok button on the alert box 
   it stays on that page. I know I can call the history function of js but I don’t
   want the 404 error to show up, why the alert doesn’t show on the current page?
   
   thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [biok](https://wordpress.org/support/users/biok/)
 * (@biok)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/javascript-alert-on-sidebar/#post-2305022)
 * sorry, here is the content of the file:
 * [http://pastebin.com/4VFPsu9Z](http://pastebin.com/4VFPsu9Z)
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 8 months ago](https://wordpress.org/support/topic/javascript-alert-on-sidebar/#post-2305066)
 * Are you calling the php from a php widget?
 *  Thread Starter [biok](https://wordpress.org/support/users/biok/)
 * (@biok)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/javascript-alert-on-sidebar/#post-2305073)
 * No, I’m just putting the call to the newsletter-signup.php on the sidebar as 
   demonstrated above.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘JavaScript alert on sidebar’ is closed to new replies.

## Tags

 * [alert](https://wordpress.org/support/topic-tag/alert/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [biok](https://wordpress.org/support/users/biok/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/javascript-alert-on-sidebar/#post-2305073)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
