Search Results

Search found 2677 results on 108 pages for 'eren trigger'.

Page 34/108 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Distinguish UI change to variable from code-behind change

    - by Jay
    Like the title says I am trying to architecture into my application a way to distinguish the source of a variable change, either from UI or code-behind. My problem is that I need to trigger some action after a property changed its value, but I only need to do this when the change comes from the UI because otherwise I don-t want to perform that action. I am having some trouble because, for example when a checkbox(two way binding), changes state, my binded property gets updated and then I use the checked and uncheked events to trigger that action.The problem is that when I change the property in codebehind it also triggers those events and I do not want that. Right now, i am using a flag that enables, or not, the actions at the event handlers but I do not feel that this is a good idea. Any sugestions or ideas? I am considering using only one-way binding and control everything my self, using commands.

    Read the article

  • Google Map Overlay Icon disappears at certain zoom level

    - by Lawrence Teo
    I notice that Firefox 3 demonstrates this problem. I put down an overlay icon and play around with the map zoom. At certain zoom level, I found that the icon disappears for some unknown reason. Zooming out brings back the icon. Or during the disappearance, I click on the Google Map and it will somehow trigger to bring back the icon. I suspect it has something to do with the event triggering. Internet Explorer doesn't demonstrate the same problem though. Any advice? Like how to trigger update event on Firefox?

    Read the article

  • How Implement a system to determine if a milestone has been reached

    - by Luc M
    I have a table named stats player_id team_id match_date goal assist` 1 8 2010-01-01 1 1 1 8 2010-01-01 2 0 1 9 2010-01-01 0 5 ... I would like to know when a player reach a milestone (eg 100 goals, 100 assists, 500 goals...) I would like to know also when a team reach a milestone. I want to know which player or team reach 100 goals first, second, third... I thought to use triggers with tables to accumulate the totals. Table player_accumulator (and team_accumulator) table would be player_id total_goals total_assists 1 3 6 team_id total_goals total_assists 8 3 1 9 0 5 Each time a row is inserted in stats table, a trigger will insert/update player_accumulator and team_accumulator tables. This trigger could also verify if player or team has reached a milestone in milestone table containing numbers milestone 100 500 1000 ... A table player_milestone would contains milestone reached by player: player_id stat milestone date 1 goal 100 2013-04-02 1 assist 100 2012-11-19 There is a better way to implements a "milestone" ? There is an easiest way without triggers ? I'm using PostgreSQL

    Read the article

  • Jquery, checkboxes and isChecked

    - by Ben
    When I bind a function to a checkbox element like: $("#myCheckbox").click( function() { alert($(this).is(":checked")); }); The checkbox changes it checked attribute before the event is triggered, it's it normal behavior, thus giving and inverse result. However, when I do: $("#myCheckbox").click(); The checkbox changes it checked attribute after the event is triggered. My question is, is there a way to trigger the click event from jquery like a normal click would do (first scenario)? PS: I've already tried with trigger('click');

    Read the article

  • Apply Alloy UI 1.5 datepicker to multiple instances

    - by MyTitle
    I want to create Alloy UI datapickers on multiple form fields: <div id="date_1_wrapper"> <input type="text" class="datepick" id="date_1" /> </div> <div id="date_2_wrapper"> <input type="text" class="datepick" id="date_2" /> </div> Using JQuery I can do it using following code: $('.datepick').each(function(){ $(this).datepicker(); }); But how to achieve same functionality in Alloy UI? For now I use following code, but this code apply DatePickers by ID, not by CSS class in loop: AUI().use( 'aui-datepicker', function(A) { new A.DatePicker ( { calendar: { dateFormat: '%d/%m/%Y' }, trigger: '#date_1' } ).render('#date_1_wrapper'); new A.DatePicker( { calendar: { dateFormat: '%d/%m/% }, trigger: '#date_2' } ).render('#date_2_wrapper'); } ); I think it this code can be used in beginning, but how to deal with input's and div's ID's? (A.all('.datepcik').each(function() {)

    Read the article

  • Jquery Ajax loading Problem

    - by Starx
    I have a function to load a html part into a element in main index page kinda like this $(".ajax").click(function() { //load a page into a element }); This works But the HTML part which i have just loaded also have links that need to trigger same function above, but it does not. Until I save that function in a separate .js file and load in the main index file as well as all other files from where I need to trigger that function even though these internal files are going to loaded into the the first main file . Is there any way for a function in the index file to run from the html document that is loaded inside a element.

    Read the article

  • YUI Autocomplete: itemSelectEvent getting lost with IE6 and IE7?

    - by Parand
    I'm using YUI Autocomplete (latest version loaded using loader as of today (May 14th, 2010), which looks to be 2.8.1, with the following options: ac = new YAHOO.widget.AutoComplete("mynode", "autocomp_node", ac_ds, {typeAhead: true, forceSelection: true}); ac.itemSelectEvent.subscribe( function(type, args) { alert("hey:" + args[2][1]); $('#parent_id').val(args[2][1]); }); The itemSelectEvent catches selections in AutoComplete and fills in some data on the parent. This works on FF, Chrome, Safari, and IE8. On IE6 and IE7, however, the event never seems to trigger. To replicate: In the autocomplete field, allow it to autofill for you, then hit enter. This should select the autofill and move on to the next field (that's what it does in other browsers). With IE6 and IE7 it seems to instead trigger the form submission - the itemSelectEvent never fires (or perhaps fires after the form submission?). Has anyone seen this? Any work-arounds?

    Read the article

  • Unnecessary 'else' statement

    - by Vitalii Fedorenko
    As you know, in Eclipse you can turn on "Unnecessary 'else' statement" check that will trigger on if-then-else with premature return. And, from my experience, there are two most possible situations when use such statement: 1) Pre-check: if (validate(arg1)) { return false; } doLotOfStuff(); 2) Post-check: doLotOfStuff(); if (condition) { return foo; } else { return bar; } In the second case, if the trigger is on, Eclipse will suggest you to change the code to: doLotOfStuff(); if (condition) { return foo; } return bar; However, I think that the return with else statement is more readable as it is like direct mapping of business logic. So I am curios if this "Unnecessary 'else' statement" code convention is widespread or else statement is more preferable?

    Read the article

  • general things developer must know having 2+ years of exp?

    - by Salil
    Hi All, I have 2 years of experience in Ruby on Rails. I have basic knowledge (Very Basic) of mysql such as data insertion, join, select from more than one table. But now i want to know more about it cause my friends are having trouble in interview when ask questions like 1] What is the trigger. 2] which trigger call when 3] what's views in mysql? etc....... are this questions for developers?is it basic database? Also what other things developer should know having experience of 2 years or more. I am in double mind as i have over two years of exp. in ruby and i am learning new thing everyday in ruby only. if someone ask me to rate yourself i can't give more than 5 out of 10 in ROR only. So my question is What are the general things developer must know having 2+ years of exp? Regards, Salil Gaikwad

    Read the article

  • ICOmmand - canexecute can not disable Button with image content.

    - by Anish
    Hi , I have a button control in my wpf-mvvm application. I use an ICommand property (defined in viewmodel) to bind the button click event to viewmodel. I have - execute and canexecute parameters for my ICommand implementation (RelayCommand). Even if CanExecute is false...button is not disabled...WHEN button CONTENT is IMAGE But, when button content is text..enable/disable works fine. <Button DockPanel.Dock="Top" Command="{Binding Path=MoveUpCommand}"> <Button.Content> <Image Source="/Resources/MoveUpArrow.png"></Image> </Button.Content> <Style> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Opacity" Value=".5" /> </Trigger> </Style.Triggers> </Style> </Button>

    Read the article

  • Oracle Triggers Query..

    - by AGeek
    Lets consider a Table STUD and a ROW-Level TRIGGER is implemented over INSERT query.. My scenario goes like this, whenever a row is inserted, a trigger is fired and it should access some script file which is placed in the hard disk, and ultimately should print the result. So, is this thing is possible? and if yes, then this thing should exist in dynamic form, i.e. if we change the content of script file, then the oracle should reflect those changes as well. I have tried doing this for java using External Procedures, but doesn't feel that much satisfied with the result that i wanted. Kindly give your point-of-view for this kind of scenario and ways that this can be implemented.

    Read the article

  • small scale web site - global javascript file style/format/pattern - improving maintainability

    - by yaya3
    I frequently create (and inherit) small to medium websites where I have the following sort of code in a single file (normally named global.js or application.js or projectname.js). If functions get big, I normally put them in a seperate file, and call them at the bottom of the file below in the $(document).ready() section. If I have a few functions that are unique to certain pages, I normally have another switch statement for the body class inside the $(document).ready() section. How could I restructure this code to make it more maintainable? Note: I am less interested in the functions innards, more so the structure, and how different types of functions should be dealt with. I've also posted the code here - http://pastie.org/999932 in case it makes it any easier var ProjectNameEnvironment = {}; function someFunctionUniqueToTheHomepageNotWorthMakingConfigurable () { $('.foo').hide(); $('.bar').click(function(){ $('.foo').show(); }); } function functionThatIsWorthMakingConfigurable(config) { var foo = config.foo || 700; var bar = 200; return foo * bar; } function globallyRequiredJqueryPluginTrigger (tooltip_string) { var tooltipTrigger = $(tooltip_string); tooltipTrigger.tooltip({ showURL: false ... }); } function minorUtilityOneLiner (selector) { $(selector).find('li:even').not('li ul li').addClass('even'); } var Lightbox = {}; Lightbox.setup = function(){ $('li#foo a').attr('href','#alpha'); $('li#bar a').attr('href','#beta'); } Lightbox.init = function (config){ if (typeof $.fn.fancybox =='function') { Lightbox.setup(); var fade_in_speed = config.fade_in_speed || 1000; var frame_height = config.frame_height || 1700; $(config.selector).fancybox({ frameHeight : frame_height, callbackOnShow: function() { var content_to_load = config.content_to_load; ... }, callbackOnClose : function(){ $('body').height($('body').height()); } }); } else { if (ProjectNameEnvironment.debug) { alert('the fancybox plugin has not been loaded'); } } } // ---------- order of execution ----------- $(document).ready(function () { urls = urlConfig(); (function globalFunctions() { $('.tooltip-trigger').each(function(){ globallyRequiredJqueryPluginTrigger(this); }); minorUtilityOneLiner('ul.foo') Lightbox.init({ selector : 'a#a-lightbox-trigger-js', ... }); Lightbox.init({ selector : 'a#another-lightbox-trigger-js', ... }); })(); if ( $('body').attr('id') == 'home-page' ) { (function homeFunctions() { someFunctionUniqueToTheHomepageNotWorthMakingConfigurable (); })(); } });

    Read the article

  • Can Uploadify send e-mail on complete?

    - by David
    Uploadify is a jQuery/Flash plugin for uploading multiple files. It's working great, except I can't figure out how trigger e-mail when all files are complete. If I try to add something like <% SendEmail(); %> to the onAllComplete parameter, it just sends the e-mail when the page loads. Is there a way to do this within the handler recommended here or from this post? Or is there some way to trigger a post in the onAllComplete parameter?

    Read the article

  • Callback for When jqGrid Finishes Reloading?

    - by James
    Hi, I am using the jqGrid plug-in and at one point I need to refresh the grid and set the selected row to match the record that I am showing in detail on another section of the page. I have the following code but it does not work: $("#AllActions").trigger("reloadGrid").setSelection(selectedRow); The selectedRow parameter comes from an event handler that gets called when the data is changed and the grid needs to be updated. I'm pretty sure that the problem is that the grid is not loaded when the selection is being set, because if I put a call to alert() between the calls to trigger() and setSelection(), it works. I would be grateful for any advice. [Edit]Looks like http://stackoverflow.com/questions/2529581/jqgrids-setselect-does-not-work-after-reloadgrid is related but did not get resolved.[/Edit]

    Read the article

  • Problem with altering model attributes in controller

    - by SpawnCxy
    Hi all, Today I've got a problem when I tried using following code to alter the model attribute in the controller function userlist($trigger = 1) { if($trigger == 1) { $this->User->useTable = 'betausers'; //'betausers' is completely the same structure as table 'users' } $users = $this->User->find('all'); debug($users); } And the model file is class User extends AppModel { var $name = "User"; //var $useTable = 'betausers'; function beforeFind() //only for debug { debug($this->useTable); } } The debug message in the model showed the userTable attribute had been changed to betausers.And It was supposed to show all records in table betausers.However,I still got the data in the users,which quite confused me.And I hope someone can show me some directions to solve this problem. Regards

    Read the article

  • jQuery: selecting by class after class change by .addClass() or .attr()

    - by Sosh
    I have some jQuery code something like this: $(document).ready(function() { $("img.off").click(function() { alert('on'); $(this).attr('class', 'on'); }); $("img.on").click(function() { alert('off'); $(this).attr('class', 'off'); }); }); The selector works fine for images that have the class name defined in the original HTML document, however after manipulating the class name with jQuery, the img item will not respond to selectors using it's new class. In other words, running the above code, if you click an 'off' img, it will trigger the first function, and change the class to 'on'. However, clicking this image again does not trigger the second function (as I would have expected), but rather triggers the first again. It's as if the selector is reading the old DOM rather than the updated version. What am I doing wrong here? Firefox 3.6.3 - jQuery 1.4.2

    Read the article

  • jQuery Tooltip plugin error

    - by hd
    i have written this code to apply 'jQuery Tooltip plugin' to ajax loaded elements. i mean the row i want to show tooltip on its mouseover is loaded into page by ajax. here's the code: $("[id^=pane]").delegate("[id^=comm]","mouseover",function() { $(this).tooltip({ // each trashcan image works as a trigger tip: "#tooltip", // custom positioning position: "center right", // move tooltip a little bit to the right offset: [0, 15], // there is no delay when the mouse is moved away from the trigger delay: 0 }).dynamic({ bottom: { direction: "down", bounce: true } }); }); the tooltip is shown when mouseover but firebug report this error: "$(this).tooltip({tip: "#tooltip", position: "center right", offset: [0, 15], delay: 0}).dynamic is not a function" is it because of using $(this) ???

    Read the article

  • python win32api registery key change

    - by user340495
    Hi, I am trying to trigger an event every time a registry value is being modified. import win32api import win32event import win32con import _winreg key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER,'Control Panel\Desktop',0,_winreg.KEY_READ) sub_key = _winreg.CreateKey(key,'Wallpaper') evt = win32event.CreateEvent(None,0,0,None) win32api.RegNotifyChangeKeyValue(sub_key,1,win32api.REG_NOTIFY_CHANGE_ATTRIBUTES,evt,True) ret_code=win32event.WaitForSingleObject(evt,3000) if ret_code == win32con.WAIT_OBJECT_0: print "CHANGED" if ret_code == win32con.WAIT_TIMEOUT: print "TIMED" my problem is that this is never triggered , the event always time-out. (the reg key I am trying to follow is the wallpaper) [ please note I trigger the event by 1) manually changing the registry value in regedit 2) an automated script which run this : from ctypes import windll from win32con import * windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0,"C:\wall.jpg",SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE) ] Thanks for any help in advance :) EDIT:: sorry about formatting

    Read the article

  • Triggering Quartz job from JSF (Any front end)- How to wait for the job execution to be over

    - by Maximus
    I am developing a front end to trigger a quartz job on the fly. I have a form in the JSF page whose click action will dynamically trigger a quartz job. The job is invoked by the following statement, the job is triggered and everything works fine. scheduler.triggerJob("Job1",Scheduler.DEFAULT_GROUP,jobDataMap); From what I understand the job seems to run in a separate thread and the execution of the calling function does not wait for the job to be over. Since I am invoking the job from front end, I would like to wait till the job is over before I navigate to a different JSF page. So I can display an error message if the job fails. I would also like to display a message to the user, "Processing job, please wait.." until the job is actually over. Any ideas on how to accomplish this will be appreciated. Thanks !

    Read the article

  • Refactoring PL/SQL triggers - extract procedures

    - by Juraj
    Hello, we have application where database contains large parts of business logic in triggers, with a update subsequently firing triggers on several other tables. I want to refactor the mess and wanted to start by extracting procedures from triggers, but can't find any reliable tool to do this. Using "Extract procedure" in both SQL Developer and Toad failed to properly handle :new and :old trigger variables. If you had similar problem with triggers, did you find a way around it? EDIT: Ideally, only columns that are referenced by extracted code would be sent as in/out parameters, like: Example of original code to be extracted from trigger: ..... if :new.col1 = some_var then :new.col1 := :old.col1 end if ..... would become : procedure proc(in old_col1 varchar2, in out new_col1 varchar2, some_var varchar2) is begin if new_col1 = some_var then new_col1 := old_col1 end if; end; ...... proc(:old.col1,:new.col1, some_var);

    Read the article

  • What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?

    - by Morgan Cheng
    Is there a standard for what actions F5 and Ctrl+F5 trigger in web browsers? I once did experiment in IE6 and Firefox 2.x. The "F5" refresh would trigger a HTTP request sent to the server with an "If-Modified-Since" header, while "Ctrl+F5" would not have such a header. In my understanding, F5 will try to utilize cached content as much as possible, while "Ctrl+F5" is intended to abandon all cached content and just retrieve all content from the servers again. But today, I noticed that in some of the latest browsers (Chrome, IE8) it doesn't work in this way anymore. Both "F5" and "Ctrl+F5" send the "If-Modified-Since" header. So how is this supposed to work, or (if there is no standard) how do the major browsers differ in how they implement these refresh features?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >