Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 24th, 2005, 10:56 PM
Authorized User
Join Date: Aug 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default hiding javascript code using ASP

I currently have and HTML page that has the following code in the body section:

<script src='http://app.infofeed.com/tools/jsVarsInfo.go?symbol=p939ikkk3></script>

Here is the code that follows in the body and retrieves the info from the applet:


I would like to use some ASP code that would process this on the server and then keep the code hidden in the resulting page.

Old March 30th, 2005, 10:40 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts

Script is meant to work on the client, and will be exposed to the client. Make the code server-side if you don't want people to see it, but that code would only be on the server. That's the problem with client-side code.

Old March 30th, 2005, 10:58 AM
Friend of Wrox
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts

maybe you can put the source codes that you want to hide in a ASP file, then using:

to include the file in your page, if there are some variable calculated in the ASP file you want to display, you can use:
  name = "<%=UserName%>"
  document.write name
to get the server-side value to be display in client side.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access ASP code inside Javascript deean JSP Basics 1 June 20th, 2008 02:00 PM
Hiding VBA Code Paula222 Access VBA 3 February 11th, 2006 06:14 AM
In ASP,Client side javaScript code casimir Classic ASP XML 0 October 24th, 2005 12:24 AM
Javascript question in my ASP code savoym Classic ASP Basics 3 May 24th, 2004 06:05 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.