Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

problem in ASP not ASP.net

  Asked By: Oscar    Date: Aug 19    Category: Asp.net    Views: 1337
  

somone has an asp page where he has a text box and a search button, now user
enters some value and clicks on search button and it works fine, however when he
enters some value ion the text box and just clicks on Enter the refreshed form
is empty, any one can help quickly pls?

Share: 

 

11 Answers Found

 
Answer #1    Answered By: Fabia Ferrrari     Answered On: Aug 19

Can you post some code examples?

 
Answer #2    Answered By: Anuja Shah     Answered On: Aug 19

well as I said it is like that I have a box  to search  for customer names by
name, the value is entered and then there is find button  upon which the sql
search at the back displays results, however the user clicks  enter button while
he is in the text  box and don not click on find the page  displays nothing, let
me paste the two statements which are on form submission:
When I clicked on find I got
............/details.asp\
=Find

When I clicked enter  button inside the text box

............/details..asp

 
Answer #3    Answered By: Emma Campbell     Answered On: Aug 19

Its obviously going to be an easy one ... POST CODE PLEASE.

Or a simplified but definitive example of what teh problem  is.

 
Answer #4    Answered By: Kellie Bishop     Answered On: Aug 19

Ummm ... dunno, tell him not to click enter  on keyboard but make sure he clicks
the search  button ?

Perhaps catch key strokes ... but I don't know how ?
Why is there a problem  if he clicks  enter ?

............/details.asp\
=Find
http://............/details.asp?SearchType=username&SearchValue=usman616

both pass the SearchValue ... so why is there a problem ?

 
Answer #5    Answered By: Mona Wagner     Answered On: Aug 19

I've ran into this prob with some past pages - where the form is submitted
when hitting the enter  key from within a text  field & the form auto-posts.
If you're not enabling viewstate on the page  - or on the elements you want
displayed - then they will show up after that post. If you don't want to
use viewstate, then you'll have to reload your elements manually. I
haven't found a way of disabling that post event -- perhaps a javascript
function call could help  - but i belive it's IE's behavior to do this...

 
Answer #6    Answered By: Eloise Lawrence     Answered On: Aug 19

hopefully a function in java script will solve this
problem.

 
Answer #7    Answered By: Doyle Gonzalez     Answered On: Aug 19

if you come up w/ a solution - would you mind posting it? It might
come in handy for myself & others with this problem  down the road...

 
Answer #8    Answered By: Balbir Kaur     Answered On: Aug 19

sure mate, but on saturday as Thursday & Friday are week ends here, so saturday

 
Answer #9    Answered By: Rene Sullivan     Answered On: Aug 19

While your there, post the code to that download speed test you have at your
site.

 
Answer #10    Answered By: Milton Robinson     Answered On: Aug 19

since that is where all the Classic asp  programmers "live" and such
inquiries are excellent material for those archives. The problem  is the
members here want ASP.net qustions and answers and classic ASP questions
break the flow and distract from ASP.net threads.

 
Answer #11    Answered By: Vinit Online     Answered On: Aug 19

Here's a bit of code I found to solve this problem:


<script language=javascript>
<!--
var clickedButton = false;

function check()
{
if (clickedButton)
{
clickedButton = false;
return true;
}
else
{
return false;
}
}

//-->
</script>

</HEAD>
<BODY ms_positioning="GridLayout">
<FORM ID="Form1" onSubmit="return check()">
<INPUT TYPE="TEXT" ID="Text1" NAME="Text1">
<INPUT TYPE="SUBMIT" onClick="clickedButton=true" ID="Submit1"
NAME="Submit1">
</FORM>
</BODY>


I know that it is bad for me to answre an ASP question here,
but I guess I was born to be bad!

 
Didn't find what you were looking for? Find more on problem in ASP not ASP.net Or get search suggestion and latest updates.




Tagged: