script tag hack

Discussion in 'Javascript' started by midito@gmail.com, Mar 7, 2006.

  1. Guest

    CODE at: http://pastebin.com/588862

    Hello,

    I'm new in this newsgroup and i hope you can help me.

    I have an external function that changes depending of some information,
    i'm developing an ajax app and i want to overwrite this function
    depending of the user actions.

    I'm making some tests with the next results:

    function nuevafuncion(): works in IE but for firefox the object is
    undefined.

    function nuevafuncion2(): if i don't regenerate the link (as in
    nuevafuncion() ), IE nor FIREFOX doesn't recognize the new function

    function nuevafuncion3(): using DOM standard, now works in FIREFOX
    correctly but not in IE, there are some ways commented and all with the
    same results.

    Is there any solution to overwrite the function and works in IE and
    FIREFOX?

    Thanks
     
    , Mar 7, 2006
    #1
    1. Advertising

  2. Jonas Raoni Guest

    wrote:
    > CODE at: http://pastebin.com/588862


    Your example is looking strange, I just read some pieces and you should
    have written it in English :]

    > I have an external function that changes depending of some information,
    > i'm developing an ajax app and i want to overwrite this function
    > depending of the user actions.


    This is what I understand by overloading a function:
    <URL:http://jsfromhell.com/classes/overloader>, but it seems that you
    want to overwrite (or create new functions???), not overload at all.

    Anyway, try to not use this technique of setting innerHTML/adding a
    script node, if you need to parse code in a string, use the eval.

    I didn't looked well, but it seems that you don't need to use eval.


    --
    Jonas Raoni Soares Silva
    http://www.jsfromhell.com
     
    Jonas Raoni, Mar 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ing. Rajesh Kumar
    Replies:
    2
    Views:
    9,526
    Kevin Spencer
    Jul 7, 2004
  2. shruds
    Replies:
    1
    Views:
    931
    John C. Bollinger
    Jan 27, 2006
  3. steve

    hack script and forms

    steve, Dec 3, 2003, in forum: Javascript
    Replies:
    8
    Views:
    129
  4. Butch
    Replies:
    5
    Views:
    203
    Trent Curry
    Feb 18, 2004
  5. kal

    script functions in <script> tag

    kal, Aug 6, 2007, in forum: Javascript
    Replies:
    3
    Views:
    89
Loading...

Share This Page