[advanced search]
Results from the most recent live auction are here.
14 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 09-07-2003, 04:15 PM   · #1
deadserious
Senior Member
 
Trader Rating: (13)
Join Date: Aug 2002
Posts: 1,300
NP$: 2.85 (Donate)
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
JavaScript: Allow your visitors to View the Source Code of Web Pages from your site

This code allows your visitors to type any url in a text box and will attempt to retrieve the source code. View example: http://www.webdesigntalk.net/tools/viewsource.html

Add this to the head section of your page:
Code:
<script language="JavaScript" type="text/javascript"> <!-- Code by deadserious - http://www.webdesigntalk.net --> function http(){ if (document.getsource.view.defaultvalue != document.getsource.view.value) {document.getsource.view.value = "View Source"} if (document.getsource.url.defaultvalue != document.getsource.url.value) {document.getsource.url.value = "http://"} } function viewSource(){ document.getsource.view.value="One Moment Please"; var geturl = document.getsource.url.value; { var SourceUrl = "view-source:" + geturl ; location.href = SourceUrl; } } </script>

Add this to the body section of your page:
Code:
<form name="getsource" action=""> <b>URL:</b> <input type="text" name="url" onfocus="http()" value="http://" /> <input type="button" name="view" value="View Source" onclick="viewSource()" /> </form>


Please register or log-in into NamePros to hide ads
deadserious is offline   Reply With Quote
Old 09-07-2003, 04:22 PM   · #2
Alpha
NamePros Regular
 
Name: Todd
Location: California
Trader Rating: (0)
Join Date: Jun 2003
Posts: 249
NP$: 401.00 (Donate)
Alpha is an unknown quantity at this point
Whoa that's cool! Thanks for posting it deadserious!
__________________
--Alpha
Alpha is offline   Reply With Quote
Old 12-19-2003, 02:40 AM   · #3
Daniel Smith
New Member
 
Trader Rating: (0)
Join Date: Dec 2003
Posts: 10
NP$: 16.00 (Donate)
Daniel Smith is an unknown quantity at this point
Nice script.

but who is gonna use it?
__________________
-------------------

My website: www.DansKrib.co.uk
Daniel Smith is offline   Reply With Quote
Old 12-19-2003, 03:17 AM   · #4
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
I used it on my new website. Except I modified it to:

<A HREF="javascript:window.location.replace('view-source:' + window.location + '');">view my source</A>

Very usefull.
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-29-2003, 07:46 PM   · #5
Crusader
Alert Status Red
 
Crusader's Avatar
 
Name: Anton
Location: Canada
Trader Rating: (24)
Join Date: Aug 2003
Posts: 1,284
NP$: 1252.00 (Donate)
Crusader is just really niceCrusader is just really niceCrusader is just really niceCrusader is just really nice
Quote:
Originally posted by Daniel Smith
Nice script.

but who is gonna use it?



people who are trying to see the source but are being barraged by right click protection popups?
__________________

Near Fantastica
| Matthew Good - Hospital Music
>> Do you Frawlik? <<
Crusader is offline   Reply With Quote
Old 12-29-2003, 10:11 PM   · #6
CreativeLogic
NamePros Regular
 
CreativeLogic's Avatar
 
Name: Ryan Amos
Trader Rating: (15)
Join Date: Sep 2003
Posts: 893
NP$: 18.00 (Donate)
CreativeLogic has a spectacular aura aboutCreativeLogic has a spectacular aura about
I could def. use that. I didn't know that was possible!

Thanks!
__________________
Online Time Tracking
CreativeLogic is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


Site Sponsors
YUPPADS Traffic Down Under YUPPADS
Advertise your business at NamePros
All times are GMT -7. The time now is 05:03 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0