Solved

how to VIEW SOURCE of WEB PAGE DIALOG?

Posted on 2004-08-06
5
1,316 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Form submit issue 11 80
Link Shorteners?  Which one is the best? 10 102
SQL Injected data? 8 110
how to get responsive video to always be centered 15 62
Read about why website design really matters in today's demanding market.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now