...

View Full Version : How do I display the source for a web page?



weloki
01-21-2004, 09:56 PM
I need to know how I can automatically display the source of webpages - I mean I want to be able to see the source code of a webpage within a text file separate from the web browser, without having to select in a drop down menu the "view source" option. I need it to happen just when I click on a link and the page opens. Any ideas?

Nightfire
01-21-2004, 10:27 PM
Can either use my view source script (look in my sig), or there are various other scripts posted in these forums that do that in the javascript forum I think I remember seeing some

weloki
01-22-2004, 03:11 AM
Thanks, Nightfire, for your reply. I did search through quite a few threads and found some people talking about this, but I did not find the right solution for my project. Please, what do you mean by "sig", as in "look in my sig" ( for your script )? Forgive my ignorance.

Paul Jr
01-22-2004, 04:52 AM
Download Mozilla Firebird (http://www.mozilla.org/products/firebird) and then download the Web Developer Toolbar (http://chrispederick.myacen.com/work/firebird/webdeveloper/). ;)
If I understand you correctly, all you gotta do now is hit one button, and you have the source code in a tab loading in the background. :thumbsup:

me'
01-22-2004, 06:08 PM
Originally posted by weloki
Thanks, Nightfire, for your reply. I did search through quite a few threads and found some people talking about this, but I did not find the right solution for my project. Please, what do you mean by "sig", as in "look in my sig" ( for your script )? Forgive my ignorance. 'sig' is short for 'signiture', which is the thing that appears at the bottom of every message you write.

Anyway, here's the page he was talking about: http://www.blinded.org.uk/tools/viewsource.php

weloki
01-22-2004, 10:23 PM
Thanks, Paul Jr, and me',
these responses will surely help. If i have any further troubles i know were to ask for help. Appreciatively,
weloki:)

ArcticFox
01-25-2004, 03:43 AM
<head>

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

</head><body>

<a href="javascript&#58;viewthesource();">View-Source</a>

Works in IE, Moz, NS and maybe Opera (can't remember).

:thumbsup:

*edited*

weloki
01-26-2004, 04:25 AM
ArcticFox,
Ahhh....yes, thats the stuff. I appreciate your help. If I have any other trouble I will know were to come.
jeff W.

ArcticFox
01-26-2004, 04:26 AM
Excellent!

Welcome aboard. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum