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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:01:51+00:00 2026-05-26T03:01:51+00:00

I have the following code: <script language=javascript type=text/javascript> function readCookie(name) { var nameEQ =

  • 0

I have the following code:

    <script language="javascript" type="text/javascript">
    function readCookie(name)
    {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++)
        {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    }

    function imprimeTesis()
    {
        valor = readCookie("Marcadas");

        if (valor == null) return true;
        var resultado = true;
        if (valor == "1")
        {
           resultado = confirm("¿Quiere imprimir todas las tesis marcadas? Si contesta no imprimirá sólo la actual ");
        }
        return resultado;
    }
</script>
<asp:Table ID="Table1" runat="server" Height="46px" Width="696px">
    <asp:TableRow runat="server">
    <asp:TableCell ID="TableCell1" runat="server">
        <asp:ImageButton runat="server" ID="BtnGuardar" style="cursor: hand"
                     onmouseover="this.src = '../images/GUARDAR2.png';"
                     onmouseout = "this.src = '../images/GUARDAR1.png';"
                     OnClick="BtnGuardar_Click"  ImageUrl="../images/GUARDAR1.png"/>
        </asp:TableCell>
        <asp:TableCell ID="TableCell2" runat="server">
        <asp:ImageButton runat="server" ID="BtnImprimir" style="cursor: hand"
                     onmouseover="this.src = '../images/IMPRIMIR2.png';"
                     onmouseout = "this.src = '../images/IMPRIMIR1.png';"
                     OnClientClick = "imprimeTesis()"
                     OnClick="BtnImprimir_Click"  ImageUrl="../images/IMPRIMIR1.png"/>
        </asp:TableCell>

The OnClientClick event on my BtnImprimir Button is fired OK, if i have the cookies the confirm dialog is displayed but it doesn’t matter if i respond YES or No on the confirm dialog… the onClik is always executed.

  • 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-26T03:01:51+00:00Added an answer on May 26, 2026 at 3:01 am

    Use OnClientClick = "return imprimeTesis();". You need to return the results of function to the control.

    <asp:ImageButton runat="server" ID="BtnImprimir" style="cursor: hand"
                     onmouseover="this.src = '../images/IMPRIMIR2.png';"
                     onmouseout = "this.src = '../images/IMPRIMIR1.png';"
                     OnClientClick = "return imprimeTesis();"
                     OnClick="BtnImprimir_Click"  ImageUrl="../images/IMPRIMIR1.png"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: <script type=text/javascript> $(document).ready(function() { $(#Save).click(function() { $.post(url, { data:
I have the following code: <script type=text/javascript> function SubmitForm() { form1.submit(); } function ShowResponse()
js undefined error we have the following widget code : index.html <script type=text/javascript language=javascript>
I have the following code in javascript: <script type=text/javascript src=#{facesContext.externalContext.requestContextPath}/js/sample-points.js></script> <script type=text/javascript>//<![CDATA[ var cloudmade
.guys I have the following code: echo (<SCRIPT LANGUAGE='JavaScript'> window.alert('Succesfully Updated') </SCRIPT>); what i
So I have code like this: <script language=javascript> $(function(){ function hellothere(strng){ showalert(strng); } function
I have the following code <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Untitled Document</title>
I have the following code $(document).ready(function(){ // class exists if($('.delete').length) { // add click
I have the following Javascript code which controls an accordion type set of divs.
I have the following code which i am using document.location.search in it.. I want

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.