Solved

how to VIEW SOURCE of WEB PAGE DIALOG?

Posted on 2004-08-06
5
1,328 Views
Last Modified: 2009-12-16
We're using Window.ShowModalDialog to open a popup "Web Page Dialog".
We're using IE 6.0

Anyone know a "trick" to VIEW SOURCE of a WebPageDialog?

Thanks
Frederick Volking
0
Comment
Question by:volking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:hyperslug
ID: 11735917
Well, you can View Source the page that calls it, find the URL that's being called through ShowModalDialog, enter that in and then View Source it.  Sort of indirect but the source HTML can't be secure if you're sending it to the client browser.
0
 
LVL 5

Author Comment

by:volking
ID: 11736239
Hyperslug ... your suggestion does not work for us.

Our popup dialog is actually an ASPX page which (among other things) dynamically generates some javascript during server-postback round-trips as well as pass VarArgs[] between the caller page and poped-up pages. It is the returned postback source which we need to see. So we actually need a way to ...

VIEW SOURCE of a WebPageDialog .... following VarArgs[] transfer and post-back ...
0
 
LVL 2

Expert Comment

by:amg42
ID: 11742270
Frederick,

Do you want to see the source for debugging purposes? If so, you can also trace the HTTP traffic. Maybe a little bit less convenient than heaving the source in your editor, but quite powerful nonetheless.

The tools I use for this kind of thing are TCPTrace (http://www.pocketsoap.com/tcptrace/), YATT (http://www.pocketsoap.com/yatt/) and Ethereal (http://www.ethereal.com/). Ethereal is open source, but they are all free tools.

TCPTrace comes in handy if your client and server are running on the same machine. The other two tools capture packets at the network adapter level, so they won't work in that scenario. All of them work fine if you want to trace the traffic between two machines.

Ethereal "understands" HTTP, so its output can be a little easier to analyse, but the tool in itself is a bit more complex than TCPTrace and YATT. If all you need to do is capture HTTP traffic, I'd say that both TCPTrace and YATT are quite appropriate.
0
 
LVL 1

Accepted Solution

by:
DrZedd earned 500 total points
ID: 11752404
stick this javascript function in your page:

<script language=JavaScript>
function ViewSource() {
      window.location = "view-source:" + window.location.href;
      }
</SCRIPT>

then add a button as follows:

<input type=button value=" View Source " onclick="ViewSource()">

this will open a new window with the page source in it.


0
 
LVL 5

Author Comment

by:volking
ID: 14865493
Here's what I finally got to work .....

In the <HEAD> section add this javascript

     <script language="javascript">
     function viewSource()
          {
                 d=window.open();
                 d.document.open('text/plain').write(document.documentElement.outerHTML);
          }
     </script>

Then, anyplace in the <BODY> add this.

     <input type=button value="View Source" onclick="viewSource()">

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question