I have a script, its outputs are in HTML. It displays perferctly in a
browser, however when I view source, it gives me the JS scripts, but I want
to view the HTML output. Is there a way I can view or save output? 5 7409
Poster wrote: I have a script, its outputs are in HTML. It displays perferctly in a browser, however when I view source, it gives me the JS scripts, but I want to view the HTML output. Is there a way I can view or save output?
It depends on the browser, if it is IE then you could try with the
following bookmarklet:
javascript : var source = ''; if (document.docum entElement && (source =
document.docume ntElement.outer HTML)) { var sourceWin = window.open('',
'sourceWin'); sourceWin.docum ent.open('text/plain');
sourceWin.docum ent.write(sourc e); sourceWin.docum ent.close(); } void 0
With Mozilla or Netscape 7.1 you can use Ctrl-a and view selection
source or you can use the DOM inspector, both ways you should be able to
see the current document.
--
Martin Honnen http://JavaScript.FAQTs.com/
> Poster wrote: I have a script, its outputs are in HTML. It displays perferctly in a browser, however when I view source, it gives me the JS scripts, but I
want to view the HTML output. Is there a way I can view or save output?
It depends on the browser, if it is IE then you could try with the following bookmarklet: javascript: var source = ''; if (document.docum entElement && (source = document.docume ntElement.outer HTML)) { var sourceWin = window.open('', 'sourceWin'); sourceWin.docum ent.open('text/plain'); sourceWin.docum ent.write(sourc e); sourceWin.docum ent.close(); } void 0
With Mozilla or Netscape 7.1 you can use Ctrl-a and view selection source or you can use the DOM inspector, both ways you should be able to see the current document.
I need to hide the original javascript from visitors and only let them see
the exact HTML ouput from the js file. Here is a sample script:
<form>
<input type=button value="Print Multiplication Table"
onClick="writeM Table()">
</form>
<script language="JavaS cript">
<!--
function writeMTable() {
document.writel n(
'<html><head><t itle>Multiplica tion Table. For printing, choose File |
Print</title></head>'
+'<body> This is HTML output'
)
document.writel n('</body></html>')
document.close( )
}
//-->
writeMTable()
</script>
The final output is
<html><head><ti tle>Multiplicat ion Table. For printing, choose File |
Print</title></head><body> This is HTML output
</body></html>
I want my visitor see exact and only
<html><head><ti tle>Multiplicat ion Table. For printing, choose File |
Print</title></head><body> This is HTML output
</body></html>
And no JS scripts at all.
It is a Dynamic pages, so I can not simply save file as a static page. Is
there a way for Perl to call a JS script to make it output? or Let Lynx
activate JS scripts?
"Poster" wrote I need to hide the original javascript from visitors and only let them see the exact HTML ouput from the js file.
That is not possible. The script must be downloaded before it can run. What
secrets are hidden in the script anyway that nobody is allowed to see?
Here is a sample script:
<form> <input type=button value="Print Multiplication Table" onClick="writeM Table()"> </form>
<script language="JavaS cript">
Drop the language. Instead ' type="text/javascript" ' is required.
<!--
Drop the 'hiding' comment. It serve no purpose, none.
function writeMTable() {
document.writel n( '<html><head><t itle>Multiplica tion Table. For printing, choose File | Print</title></head>' +'<body> This is HTML output' ) document.writel n('</body></html>') document.close( ) } //-->
writeMTable() </script>
The final output is <html><head><ti tle>Multiplicat ion Table. For printing, choose File | Print</title></head><body> This is HTML output </body></html>
I want my visitor see exact and only <html><head><ti tle>Multiplicat ion Table. For printing, choose File | Print</title></head><body> This is HTML output </body></html>
And no JS scripts at all.
Most visitors will not be interested. Neither in the HTML nor in the
javascript.
It is a Dynamic pages, so I can not simply save file as a static page. Is there a way for Perl to call a JS script to make it output? or Let Lynx activate JS scripts?
Client-side Javascript is client-side. There is a server-side version on
some servers. Perl is also server-side. Can't you let Perl do whatever you
think you need javascript for?
HTH
Ivo
"Poster" <ab*@abc.com> wrote in message
news:%I******** *************@t wister01.bloor. is.net.cable.ro gers.com...
<snip> I need to hide the original javascript from visitors and only let them see the exact HTML ouput from the js file. Here is a sample script:
This example could be done server-side using CGI/PHP/ASP/JSP/whatever, thus
hiding your processing from the client. The output would be straight HTML
code which wouldn't reveal any processing code tidbits.
--
Jason, aka The Blue Raja
Poster <ab*@abc.com> wrote:
^^^^^^^^^^^
Does ABC, Inc., New York, know that you are abusing their domain to
falsify your sender address and thus perpetrate a violation of both
Internet/Usenet standards and the Consumer Terms and Conditions of
your service provider, Rogers Communications, Inc., Markham, CA?
<http://www.interhack.n et/pubs/munging-harmful/> Poster wrote:
> I have a script, its outputs are in HTML. It displays perferctly in a > browser, however when I view source, it gives me the JS scripts, but I want
^^^^^^
Please visit <http://insideoe.tomste rdam.com/> to get informed
about the flaws of your software and how they can be circumvented.
[...] I need to hide the original javascript from visitors and only let them see the exact HTML ouput from the js file. [...]
Are you sure you know about the diversity of the Web, its users and
their software?
Here is a sample script:
<form> <input type=button value="Print Multiplication Table" onClick="writeM Table()"> </form>
<script language="JavaS cript">
This should read
<script type="text/javascript">
Ask Google (Groups).
<!--
Remove that, it is obsolete.
function writeMTable() {
document.writel n( '<html><head><t itle>Multiplica tion Table. For printing, choose File | Print</title></head>' +'<body> This is HTML output' ) document.writel n('</body></html>')
When using ETAGO delimiters within CDATA, especially when writing HTML close
tags within "script" elements, ETAGOs (and close tags in general for buggy
clients) must be escaped to prevent premature end of the parent element:
document.write( '<\/body><\/html>');
Besides, the markup you are generating and generating with is both far from
Valid HTML.
<http://validator.w3.or g/>
document.close( ) }
//-->
You can then safely omit this, too.
writeMTable() </script>
[...] It is a Dynamic pages, so I can not simply save file as a static page. Is there a way for Perl to call a JS script to make it output?
For either client-side Perl or server-side JS, maybe.
or Let Lynx activate JS scripts?
No, and there are plenty of users who have UAs with JS support but have the
feature disabled or restricted. You see that generating whole documents
with client-side scripting (whatever language is used) is not a viable
solution on the Web.
PointedEars This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Barry |
last post by:
Hello,
I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it !
My clients want to keep their paid-for code proprietary. How do I
prevent this from occuring ?
The javaScripts are embedded in my HTML in the following manner:
|
by: Martin Dale |
last post by:
Dear all,
Is there any way to activate the Save As command from Javascript. I
would like to have a "Save as" button on a page which has been
dynamically created (client side using document.writeln) so that the
user can save a copy.
I am working towards cross browser compatibility so any help for any
browser would be good.
I know I could put up a bit of text telling the user what the shortcut
|
by: Pete Wason |
last post by:
Hiall!
I have a demo viewer page for javascript stuff that has three buttons "DEMO"
"HTML" and "JSCR", and an IFRAME called 'viewer'.
Initially, the IFRAME gets loaded with the actual demo page, ie.,
viewer.location = dName + '.html';
where dName is the filename of the demo without extension.
|
by: Prakashsir |
last post by:
I have desgined script to show div at runtime. Now I want to copy that
newly created div and/or to save in normal html file so that i can see
later.
1. When I select all the content or view its source, it does not shows
the newly created div.
2. My script is working in IE but not working in Mozilla firefox.
(I want to work in Mozilla, b'cause when we select all the content with
new div and can save with that also.)
3. I want to save...
|
by: KenFehling |
last post by:
Hello. I am wondering if there exists a piece of software that takes
multiple .js files that are nicely indented and commented and create
one big tightly packed .js file. I'm hoping the one file would be less
of a burden for the user's browser to download. I guess the final code
output by this hypothetical program could maybe even just be on one
long line unless that would create problems. Maybe there is some kind
of optimal line...
| |
by: Henok Girma |
last post by:
Hello Gurus,
I want to save the state of an unbound DataGridView on my Windows Form
application to an XML file so i can later load it back..
Basically, on my form I have a DataGridView, it's got some
DataGridViewTextBoxCell, DataGridViewComboBoxCell etc, i want to export all
that to XML..
Any help is greatly appreciated.
|
by: peter |
last post by:
Dear all,
I have an existing query called 'A', but I want it to view in Pivot
Table.
What I do is :
- Double click the query and choose Pivot Table view.
- I make some changes by adding some fields to the pivot table.
- Next, I want to save these setting as a new query. (Because I know
that
multiple templates may be needed to keep track as user has change the
|
by: Angus |
last post by:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.
The snippet of html is:
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
|
by: kj |
last post by:
Hi. Suppose that a JavaScript script running on some browser has
some data in a variable (e.g. a large chunk of text retrieved via
Ajax from a remote server). Is there a way for the script to cause
the browser's Open With/Save As dialog to come up to view this
data?
TIA!
Kynn
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |