[CLOSED] How to get custom config parameters into JS function?

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
  2. #12
    Well, I mean that the onClick function is executed just after page loading without clicking the Button.
  3. #13
    Quote Originally Posted by Daniil View Post
    Well, I mean that the onClick function is executed just after page loading without clicking the Button.
    It is curious. Mine ils not
  4. #14
    What a browser are you testing with? I am with FireFox.
  5. #15
    Chrome i use.
  6. #16
    I see the same effect in Chrome.

    Please clarify do you use exactly my example to test or something else?
  7. #17
    I didn't try jour example y et, I talk about my own code. But' I didn't get the point y ou want to show in your example, and what ils relations hip to thread problem.
  8. #18
    Please clarify how do you check the function is triggered or not in your sample?

    But' I didn't get the point y ou want to show in your example,
    Running the example should clarify that.

    and what ils relations hip to thread problem.
    Well, you wrote:
    Quote Originally Posted by feanor91 View Post
    Yes it works, even with more parameters

    but wrote like that:

    Show Fn="showChartBacklog('wndChart')"
    But I doubt it functions well.
  9. #19
    I simply add a breakpoint into function and it didn't stop when page is loaded. And it is better that way, I have hundre more javascript functions that do a lot of thing, called code behind function, and other stuff, and it will be a real mess if all those functions was called at page load no?

    And apparentely, the called I made seems to work flawlessly.

    But I doubt it functions well.
    Could you explain why? What tech is at works on this call and replacing Fn by Handler?
  10. #20
    Quote Originally Posted by feanor91 View Post
    I simply add a breakpoint into function and it didn't stop when page is loaded.
    Could you try with it?
    alert('test');
    Quote Originally Posted by feanor91 View Post
    But I doubt it functions well.
    Could you explain why? What tech is at works on this call and replacing Fn by Handler?
    Well, because it triggers on page loading in my example. And, moreover, Fn is just not designed to get parameters this way. As I stated here:

    Quote Originally Posted by Daniil View Post
    Generally, Fn expects a function name Fn="onClick" or a full definition
    Fn="function () { alert('Hello!'); }"
    If you need just some JavaScript code, then you should use Handler instead of Fn.
    <Click Handler="onClick('test');" />
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 2
    Last Post: Jan 09, 2012, 7:18 AM
  2. Replies: 1
    Last Post: Sep 28, 2011, 3:50 AM
  3. Replies: 4
    Last Post: May 31, 2011, 11:54 AM
  4. [CLOSED] Custom config for Coolite controls
    By thaianhduc in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 10, 2010, 7:11 AM
  5. Custom function in User Controls
    By pearl in forum 1.x Help
    Replies: 2
    Last Post: Apr 08, 2009, 12:56 AM

Posting Permissions