Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and HTML Layout Problem

Status
Not open for further replies.

vwani

Programmer
May 26, 2004
10
US
Hi Friends,

I have a problem and I need your help to solve it.It hoes this way.
I have a navigation menu on the left side of my webpage. I need one of these buttons to link me to a page which contains a caption.Below this caption I want a frame which should display a page from some third party site.
Eg.

Navigation Menu

Home
About Myself
Family

Each of these items link me to a page. Now I want to link About Myself to a page which contains description about me.Below that description I want to display the main page of another site.
I have tried to achieve this using Frames.I have a page called frameset which contains two frames.One frame aboutme.asp and other pageDesc.asp as follows

Frameset.asp File contains
<html>
<frameset>
<frame src="aboutme.asp">
<frame src="pageDesc.asp">
</frameset>
</html>

aboutme.asp
<!--#include file="../_include/header.asp"-->
<img src="/images/top.gif" border="0"><br><br>
<table>
<tr>
<td valign="center">
<p>Hello World<br>
</tr>
</td>
</table>
<!--#include file="../_include/footer.asp"-->

pageDesc.asp
<table>
<tr><td align="center">
<%Response.Redirect("</td></tr>
</table>

I can see the contents of aboutme,asp but I cannot view the page below the description.Where I am going wrong?Please help

Thank You
 
Hi vwani,

I think the XMLHTTP object may be able to solve your problem:

Code:
  Response.Buffer = True
  Dim objXMLHTTP, xml

  ' Create an xmlhttp object:
  Set xml = Server.CreateObject("Microsoft.XMLHTTP")
  ' Or, for version 3.0 of XMLHTTP, use:
  ' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

  ' Opens the connection to the remote server.
  xml.Open "GET", "[URL unfurl="true"]http://www.4Guysfromrolla.com/",[/URL] False
	
  ' Actually Sends the request and returns the data:
  xml.Send

  'Display the HTML both as HTML and as text
  Response.Write "<h1>The HTML text</h1><xmp>"
  Response.Write xml.responseText
  Response.Write "</xmp><p><hr><p><h1>The HTML Output</h1>"

  Response.Write xml.responseText
 
  
  Set xml = Nothing

I pulled this code from the 4guysfromrolla website.
it demonstrates how to use XMLHTTP to get the contents of a page and display it where you want it. You could put the content into a frame or an iframe... or whatever.

You can even grab dynamic pages to insert into your page.

I hope it helps.

Travis Hawkins
BeachBum Software
travis@cfm2asp.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top