Forum Moderators: open

Message Too Old, No Replies

Executing javascript code as a GIF file?

Execute javascript code as a GIF file

         

sumitshah4u

9:16 am on May 4, 2004 (gmt 0)

10+ Year Member



Hi,

I saw this interesting link at [hiermenuscentral.com...] . It is a DHTML drop down menu ( horizontal as well as vertical ). When it see the code through "view source" and try to find where the dhtml javascript code is coming from , i am come across 2 lines :

<p><img name="hm_i_main1" id="hm_i_main1" src="/art/t.gif" width="1" height="23" alt="Menu Placer #1" /></p>

<p><img id="hm_i_main2" name="hm_i_main2" src="/art/t.gif" width="160" height="150" alt="Menu Placer #2" align="left" />

I think this is SMART. The gif files above are getting the javsscript code from some where and executing the drop down menus. Thus, they are securing the client side code. This can be a major resource for coders who want to hide their code.

Can any body explain the phenomeneon?

Rgds,

Sumit.

Bernard Marx

9:47 am on May 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think they're just images.

There is a <script> tag right at the bottom of the page code.
This script writes more to the document, including further <script> tags.

If you want to know what the 'actual' source code of the page is when it's up & running, paste this into your browser's address bar (IE only):

-- all one line --

javascript:z1=document.documentElement;z2=window.open("","","width=400,height=400,scrollbars=1,resizable=1;");z2.document.open("text/plain");z2.document.write(z1.outerHTML);void(0);