script tag hack

M

midito

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
 
J

Jonas Raoni


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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top