Browser download window pops up

Having same problem as below:

I am working on a simple login function for a web application that allows an employee to swipe their security badge in. I can capture the input from the card and successfully login however I am encountering a weird issue where the downloads pane pops open immediately after the card is swiped in.


All browsers do the same. Capture the data in the text field but open window asking to save download.
I have tried every setting in IE (8, 9 and 10) and Chrome, nothing works. Can I put something on web page to prevent this?

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="MyPage.aspx.vb" Inherits=" MyPage. MyPage Shop" %>



<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Member Check In or Out</title>




</head>

    <form id="form1" runat="server">
Textbox:

<asp:TextBox ID="MemberID" runat="server" BorderStyle="Inset" style="text-align:center; font-size: large;"  Height="24px" TabIndex="3" Width="173px" AutoPostBack="True" />
Dave_CARSITAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
What does the rendered HTML look like?
0
Dave_CARSITAuthor Commented:
Download manager window pops open asking where do you want to save file. IE and Chrome
0
Julian HansenCommented:
Download manager window pops open asking where do you want to save file.
I am confused the question was
What does the rendered HTML look like?
Without seeing something we are flying blind.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Dave_CARSITAuthor Commented:
What is rendered HTML?
0
Julian HansenCommented:
When you right click on your page and click View Source - this will display the HTML code behind the page.
0
Dave_CARSITAuthor Commented:
Hope this helps!

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	Member Check In or Out
</title>


    <style>
#header {
    background-color:#5A86D5;
    line-height:30px;
    color:white;
    text-align:center;
    padding:5px;
}


#nav {
    line-height:58px;
    background-color:#eeeeee;
    height:570px;
    width:845px;
    float:left;
    padding:10px;
        text-align: center;
    }

#nav2 {
    line-height:36px;
background-color:#eeeeee;
    height:570px;
    width:340px;
    float:right;
    padding:10px;
        text-align: left;
    }


#footer {
    background-color:#5A86D5;
line-height:30px;
    color:white;
    clear:both;
    text-align:center;
   padding:5px;	 	 
}




    .newStyle1 {
        font-family: Arial;
        font-size: large;
        font-weight: normal;
        font-style: normal;
            text-align: center;
        }


    

        .auto-style3 {}
        .auto-style6 {
            font-size: xx-large;
        }


    

        .auto-style7 {
        font-size: x-large;
        font-weight: 700;
        color: #33CC33;
    }



        .auto-style8 {
            font-size: large;
        }
        .auto-style9 {
            font-size: large;
        }


    

        .auto-style10 {
            text-align: center;
        }


   
        .auto-style11 {
            font-size: large;
        }


   
        </style>


     



</head>

<body style="background-color: #F7FFFF;">
    <form method="post" action="TedescoBodyShop.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjEzNTY3ODM4OA9kFgICAw9kFgYCAw8PFgIeBFRleHQFATNkZAIvDw8WAh8ABQ5OYXRhbGllVGVkZXNjb2RkAjkPD2QPEBYBZhYBFgIeDlBhcmFtZXRlclZhbHVlBQEzFgECBWRkZH8uCXCu7WZRH4vXrT58d+PrdmZPZvU6WZmVaFcStEkf" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/WebResource.axd?d=O2L_BE3lQ8EzVBvr4WXSTG3Lk-sf1rfdjvo3BbCHC5gckdr0NvFd_C7OVv9zoUDif8km_ei9OB2k4SNszNRI8k3WU4vbjMzsXew63K-X6BA1&amp;t=635586452020000000" type="text/javascript"></script>


<script src="/WebResource.axd?d=up9_MzbfOkXw6OX1sdwx4RRf8aFb32vzXmaBIwXZME9O-luzUPll5rV61TLEQVFj5EbiFD54_F6c9guKZu5W5cQivf-7r50Eed2oN28-ztg1&amp;t=635586452020000000" type="text/javascript"></script>
<div class="aspNetHidden">

	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="9B6B907B" />
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAA9aE51GbHWjOdZJ1GlhZMnOoazWswBkDKFUUYqMY1KDHqD1ne+C1PCjKRdBlY2rqjCFE+czl1aCyjbLtuPuRU0tIVu1gi3bgvDqS3Gt3lnrvwfN6mb+isxcWkl9Q60piABbfxBqNrfUEF6uQkovtGqdLYs0kNxQz8+I4QZL2jaBNXEeCDhHhLXSBYrdqQaJuhQUJUDLNGGaCNsLQ2SjaQc7dA89YXvxgb60Jy7ssB4KCwC6bHj6+BrLDrEe/Kwzom29cEWnMEi800kMYk/dM0tAi7kLJnpB8B/U17unWNWfoc34O/GfAV4V4n0wgFZHr3dW1FwxB275S4fFq/qydWeKMZAkot4xESPcLnNgCTKyFw==" />
</div>
   
<div id="header" class="auto-style6">

    <strong>Member Session</strong></div>
        <div id="nav"  >


            <span class="newStyle1">
      <span id="Label26">Member ID</span>
      &nbsp;<input name="MemberID" type="text" value="3" onchange="javascript:setTimeout(&#39;__doPostBack(\&#39;MemberID\&#39;,\&#39;\&#39;)&#39;, 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="MemberID" tabindex="3" style="border-style:Inset;height:24px;width:173px;text-align:center; font-size: large;" />
      &nbsp;
        <input type="submit" name="Button7" value="Find" id="Button7" class="auto-style11" style="color:Black;background-color:#F3F3F3;border-color:#33CC33;border-style:Outset;height:29px;width:117px;" />
      <br />
      <span id="Label6">First Name</span>
      &nbsp;<input name="FirstName" type="text" value="Dave" id="FirstName" tabindex="3" class="auto-style8" style="border-style:Inset;height:24px;width:269px;" />
&nbsp;&nbsp;&nbsp;
      <span id="Label25">Last Name</span>
      &nbsp;<input name="LastName" type="text" value="Adams" id="LastName" tabindex="3" class="auto-style9" style="border-style:Inset;height:24px;width:345px;" />

<div>


            <span class="newStyle1">
      <span id="Label27">Package</span>
      &nbsp;<input name="Package" type="text" value="Basic1-2" id="Package" tabindex="3" class="auto-style3" style="border-style:Inset;height:24px;width:249px;text-align:center; font-size: large;" />

      </span>

</div>
            <br />
      <span id="Label29">Session Notes</span>
      &nbsp;<textarea name="Notes" rows="2" cols="20" id="Notes" tabindex="3" style="border-style:Inset;height:45px;width:465px;font-size: large">
</textarea>
            <br />
            <br />
            <input type="submit" name="Button4" value="In" id="Button4" class="auto-style7" style="color:#33CC33;background-color:#F3F3F3;border-color:#33CC33;border-style:Outset;height:44px;width:262px;" />

            <br />

            <br />
            <input type="submit" name="Button5" value="Out" id="Button5" class="auto-style7" style="color:Red;background-color:#F3F3F3;border-color:Red;border-style:Outset;height:44px;width:262px;" />

      </span>

</div>

<div id="nav2" >

    <br />
    <span id="Label13" class="newStyle1" style="top: 378px; left: 365px; height: 19px; width: 99px; right: 897px;">Next Class</span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    <input name="Grand" type="text" id="Grand" style="background-color:White;width:107px;top: 375px; height: 18px; left: 483px; bottom: 259px; text-align: center; right: 763px; font-size: medium;" />
    <br />
    <br />
    <span id="Label24" class="newStyle1" style="top: 378px; left: 365px; height: 19px; width: 99px; right: 897px;">Last Payment</span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="LastPayment" type="text" id="LastPayment" style="background-color:#FFFF99;width:107px;top: 375px; height: 18px; left: 483px; bottom: 259px; text-align: center; right: 763px; font-size: medium;" />
    <br />
    <span id="Label28" class="newStyle1" style="top: 378px; left: 365px; height: 19px; width: 99px; right: 897px;">Days Used</span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="CheckBalance0" type="text" id="CheckBalance0" style="background-color:#FFFF99;width:107px;top: 375px; height: 18px; left: 483px; bottom: 259px; text-align: center; right: 763px; font-size: medium;" />
    <br />
    <span id="Label30" class="newStyle1" style="top: 378px; left: 365px; height: 19px; width: 99px; right: 897px;">Balance</span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
    <input name="CheckBalance1" type="text" id="CheckBalance1" style="background-color:#FFFF99;width:107px;top: 375px; height: 18px; left: 483px; bottom: 259px; text-align: center; right: 763px; font-size: medium;" />
    <br />
    <br />
    <br />
    <div class="auto-style10">
        <span class="newStyle1">
        <input type="submit" name="Button6" value="Member Search" id="Button6" class="auto-style7" style="color:Black;background-color:#F3F3F3;border-color:#33CC33;border-style:Outset;height:44px;width:262px;" />
        </span>
    </div>
    <br />
    <br />
    <div class="auto-style10">
        <span class="newStyle1">
        <input type="submit" name="Button1" value="Back To Options" id="Button1" class="auto-style7" style="color:Black;background-color:#F3F3F3;border-color:#33CC33;border-style:Outset;height:44px;width:262px;" />
        </span>
    </div>


</div>

<div id="footer" class="auto-style6">

    <strong>Tedesco Body Shop</strong> </div>
        
        <br />
        
        
        
        
        


<script type="text/javascript">
//<![CDATA[
WebForm_AutoFocus('Notes');//]]>
</script>
</form>
</body>
</html>

Open in new window

0
Julian HansenCommented:
That is what is needed - for future though - use the CODE tags to post code. Hightly your code and then click the Code button in the toolbar - makes it MUCH easier to work with in this forum.

I have added these for you.
0
Julian HansenCommented:
There is not much in the code that we can work with as it is not possible to replicate the error.

I suspect though that what is happening is that when you swipe a CR (carriage return) is being sent as part of the data which is triggering some default behaviour on the form.

Can you confirm if this is the case?

To fix - you either you need to prevent the scanner from sending the CR
OR
Try something like this - in your <input> for the scanner
(Change id to match input you are sending input to)
<input id="memberId" type="text" onkeypress="return preventCR(event)" />
<script type="text/javascript">
function preventCR(e)
{
   if (e.keyCode == 13) {
      return false;
   }
   return true;
}
</script>

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave_CARSITAuthor Commented:
Absolutely amazing!
The CR was enabled on scan devise, I re-configured device and it works great.
Thank you many times over.
0
Julian HansenCommented:
You are most welcome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.