473,800 Members | 2,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to avoid double click on a link next an input

I have a form containing a link next to an input box. I include a
javascript function in the input by using the onblur='fuc()'. I used
this function to open another ASP page to do something and then close
the window. There was no problem if I just clicked other place on the
form. everything was working as charm. However, If I want to click the
link next to it after I moved out the input box, I always have to click
twice in order to open the page directed by the link. Is there another
event handler which can replace the onblur so that I do not need to
click twice on the link. This problem bothers me for couple days.
Although I have tried several event handler (from onblur, onchange,
onmuseout), none of work as I expect. Hope any guru can drop some tip?
I am jst a casual user of javascript and the html. Thanks.

C Chang
Jul 23 '05 #1
2 4194
Hi chang, can you put the html which ur working so that i can see what
exactly happening.

Jul 23 '05 #2
ch************* **@gmail.com wrote:
Hi chang, can you put the html which ur working so that i can see what
exactly happening.

Sine the Web page was created by the ASP reponse.write, I include the
write out here as I grab from the view source
<htm>
...
<script language=javasc ript>
function checkRole(guest )
{
if (guest == 'guest') {
var val = document.Form1. Text1.value;
var win = window.open('ot herPage.asp?val ='+val, 'name');
win.close();
}
else (
//do something else
)
}

function addAddress()
{
var val = document.Form1. Text1.value;
var win = window.open('se condPage.asp?va l='+val, 'name');
}

-->
</script>
<body>
<form name=Form1 >
<a href="#" onclick="addAdd ress();">Add Address</a>
<input type=Text name=Text1 value="myemail@ hotmail;.."
onblur="checkRo le('guest')>
<input type=Text name=Text2 value="" >

......
</form>
</body>
</html>

Above is the part that I have problem. The values in the Text1 and in
the function of checkRole(..) were entered by the Database return.
Basically, I tried to prevent user to change the old value in the input
field if they do not meet certain condition, after that user can either
click on the link (Add Address) to open an pop-up address book to do
something else or continue other input fields on the page. The page is
huge. However, if user meet the role, whatever user add extra value in
the text1 value field, the function call will open the otherPage.asp to
process the value. That is problem come in. because when user click on
the link first time, the process on the ohterpage is working and done (I
can see the a quick window open and close), So the secnodPage will not
open, until I click again on the link. I want to know how to avoid
that. Is the onafterupdate event available for the <input>? It is
mentioned in the Jscript reference. Thanks.

C Chang

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
513
by: Rob Mayo | last post by:
OK, maybe this is my opinion, maybe these are bugs. Given the folowing: I have a NotifyIcon on my Form, a Context menu associated with the NotifyIcon, and a MenuItem on the ContextMenu set as default. When the default MenuItem is clicked, there is code to no longer show the NotifyIcon. What I feel should happen is when I double-click the NotifyIcon in the system tray, it should perform the default menu item's Click event.
6
15644
by: Richard A. Lowe | last post by:
I'm using P/Invoke to call SendInput (using code culled from these newsgroups!) to send mouse events to a window. But I'm unsure how to send double-clicks. A VB6 article I saw on SendInput suggested simply queueing two click events, but this is not working for me, regardless of the delay I put between clicks. So give this as a click (where INPUT is an appropriate structure for sending the SendInput data): public static void Click()
6
20067
by: Brian Smith | last post by:
Is there a way to avoid the default action of TreeNode expansion/contraction caused by double click? I can add an event handler to pop up my properties dialog on double click, but it has the unintended side-effect of toggling the expansion of that subtree. Thanks in advance, Brian
0
1409
by: Daniel Bass | last post by:
I've got a button (server side) next to a list box (server side)... is it possible, that on a double click on the listbox, and event can cause a button click simulation? I've manually inserted the OnDblClick attribute into the asp:Listbox tag and this does appear to fire, but I can't get it to call my server side code... If I try to call a public function in the code-behind, 'OnDblClick="InsertSelectedFiles()"' it says that an object...
7
2670
by: Pam | last post by:
When I double click on a event in a form I want it to bring up another form and load the same data so it can be edited. I'm having a hard time doing this. The new form loads;but my file can't be found. Can you can me some ideas on how to do this. Please help!!
6
8646
by: Sakharam Phapale | last post by:
Hi All, How to capture Mouse Single click and mouse double click event on Commnad Button. I am doing as follows. Private Sub Button1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseUp If e.Clicks = 1 Then
3
2960
by: Siv | last post by:
Hi, I have a ListView control in a Windows application, currently single clicking a customer name in this list, selects the customer and displays their details in text boxes to the right of the list. The user must then click a button to select that customer and move off the page to the main database details. I would like to implement being able to double-click the listview item and it have the same effect as single clicking and then...
3
2260
by: =?Utf-8?B?V2lsbA==?= | last post by:
I have an image "button" which causes a postback. I handle the "click" with If Request.Form("btnBU7WD6_Submit.X") 0 Then... this works great. However, when a user double-clicks the image button the Page_Load (postback) is processed twice. This is a problem. Is there any easy way to detect that the image button has been double-cliked
3
1736
by: Zippy | last post by:
I have recently moved from A97 to A2003. I find it inconvenient that I can no longer double-click on the subform to open it in full view. I had a hunt around the newgroups and couldn't find anything helpful. I know that I can right-click to open, but is there anything I can do to make it do it the 'good old way'? -- Zippy S
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10250
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7574
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.