Search Results

Search found 12948 results on 518 pages for 'mouse events'.

Page 137/518 | < Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >

  • How to set the position .

    - by shamim
    http://www.kampyle.com/ in this url when you scroll one picture always moves. i want to know this process name.how can they do it. after click this picture it's vanish and never appear even refresh the page.How they get information i click this picture .it will be helpful for me if some one give me the solution .

    Read the article

  • using multi-markers with multi info-windows

    - by mohsen
    I have an array of info-windows corresponding to an array of markers. Now, I have a problem, I use the below code to generate an info-window, when clicking on the marker all the markers disappear unless one, also when I click on that marker there is no info-window come out. What is the wrong with my code ? or what shall I do ? Any answer will be very appreciated, Thanks in advance. This code is inside a for loop: infoWindoArray[i][j] = new google.maps.InfoWindow({ content:"Lat: "+this.position.lat() + "\nLng: " + this.position.lng() + "\n"+ this.customInfo, }); google.maps.event.addListener(AllMarkers[i][j], 'click', (function(x) { return function() {infoWindoArray[i][j].open(map,AllMarkers[i][j]);} })(x));

    Read the article

  • Do not fire 'zoom_changed' event when calling fitBounds function on map

    - by Encore PTL
    Is there a way to prevent the zoom_change event from being triggered if it occurs due to fitBounds() ? I am having an issue where I need to do a search on the server from client when there is a zoom change to map but every time I call fitBounds() it causes zoom_change to trigger which causes the client to do another search on the server. I am only interested in zoom_change done by users and not programmatically using fitBounds.

    Read the article

  • UIEvent timestamp

    - by skajam66
    When handling a UIButton touch, you are given a UIEvent object. The UIEvent object has a timestamp which the Apple documentation states as being "the time that the event was created" (UIEvent Class Reference). In the documentation on the Main Event Loop, it states that: "The application object obtains the topmost object in the event queue, converts it to an event object (UIEvent) ..." Does [UIEvent timestamp] refer to the time at which the UIEvent object is created (i.e. after processing the touch event off of the main run loop and hance not remotely real-time) or does it refer to the time that the underlying touch object was created (and hence as close as possible to representing the actual time of the user touch9?

    Read the article

  • Image container instead of event object in image load event handler

    - by avok00
    I stumbled upon a very strange thing. In FF 3.6 (not tested others yet) I add onload handler to an image like this: imgRef.addEventListener("load", activateLink, false); When load event fires, in activateLink(evt) the evt paramater is not an event, but the "a" tag that contains the image. Why is this? function activateLink(evt) { // evt turns out to be a refference to <a> tag (HTMLAnchorElement) that contains the image. // Actually two of them. Both dynamically added with addElement. } I remembered another fact that may be relevant. I have multiple images with the same src that all have registered this same event handler activateLink. Could this be the problem?

    Read the article

  • Issue in CheckedChanged event

    - by Gaddigesh
    I have a check box and I have subscribed for the CheckedChanged event. The handler does some operations in there. I check and uncheck the checkbox programmatically (ex: chkbx_Name.Checked = true), and the CheckedChanged event gets fired. I want this event to be fired only when I manually check or uncheck it. Is there any way to avoid firing of this event when i check/uncheck it programmatically?

    Read the article

  • Youtube video on load through Jquery/JS

    - by jonthecoder2346
    My goal is to display a youtube video through a javascript function that will read the embedded code and load the video automatically in the div assigned. But I am not getting anything shown in the div assigned for the video. Is it because it has to be triggered by a button click? <script type="text/javascript"> var last_cnad_text_1 = ''; var options_cnad_text_1 = { embedMethod:'fill', maxWidth:320, maxHeight: 320 }; function loadVideo() { val = $('#cnad_text_1').val(); if ( val != '' && val != last_cnad_text_1 ) { last_cnad_text_1 = val; $("#embed_cnad_text_1").oembed(val,options_cnad_text_1); } } $(function(){ $('#cnad_text_1').keydown(loadVideo()); $('#cnad_text_1').click(loadVideo()); $('#cnad_text_1').change(loadVideo()); }); </script> <body> <input id="cnad_text_1" type="text" value="" size="60" name="cnad[text_1]"> <div id="embed_cnad_text_1"></div> </body> </html>

    Read the article

  • jquery question

    - by OM The Eternity
    I am using the Jquery library to copy the text enter in one textfield to another textfield using a check box when clicked.. which is as follows <html> <head> <script src="js/jquery.js" ></script> </head> <body> <form> <input type="text" name="startdate" id="startdate" value=""/> <input type="text" name="enddate" id="enddate" value=""/> <input type="checkbox" name="checker" id="checker" /> </form> <script> $(document).ready(function(){ $("input#checker").bind("click",function(o){ if($("input#checker:checked").length){ $("#enddate").val($("#startdate").val()); }else{ $("#enddate").val(""); } }); } ); </script> </body> </html> now here i want the check box to be selected by default, so that the data entered in start date get copied automatically as check box is checked by default... so what event should be called here in jquery script? please help me in resolving this issue...

    Read the article

  • Hooking a synchronous event handler on a form submit button in JS

    - by Xzhsh
    Hi, I'm working on a security project in javascript (something I honestly have not used), and I'm having some trouble with EventListeners. My code looks something like this: function prevclick(evt) { evt.preventDefault(); document.loginform.submitbtn.removeEventListener('click',prevclick,false); var req = new XMLHttpRequest(); req.open("GET","testlog.php?submission=complete",false); req.send(); document.loginform.submitbtn.click(); //tried this and loginform.submit() } document.loginform.submitbtn.addEventListener('click',prevclick,false); But the problem is, the submit button doesn't submit the form on the first click (it does, however, send the http request on the first click), and on the second click of the submit button, it works as normal. I think there is a problem with the synchronization, but I do need to have the request processed before forwarding the user to the next page. Any ideas on this would be great. Thanks in advance.

    Read the article

  • view-port resize vs document resize in IE

    - by mkoryak
    window.resize event in IE doesnt do what i thought it does. I thought it only triggered when the physical window/view-port changed size (ie user hits maximize on the browser window for example), but it is also triggered if i change the document size, introducing scroll bars. is there any way to tell those two things apart: view port resize, and document resize without writing an elaborate hack?

    Read the article

  • Call event from original thread ??

    - by user311883
    Hi all, Here is my problem, I have a class which have a object who throw an event and in this event I throw a custom event from my class. But unfortunately the original object throw the event from another thread and so my event is also throw on another thread. This cause a exception when my custom event try to access from controls. Here is a code sample to better understand : class MyClass { // Original object private OriginalObject myObject; // My event public delegate void StatsUpdatedDelegate(object sender, StatsArgs args); public event StatsUpdatedDelegate StatsUpdated; public MyClass() { // Original object event myObject.AnEvent += new EventHandler(myObject_AnEvent); } // This event is called on another thread private void myObject_AnEvent(object sender, EventArgs e) { // Throw my custom event here StatsArgs args = new StatsArgs(..........); StatsUpdated(this, args); } } So when on my windows form I call try to update a control from the event StatsUpdated I get a cross thread exception cause it has been called on another thread. What I want to do is throw my custom event on the original class thread, so control can be used within it. Anyone can help me ?

    Read the article

  • Delphi: How to call a method when i click a control?

    - by Ian Boyd
    i have a method: procedure Frob(Sender: TObject); that i want to call when i click a menu item. The method comes to me though an interface: animal: IAnimal; IAnimal = interface procedure Frob(Sender: TObject); end; The question revolves around what to assign to the OnClick event handler of a menu item (i.e. control): var animal: IAnimal; ... begin ... menuItem := TMenuItem.Create(FileMenu) menuItem.Caption := 'Click me!'; menuItem.OnClick := <-------- what to do ... end; The obvious choice, my first attempt, and the wrong answer is: menuItem.OnClick := animal.Frob; So how can i call a method when user clicks a control? See also Why doesn't it work?

    Read the article

  • How do I stop a page from unloading (navigating away) in JS?

    - by Natalie Downe
    Does anyone know how to stop a page from reloading or navigating away? jQuery(function($) { /* global on unload notification */ warning = true; if(warning) { $(window).bind("unload", function() { if (confirm("Do you want to leave this page") == true) { //they pressed OK alert('ok'); } else { // they pressed Cancel alert('cancel'); return false; } }); } }); I am working on an e-commerce site at the moment, the page that displays your future orders has the ability to alter the quantities of items ordered using +/- buttons. Changing the quantities this way this doesn't actually change the order itself, they have to press confirm and therefore committing a positive action to change the order. However if they have changed the quantities and navigate away from the page I would like to warn them they are doing so in case this is an accident, as the changed quantities will be lost if they navigate away or refresh the page. In the code above I am using a global variable which will be false by default (its only true for testing), when a quantity is changed I will update this variable to be true, and when they confirm the changes I will set it to false. If warning is true and the page is unloaded, I offer them a confirmation box, if they say no they would like to stay on this page I need to stop it from unloading. return false isn't working, it still lets the user navigate away (the alerts are there for debugging only) Any ideas?

    Read the article

  • Validating a text box value using javascript

    - by swathi
    Hi all, I have a textbox.The user will be entering entering a number in this box.The user should enter two digits followed by a period "." and another digit.It would look something like 22.3 or 00.5 or 01.2. If the textbox is not empty,I want to enforce a function which validates the value entered by the user(and gives them an alert if the value entered is not according to the format mentioned above) .This function needs to be triggered when the textbox loses its focus.I am not sure how to go ahead in writing this function as i am still new to this. Any help would be appreciated.Thanks in advance. p.s This function should be triggered each time there is a change in the value.Like suppose, the user enters a value 22, then when the textbox loses its focus,the javascript function should be triggered giving them an alert asking the user to change it to the accepted format which is 22.0.The function should be triggered again when the textbox loses its focus(after the change has been done).This time there would not be an alert since the user entered it in the right format.

    Read the article

  • javascript :Object doesn't support this property or method

    - by Kaushik
    In my jsp page, I have in the tag, the following code: <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/common.js"></script> <script type="text/javascript"> // Function for Suppressing the JS Error function silentErrorHandler() {return true;} window.onerror=silentErrorHandler; </script> If there is some javascript executing on the jsp page after this, then I guess silentErrorHandler() will have no effect. i.e. the error will still show on page. IS this correct? Because the error is showing and am not sure why. The second part of the question is this: The error is Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; AskTbFXTV5/5.9.1.14019) Timestamp: Fri, 7 Jan 2011 21:26:23 UTC Message: Object doesn't support this property or method Line: 613 Char: 1 Code: 0 URI: http://localhost:9080/Claris/static/js/common/common.js And finally, line 613 states document.captureEvents(Event.MOUSEUP); There is error on IE8. Runs fine on Mozilla and IE7. Any suggestions will be very helpful

    Read the article

  • WithEvents LinkedList is it Impossible?

    - by serhio
    What is the optimal approach to a WithEvents Collection - VB.NET? Have you any remarks on the code bellow (skipping the Nothing verifications)? The problem is when I obtain the LinkedListNode(Of Foo) in a For Each block I can set myNode.Value = something, and here is a handlers leak... -Could I override the FooCollection's GetEnumerator in this case? -No. :( cause NotInheritable Class LinkedListNode(Of T) Class Foo Public Event SelectedChanged As EventHandler End Class Class FooCollection Inherits LinkedList(Of Foo) Public Event SelectedChanged As EventHandler Protected Overloads Sub AddFirst(ByVal item As Foo) AddHandler item.SelectedChanged, AddressOf OnSelectedChanged MyBase.AddFirst(item) End Sub Protected Overloads Sub AddLast(ByVal item As Foo) AddHandler item.SelectedChanged, AddressOf OnSelectedChanged MyBase.AddLast(item) End Sub ' ------------------- ' Protected Overloads Sub RemoveFirst() RemoveHandler MyBase.First.Value.SelectedChanged, _ AddressOf OnSelectedChanged MyBase.RemoveFirst() End Sub Protected Overloads Sub RemoveLast(ByVal item As Foo) RemoveHandler MyBase.Last.Value.SelectedChanged, _ AddressOf OnSelectedChanged MyBase.RemoveLast() End Sub ' ------------------- ' Protected Sub OnSelectedChanged(ByVal sender As Object, ByVal e As EventArgs) RaiseEvent SelectedChanged(sender, e) End Sub End Class

    Read the article

  • image onclick event not working

    - by heart_throbber
    im tryin to make a onclick event for my image, but its not workin..the alert is not showing up.. $(document).ready(function(){ $('img.closeAttrIcon').click(function(){ alert("ww"); }); }); even if i try like this with ..bind.. no hope... $(document).ready(function(){ $('img.closeAttrIcon').bind('click',function(){ alert("ww"); }); }); the html will be created during this event: $('a#btnAddStdntAttr').click(function(){ var newAttr = '<div class="attrParent"><br class="clear"><label></label><input type="text" id="stdntAttributeKey1" maxlength="250" style="width: 13%;" name="stdntAttributeKey1"/>'; newAttr+= '<input type="text" id="stdntAttributeValue1" maxlength="250" style="width: 13%;" name="stdntAttributeValue1"/>'; newAttr+= '<img src="<c:url value="/static/images/closeIcon.png"/>" onclick="removeStdntAttr();" class="closeAttrIcon" alt="Close" title="Close" /></div>'; $(this).after(newAttr); }); what am i doing wrong here..please help..

    Read the article

  • MooTools request fails

    - by acoder
    Hi everyone, I am trying to achieve this task using MooTools. Description: I have three buttons. Two buttons outside myDiv and one button inside myDiv. A click on any of these buttons initiates an AJAX request (passing button variable to "button.php") and updates myDiv content based on the response text. So, after update, myDiv shows Button3 link + a message showing which button has been clicked. The problem: Everything seems to work fine but after several clicks, it happens that myDiv shows loader.gif image and stops. After this, if I wait a few moments, the browser sometimes stops working (gets blocked). I noticed this problem with IE6. Does anyone know what does this problem mean and how it can be avoided? index.html <html> <head> <script type="text/javascript" src="mootools/mootools-1.2.4-core-nc.js"></script> <script type="text/javascript" src="mootools/mootools-1.2.4.4-more.js"></script> <script type="text/javascript"> window.addEvent('domready', function() { $("myPage").addEvent("click:relay(a)", function(e) { e.stop(); var myRequest = new Request({ method: 'post', url: 'button.php', data: { button : this.get('id'), test : 'test' }, onRequest: function() { $('myDiv').innerHTML = '<img src="images/loader.gif" />'; }, onComplete: function(response) { $('myDiv').innerHTML = response; } }); myRequest.send(); }); }); </script> </head> <body> <div id="myPage"> <a href="#" id="button1">Button1</a> <a href="#" id="button2">Button2</a> <div id="myDiv"> <a href="#" id="button3">Button3</a> </div> </div> </body> </html> button.php <a href="#" id="button3"Button3</a> <br><br> <?php echo 'You clicked ['.$_REQUEST['button'].']'; ?>

    Read the article

  • mootools event listener disappears after element.innerHTML is changed

    - by baiano
    I putting together a page that will display a set of stored values. I am using mootools and AJAX calls to update the values without needing to refresh the page each time the user selects a new item from the drop down menus. the HTML each line looks something like: <div class="selections"> <input class="checkbox selector" type="checkbox" CHECKED /> <span class="b_name"> <select class="b_n selector"> <!-- options --> </select> </span> <span class="b_level"> <select class="b_l selector"> <!-- options --> </select> </span> <span class="values"> <!-- the values --> </span> In the head I have set up an event listener like: $$('.selector').addEvent('change', function(event){changeValues(this);}); My problem is that when the "b_name" select changes I have to update the list of options in the "b_level" select. I accomplish that by getting a list of the possible options from my database through a php script on another page and replacing "b_level"'s innerHTML. Once I do that, the event listener attached to "b_l selector" no longer works. I tried to resolve this issue by explicitly attaching an event listener to "b_l selector" each time "b_name" changes like so: row.getElement('.b_l').addEvent('change', function(event){changeValues(row.getElement('.b_l'));}); where 'row' is the html element 'div.selections'. It still isn't working and I have no idea what's going on. Can anyone offer a suggestion as to how I can get this resolved? or perhaps a better way to do what I'm doing. Thanks

    Read the article

  • What's wrong with addlistener... how do i fire my event

    - by KoolKabin
    I am using the following functions to do my task. It works fine when cursor moves away from textbox but if i want to fire the same event from code say like next function i get error... function addEvent( obj, type, fn ) { if (obj.addEventListener) { obj.addEventListener( type, fn, false ); } else if (obj.attachEvent) { obj["e"+type+fn] = fn; obj[type+fn] = function() { obj"e"+type+fn; } obj.attachEvent( "on"+type, obj[type+fn] ); } else { obj["on"+type] = obj["e"+type+fn]; } } function addEventByName(ObjName, event, func){ MyEle = document.getElementsByName(ObjName); addEvent(MyEle[0], event, func); } addEventByName("txtBox", 'blur', function(){ alert('hello'); }); function fire(){ x = document.getElementsByName('txtBox')[0]; x.blur(); //gives error x.onblur(); //gives error }

    Read the article

  • Core jQuery event modification problem

    - by DSKVR
    I am attempting to overwrite a core jQuery event, in this case the keydown event. My intention is to preventDefault() functionality of Left(37), Up(38), Right(39) and Down(40) to maintain the consistency of hot keys in my web application. I am using the solution provided here for the conditional charCode preventDefault problem. For some reason, my function overwrite is simply not firing, and I cannot put my finger on the problem. I am afraid that over the past 30 minutes this issue has resulted in some hair loss. Anybody have the remedy? /* Modify Keydown Event to prevent default PageDown and PageUp functionality */ (function(){ var charCodes = new Array(37,38,39,40); var original = jQuery.fn.keydown; jQuery.fn.keydown = function(e){ var key=e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; alert('now why is my keydown mod not firing?'); if($.inArray(key,charCodes)) { alert('is one of them, do not scroll page'); e.preventDefault(); return false; } original.apply( this, arguments ); } })();

    Read the article

< Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >