Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   script tag hack (http://www.velocityreviews.com/forums/t923406-script-tag-hack.html)

midito@gmail.com 03-07-2006 02:04 PM

script tag hack
 
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


Jonas Raoni 03-07-2006 08:11 PM

Re: script tag hack
 
midito@gmail.com 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


All times are GMT. The time now is 10:31 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57