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 6859501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:17:28+00:00 2026-05-27T02:17:28+00:00

Problem: I have a web page. When I fill in the data and hit

  • 0

Problem:

I have a web page. When I fill in the data and hit save, it gives me a a confirmation pop up box. On cancel I want to refresh the page. So the data entered is cleared.

Here is the code for confirmation so far:

function checknumber() {
    var x = document.getElementById('<%=view_txt_pixelwidth.ClientID%>').value;
    var y = document.getElementById('<%=view_txt_pixelheight.ClientID%>').value;
    var z = document.getElementById('<%=view_txt_printleft.ClientID%>').value;
    var a = document.getElementById('<%=view_txt_printtop.ClientID%>').value;
    var b = document.getElementById('<%=view_txt_printwidth.ClientID%>').value;
    var c = document.getElementById('<%=view_txt_printheight.ClientID%>').value;                       

    var anum = /(^\d+$)|(^\d+\.\d+$)/
    if ((anum.test(x)) && (anum.test(y)) && (anum.test(z)) && (anum.test(a)) && (anum.test(b)) && (anum.test(c)))
        testresult = confirm('save change?');
    else {
        alert("Please input a valid number!")
        testresult = false
    }
    return (testresult);
}                        
function Validate_view() {
    var value = document.getElementById('<%=view_txt_name.ClientID%>').value;
    var value2 = document.getElementById('<%=view_txt_title.ClientID%>').value;
    var value3 = document.getElementById('<%=view_txt_description.ClientID%>').value;
    var value4 = document.getElementById('<%=view_txt_pixelwidth.ClientID%>').value;
    var value5 = document.getElementById('<%=view_txt_pixelheight.ClientID%>').value;
    if (value == '' || value2 == '' || value3 == '' || value4 == '' || value5 == '') {
        ValidatorEnable(document.getElementById('<%= view_req_pixelwidth.ClientID %>'), true);
        ValidatorEnable(document.getElementById('<%= view_req_pixelheight.ClientID %>'), true);
        ValidatorEnable(document.getElementById('<%= view_req_name.ClientID %>'), true);
        ValidatorEnable(document.getElementById('<%= view_req_title.ClientID %>'), true);
        ValidatorEnable(document.getElementById('<%= view_req_description.ClientID %>'), true);
    }
    if (value == '' || value2 == '' || value3 == '' || value4 == '' || value5 == '') {
        alert("Please enter the missing fields");
        return false;
    }
    else if (document.layers || document.all || document.getElementById) {
        return checknumber();                            
    }



    <asp:Button ID="view_btn_save" Text="Save" OnClick="view_btn_save_click"
    OnClientClick="return Validate_view(); "
}
  • 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-27T02:17:29+00:00Added an answer on May 27, 2026 at 2:17 am
    if ((anum.test(x)) && (anum.test(y)) && (anum.test(z)) && (anum.test(a)) && (anum.test(b)) && (anum.test(c)))
        testresult = confirm('save change?');
        if(testresult == 0)
        {
            //cancel
            //window.location.reload(true);
            window.location.href=window.location.href;
        }
    else {
       alert("Please input a valid number!")
       testresult = false
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page which contains a select box. When I open a
I have a web page which I want people to be able to upload
I have a web application and I have a problem If the web page
I have a strange problem with some documents on my webpage. My data is
Problem: We have a web app that calls some web services asynchronously (from the
Problem: I have to support users who need to edit web pages. Some of
Here's my problem: I have to call a web service with a secure header
The general problem: We have urls coming to our IIS web servers formatted like:
I recently encountered an odd problem with RSACryptoServiceProvider.VerifyHash . I have a web application
I'm using Rational Application Developer to create some web services. The problem I have

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.