![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need to remove some items from a Javascript drop down menu coded by someone else. <snip> the code has no line breaks and the part of it that writes the menu's html is full of squares, making it very difficult to wade into and take out the parts I need to remove. For example, I can't tell where one menu item stops and another one starts. However, it still seems to work on the web site, despite all these funky characters. $Technology%0px;(154px;)127;+ 24;>;14;normal;normal3F3F3F-. EFEFEF#36_ _/contact/contact_partners.aspself9px;(5px;)105px;+14 -4;% 0px$Contact! It's much much longer than that, but you get the idea. What's up? |
#3
| |||
| |||
|
|
"Byron" said snip $Technology%0px;(154px;)127;+ 24;>;14;normal;normal3F3F3F-. EFEFEF#36_ _/contact/contact_partners.aspself9px;(5px;)105px;+14 -4;% 0px$Contact! It's much much longer than that, but you get the idea. What's up? The original author was probably working on a different platform than you are. His or her linebreaks and who knows what other characters render as those funky squares when viewed on your system. IIRC this happens when translating from Linux to Windows. See if you can find out the name of the menuwriting function, then load a page which uses it into your browser, and type in the addressbar: javascript: document.open( 'text/plain' ); document.write( functionname ); That should give the complete code, correctly encoded for your system. hth - if not, can you post the url to the .js file here? ivo http://4umi.com/web/javascript/ |
#4
| |||
| |||
|
|
Thanks ivo. That partially helped, but there's so much within the .js file that I need to reformat, that the command you gave me only helped with a fraction of it. It looks like its divided into many functions and subfunctions. Anyway to run a command like that on an entire js file? |
#5
| |||
| |||
|
|
[...] Anyway to run a command like that on an entire js file? |
![]() |
| Thread Tools | |
| Display Modes | |
| |