PDA

View Full Version : "view-source:" link problem


OutBend
10-11-2004, 04:00 PM
links like this
view-source:www.brog.hu
doesnt work in XP SP2 -s MSIE...
(source is shown if right click-show page source)

before SP2 it worked in MSIE and it still works in FireFox

Please tell me how could I fix this problem...
(I need to work with MSIE and not with FireFox)

jbot
10-11-2004, 04:14 PM
links like this
view-source:www.brog.hu
doesnt work in XP SP2 -s MSIE


is it for the site's own domain. if not, then i doubt you'd be allowed. it's prolly been put in for security and therefore there's nothing you can do. "view-source" is an internal browser protocol and not part of JS, so you can't use JS to get round it.

if you are trying to view your site's own source, this should still work:

<a href="" onclick="this.href='view-source:'+location.href';">view source</a>

:D

OutBend
10-12-2004, 04:11 PM
:D
Not that was my problem :)

view-source: protocol doesn't work in my WIN XP SP2's Microsoft Internet explorer...
I have notepad.exe and everything in the registry is OK...
(I can view the source manually)

ArcticFox
10-12-2004, 09:19 PM
view-source:www.brog.hu



view-source:http://www.brog.hu/




On my site I've this JS code for view-source:


<head>

<script>
function viewthesource(){
window.location="view-source:"+window.location}
</script>

</head>

<body>

[<a href="javascript:viewthesource();">&nbsp;source&nbsp;</a>]

</body>