Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-25-2002, 07:07 PM   PM User | #1
Hawk
New Coder

 
Join Date: Jul 2002
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Hawk is an unknown quantity at this point
Content

This will show the source code of the current page.

<INPUT TYPE="BUTTON" VALUE="View Source" onClick='window.location = "view-source:" + window.location.href'>

How can I put that between a <textarea> tag?

Thanks
Hawk is offline   Reply With Quote
Old 07-25-2002, 09:07 PM   PM User | #2
allida77
Regular Coder

 
Join Date: Jun 2002
Location: Cincinnati, OH
Posts: 545
Thanks: 0
Thanked 0 Times in 0 Posts
allida77 is an unknown quantity at this point
Code:
<form name=frmSource>
<textarea name=txtSource>test</textarea>
<input type=button onClick='document.frmSource.txtSource.value = "view-source:" + window.location.href'>
</form>
allida77 is offline   Reply With Quote
Old 07-25-2002, 10:02 PM   PM User | #3
Hawk
New Coder

 
Join Date: Jul 2002
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Hawk is an unknown quantity at this point
thanks but that did not show the content in the view source. It only showed the URL.
Hawk is offline   Reply With Quote
Old 07-25-2002, 10:22 PM   PM User | #4
Hawk
New Coder

 
Join Date: Jul 2002
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Hawk is an unknown quantity at this point
In case if someone needs this. This is still not 100% what I am looking for.

In case if someone needs this. This is still not 100% what I am looking for.

Code:
<html id=ht>
	<head>
	</head>
	<body>
		<form name=frmSource>
			<textarea name=txtSource cols=50 rows=10></textarea>
			<input type=button onClick="document.frmSource.txtSource.value = document.all.ht.innerHTML">
		</form>
	</body>
</html>

Last edited by Hawk; 07-25-2002 at 10:49 PM..
Hawk is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:58 PM.


Advertisement
Log in to turn off these ads.