Search Results

Search found 39082 results on 1564 pages for 'magic function'.

Page 97/1564 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • Function this parameter on onclick

    - by Jerome
    I've some html code generated in javascript like this cell.innerHTML = '<a href="#" class="sortheader" id="sortheader_'+i+'" '+ 'onclick="ts_resortTable(this, '+i+');return false;">' + txt+'<span class="sortarrow"></span></a>'; I'd like to call the function ts_resortTable() but independently of the onclick event how can i generate the "this" parameter of the function? I tried the DOM selector : $('sortheader_'+i) in jQuery and the getElementById('#sortheader_'+i) as well but it's not working

    Read the article

  • break up recursive function in php

    - by Mike
    What is the best way to break up a recursive function that is using a ton of resources For example: function do_a_lot(){ //a lot of code and processing is done here //it takes a lot of execution time if($true){ //if true we have to do all of that processing again do_a_lot(); } } Is there anyway to make the server only have to take the brunt of the first execution and then break up the recursion into separate processes? Or am I dreaming?

    Read the article

  • jQuery: what if I don't have mouseleave function ?

    - by Patrick
    hi, I'm using Drupal for a website and I can only use jQuery 1.2.7 (not the most recent versions). I want to fade in / fade out a div element and I'm using mouseover / mouseout functions. However, this element contains some children and when I move the mouse over it, the mouseout function is triggered, because I'm moving over one of its children. Since I don't have mouseleave function, how can I solve this issue ? thanks

    Read the article

  • What's the benefit of function refrence?

    - by SpawnCxy
    When I reading the code of CodeIgniter,I found some functions written as follows: function &get_instance() { global $CI, $OBJ; if (is_object($CI)) { return $CI; } return $OBJ->load; } I can understand variable refrence,but I can hardly get this through.Is it necessary to use this function style?And any benefit? Thanks.

    Read the article

  • Javscript passing and using that function

    - by Totty
    I have: var f1 = function(a){ alert(a) } var f2 = function(data, method){ method(data) // the problem is here, // the method f1 is not called. Is there a way to call that method f1? // the method f1 might not be in this scope, the method f1 can // be in a class or like this... } f2(a, f1) The question is: Is there a way to call that f1 from f2, from the passed method? thanks

    Read the article

  • Function callers in C?

    - by thyrgle
    So I was wondering how they work. To explain what I mean by a "function caller" a good example of what I mean would be glutTimerFunc, it is able to take in a function as a parameter and call it even with it not knowing it is declared. How is it doing this?

    Read the article

  • C++ function dynamic data type definition

    - by user330352
    Hi all, in C++, when you define a function which takes one argument, you have to define the data type of that variable: void makeProccess(int request) However, I want to implement a function which takes different data types rather taking statically defined integer type. void makeProccess(anyType request) How can I design a proccess like this, any idea? Thanks.

    Read the article

  • How to pass Button.Click into a function?

    - by Achilles
    I have a function that adds eventhandlers to control events. Right now I have several overloads that add events to different types of controls: Public Sub AddEventHandler(Button, ButtonEvent) 'adds event handling for Button.Click public Sub AddEventHandler(LinkButton, ButtonEvent)'adds event handling for LinkButton.Click The problem is I want to write a function that is more robust like: Public sub AddEventHandler(Control, EventToHandle, ControlEvent) where EventToHandle is the parameter representing Button.Click or whatever event that Button has associated with it. Any suggestions guys? Thanks!

    Read the article

  • MooTools is not a function js error

    - by Adriane
    hello whatever i append to $('click_filter1') it shows the error ... is not a function (for show(), hide(), toggle()) if i insert an alert, the alert gets executed, so the framework is init ok the element with the id exists for sure what can be the problem of this? why iam getting this error? $('click_filter1').addEvent('click', function() { $('click_filter1').show(); }.bind(this));

    Read the article

  • Are Objective-C function names stored in text?

    - by thyrgle
    I don't remember where I heard about it, (I think I was searching up on how selectors worked and it ended up not being exactly the same as a callback function) and I can't confirm it. But more importantly than that, is there a way I could get a list of the function names from another application?

    Read the article

  • Finding the Source Line of a function call

    - by Robert
    I've built a custom logging utility which displays a Log Message and the DateTime. I would like to add the line number in the source code which called the function. Is there a way to determine which line of the HTML source a particular javascript function was fired?

    Read the article

  • why does twitter use the !function syntax in their embed code

    - by samccone
    I was looking at twitters embed code and saw that they are using !function ... while i know that this evaluates to false I was wondering what the point of it was. thoughts? !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");

    Read the article

  • Javascript function to add X months to a date

    - by George
    Is there a built in equivalent to the .NET framework's DateAdd or AddMonths functions? I'm looking for the easiest, cleanest way to add X month to a Javascript date. I'd rather not handle the rolloing over of the year as done here. or have to write my own function as done here. Is there something built in that is as nice as the .NET Date.AddMonths function? Or something close?

    Read the article

  • WP Function to retrieve database connection

    - by HollerTrain
    Is there a function or command that pulls the db connection info from the WP blog? I am writing a Plugin which would have to connect to the db to retrieve the info, wondering if there was one single command/function i could call which could connect. this would make the plugin portable and would work on any WP blog. is this possible?

    Read the article

  • how can a __global__ function RETURN a value or BREAK out like C/C++ does

    - by user1684726
    Recently i've been doing string comparing jobs on CUDA, and i wonder how can a global function return a value when it finds the exact string that i'm looking for. I mean, i need the global function which contains a great amout of threads to find a certain string among a big big string-pool simultaneously, and i hope that once the exact string is caught, the global funtion can stop all the threads and return back to the main funtion, and tells me "he did it"! B.T.W., I'm using CUDA C .How could i possibly achieve that, waiting for help.

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >