Click to See Complete Forum and Search --> : is there a way to disable the view->source?


pelegk1
12-21-2003, 04:42 AM
i want to disable the
view->surce that inthe browser toolbar
is it possible?how?
thanks in advance
peleg

fredmv
12-21-2003, 04:43 AM
Sorry, impossible.

pelegk1
12-21-2003, 05:45 AM
but beacuse they have disabled the right click and the view source i couldnt see how

Paul Jr
12-21-2003, 12:20 PM
I would like to have some linkage to this site that disabled View>Source.

jrbp
12-21-2003, 05:38 PM
You can disable right clicking but people will still be able to access the source

AdamBrill
12-21-2003, 07:20 PM
You cannot disable the right-click menu. All you have to do is turn off JS and the right-click menu is back.

Also, I am yet to hear of one valid reason to hide your source(unless it's because your source is so bad that you don't want anyone to see it).

pelegk1
12-22-2003, 12:20 AM
111

AdamBrill
12-22-2003, 08:21 AM
Originally posted by pelegk1
AdamBrill yes u can!Your wrong, and if you care to have me prove you wrong, post me a link to where it is "disabled" and I will get the right click menu to come up.

aoeguy
12-22-2003, 11:30 AM
Well you can open a popup with right-clikc disabled and no toolbar and you cant see the URL in the link, but you cant disable the menu :P
I would like to see it too

Paul Jr
12-22-2003, 03:36 PM
http://www.codingforums.com/showthread.php?s=&threadid=30475
Look at the fifth post down; the one right below mine. If you're still not satisfied, I really don't know what to tell ya.

pelegk1
12-23-2003, 12:50 AM
i remeber i saw something like that
but i think maybe it was with an installed software
that maybe has made changes in the regidtry whch blocked the view source

seec77
01-04-2004, 05:55 AM
GOD! YOU GUYS HAVE ALL GOT IT WRONG!
the thing is... there will never be a way to prevent the normal (not a beginner) user from not seeing your source!
the thing is, the browser has to get the javascript code, as it's not like php or asp which are server-side, meaning the server interprets them! javascript is client-side, which means the client (the user's browser) has to interpret the code! which means he has to get the code! so even with a simple packet sniffer you can find the code easily, so stop trying!
i mean, personally, i learned javascript mostly by looking at other sites' codes! i first learned a little of window.alerts, then got a book about javascript eventually, and that's how i know javascript! so please stop trying to hide your code!

p.s.
peleg, gam ani israeli! :D
yalla bai, tehene!

pelegk1
01-04-2004, 06:45 AM
but it hs an error on windows2000+IE6
but i know it worked for some pepole L

menuItems = new Array();
menuItemNum = 0;

function addMenuItem(text, url, img){
if(img) menuItems[menuItemNum] = new Array(text, url, img);
else if(text) menuItems[menuItemNum] = new Array(text, url);
else menuItems[menuItemNum] = new Array();
menuItemNum++;
}

menuWidth = 1; //menu width
menuHeight = 1; //menu height
menuDelay = 50; //delay before menu appears
menuSpeed = 8; //speed which menu appears (lower=faster)
menuOffset = 2; //offset of menu from mouse pointer


addMenuItem("","","");
addMenuItem("","","");
addMenuItem();
addMenuItem("","","");

//--------------------------------------------------------------------------------------------

if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + >= 5.5)
isIe = 1;
else
isIe = 0;

if(isIe){
menuContent = '<tr height="1"><td style="background:threedlightshadow" colspan="4"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight" colspan="2"></td><td style="background:threeddarkshadow"></td></tr><tr height="10"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"><table cellspacing="0" cellpadding="0" nowrap style="font:menu;color:menutext;cursor:hand;">';
for(m=0;m<menuItems.length;m++){
if(menuItems[m][0] && menuItems[m][2])
menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap><img src="' + menuItems[m][2] + '"></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
else if(menuItems[m][0])
menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
else
menuContent += '<tr><td colspan="5" height="4"></td></tr><tr><td colspan="5"><table cellspacing="0"><tr><td width="2" height="1"></td><td width="0" height="1" style="background:threedshadow"></td><td width="2" height="1"></td></tr><tr><td width="2" height="1"></td><td width="100%" height="1" style="background:threedhighlight"></td><td width="2" height="1"></td></tr></table></td></tr><tr><td colspan="5" height="3"></td></tr>';
}
menuContent += '</table></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedshadow" colspan="3"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threeddarkshadow" colspan="5"></td></tr></table>';

menuPopup = window.createPopup();
menuPopup.document.body.innerHTML = menuContent;
}

function showMenu(){
menuXPos = event.clientX + menuOffset;
menuYPos = event.clientY + menuOffset;

menuXIncrement = menuWidth / menuSpeed;
menuYIncrement = menuHeight / menuSpeed;

menuTimer = setTimeout("openMenu(0,0)", menuDelay);

return false;
}

function openMenu(height, width){
iHeight = height;
iWidth = width;

menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body);

if(iHeight < menuHeight)
menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1);
else
clearTimeout(menuTimer);
}

if(isIe) document.oncontextmenu = showMenu;


//---------------------------------------------------------

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}


seec77 ma email shelcha?