Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Content

  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <form name=frmSource>
    <textarea name=txtSource>test</textarea>
    <input type=button onClick='document.frmSource.txtSource.value = "view-source:" + window.location.href'>
    </form>

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks but that did not show the content in the view source. It only showed the URL.

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •