Hello all,
I have a standard-issue textbox to enter search words and an imagebutton to
execute the search. When they press enter in the textbox I want it to click
the button and run the server-side handler.
Based on code I've seen out here and other articles, I can do this if the
button is <input type=button>, by trapping the enter key in script and
calling myButton.onclick from the textbox.
But, I can't get this to work if the button is <input type=image>. I think
it has to do with default submit behavior, but I'm not seeing it. I'm
thinking too I might need to explicitly set the __eventtarget before the
submit, but that isn't working either. Any thoughts?
Thanks,
Bill 2 1431
Are you using Server side button or Client side?
"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:4A**********************************@microsof t.com... Hello all,
I have a standard-issue textbox to enter search words and an imagebutton
to execute the search. When they press enter in the textbox I want it to
click the button and run the server-side handler.
Based on code I've seen out here and other articles, I can do this if the button is <input type=button>, by trapping the enter key in script and calling myButton.onclick from the textbox.
But, I can't get this to work if the button is <input type=image>. I think it has to do with default submit behavior, but I'm not seeing it. I'm thinking too I might need to explicitly set the __eventtarget before the submit, but that isn't working either. Any thoughts?
Thanks,
Bill
Server-side.
"David Young" wrote: Are you using Server side button or Client side?
"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message news:4A**********************************@microsof t.com... Hello all,
I have a standard-issue textbox to enter search words and an imagebutton to execute the search. When they press enter in the textbox I want it to click the button and run the server-side handler.
Based on code I've seen out here and other articles, I can do this if the button is <input type=button>, by trapping the enter key in script and calling myButton.onclick from the textbox.
But, I can't get this to work if the button is <input type=image>. I think it has to do with default submit behavior, but I'm not seeing it. I'm thinking too I might need to explicitly set the __eventtarget before the submit, but that isn't working either. Any thoughts?
Thanks,
Bill This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Christian Ista |
last post by:
Hello,
I have a database, a simple table called "FAQ" in this table 3 fields "ID",
"QUESTION" and "ANSWER".
I'd like for all record return by a query display the question next to an...
|
by: Chuck Hartman |
last post by:
I've been trying to add an ImageButton object to a Calendar table cell, but
so far I am unable to handle the Command event from that button in my form's
code behind. Below is an example of what I...
|
by: David Hearn |
last post by:
I have an ImageButton control that I am using on one of my pages. Sometimes,
this button will act as a button and redirect users to another page. But
sometimes, it will just act as an image...
|
by: ruca |
last post by:
Hi gurus,
I have a imagebutton in my WebForm, and I want that when I click (mouse
down) on her the imagebutton change image and when I "unclick" (mouse up)
change to the original image.
Basically...
|
by: tshad |
last post by:
I was trying to change my asp:button to asp:ImageButton, but got a message
saying that ImageButton does not have an onClick function.
How do I get the ImageButton call a function?
Thanks,
...
|
by: tperri |
last post by:
I have an HTML table with several fields like this:
<A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood"
ImageUrl="images\buttons\btn-food-i.gif"...
|
by: Bendik Engebretsen |
last post by:
I'm an ASP newbie and have just started experimenting with ASP.NET 2.0 using
the VS.NET 2005 Beta. As a starting point I have used the 'Personal WEB
site' starter kit.
I am now trying to figure...
|
by: ad |
last post by:
I have a Button (named btnOK) and a ImageButton (named ImageButton1) in a
Template field of a GridView;
I use the codes below to find the Button and ImageButton, the ImageButton
can be found,...
|
by: Benny Ng |
last post by:
Dear All,
<input type="checkbox" name="chkAgreement" value="0">I agree with the above
terms and conditions
<asp:ImageButton ID="ImgBtnSubmit" Runat="server" CausesValidation=True...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |