Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6815173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:46:32+00:00 2026-05-26T20:46:32+00:00

My imagebutton will not cause the popup window to appear when its clicked. Here

  • 0

My imagebutton will not cause the popup window to appear when its clicked. Here is my code.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript">
    function goToAddNewsletterAddPage() 
    {
        window.open("Newsletter.aspx","mywindow");
    }
</script>

    <asp:Image ID="Image1" runat="server" Height="87px" Width="158px" ImageUrl="~/images/signup.gif" onclick="goToAddNewsletterAddPage()"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:46:33+00:00Added an answer on May 26, 2026 at 8:46 pm

    If you look in the console of the browser, you should see a syntax error. Function declarations (the style you’ve used in your script) must have a function name, so there’s a syntax error…

    <script type="text/javascript">
        //    ...v-- here
        function () 
        {
            window.open("Newsletter.aspx","mywindow");
        }
    </script>
    

    Perhaps you meant:

    <script type="text/javascript">
        function goToAddNewsletterAddPage() 
        {
            window.open("Newsletter.aspx","mywindow");
        }
    </script>
    

    (There is a different, but related, thing called a function expression, which doesn’t have to have a function name [and due to IE bugs is usually better off without one], e.g.:

    var x = function() { /* ... */ };
    

    The key to knowing which is which is to look to see whether the function structure is being used as a right-hand value, e.g., the right-hand side of an assignment [=] or initializer [:], or being passed into a function as an argument. If it is, it’s a function expression; if not, it’s a function declaration.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp:ImageButton that is supposed to popup a save dialog when clicked.
I am trying to create a silverlight imagebutton control. the xaml and code-behind will
I have the following code which creates an ImageButton and plays a sound when
Assumptions about the list (updated): It will not contain more than 10 list elements
I want that in my android application, the ImageButton change its image when it
Any help will be highly appreciated. I am using a ImageButton in each row
I write an imagebutton to a table cell in a new row when a
I have an ImageButton with an onclientclick js function attached: deleteButton = new ImageButton();
I have an ImageButton in ASP.Net on my site, filled with the property ToolTop:
I have an asp:ImageButton with OnClick=Btn_OnClick. In Btn_OnClick I have this line: DataTable dtTable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.