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

  • Home
  • SEARCH
  • 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 7585577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:12:36+00:00 2026-05-30T19:12:36+00:00

I am working on a donations website. In my page, I have a textbox

  • 0

I am working on a donations website. In my page, I have a textbox which accepts a numeric value from the user (that is, money to be donated).

In my code-behind, I have a method which checks whether the value in the textbox is numeric. The method generates an error message if the number is invalid.

I also have a JavaScript which, after checking that the value in the textbox is numeric, opens a new tab to the website confirmation page, thanking the user for his donation. Here is the code of the javascript:

<script type="text/javascript">
        function Open_Window()
        {
            var textbox = document.getElementById('DonationTextBox');

            if (textbox.value != "")
            {
                if (isNan(textbox) == false)
                {
                    window.open("DonationConfirmation.aspx")
                }
            }
        }
    </script>

The problem is that the tab is NEVER opened, even if the number is valid. Can you please help me solve this problem? Thank you.

P.S.

Here is the code of the button that initiates the validation:

<asp:ImageButton ID="PayPalButton2" runat="server" ImageAlign="Middle" 
                                        ImageUrl="Resources/Icons/PayPalCheckOut.gif" 
                                        onclick="PayPalButton2_Click" OnClientClick="Open_Window()"/>
  • 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-30T19:12:37+00:00Added an answer on May 30, 2026 at 7:12 pm
    <script type="text/javascript">
        function Open_Window()
        {
            var textbox = document.getElementById('<%=DonationTextBox.ClientID%>');                        
            if (textbox.value != "" && !isNaN(textbox.value)) {                
                 window.open("DonationConfirmation.aspx");
            }
        }
    </script>
    

    edit


    instead of isNan should be isNaN (javascript is casesensitive)

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

Sidebar

Related Questions

I am working on a donations page which allows a user to enter a
I am working on a donations website. The particular web page works by allowing
I am working on a donations website and I have set up a PayPal
I have donation page which when the user clicks donate it posts the data
I am working on a donations web page. I have created a merchant account
Working sample using one Table SELECT t.* FROM ( SELECT TITLE.name, (TITLE.value-TITLE.msp) AS Lower,
Working with a Lucene index, I have a standard document format that looks something
I have a custom field, which its value is an wp array.. and I
I have a working PayPal button on my website. It's not hosted by PayPal,
I am working on a site that is using a form to accept donations

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.