× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott et al.

Here's the stuff I got from my colleague - pretty simple, seems to me!! Basically the menu anchor files contain simple HTML. That HTML gets put into the <div id="target-div">.

Oh - and this also loads one of the content HTMLs when first opened. It's about all I'm going to need for a community band website that I'm "master" of now.

Notice the use of jQuery.


index.html --

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title>Sample jQuery remote HTML injection</title>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
/* <![CDATA[ */
$(document).ready(function(){
$.ajax({
url: "1.html",
cache: false,
success: function(html){
$("#target-div").html(html); }
});
$("#links a").click(function(){
$.ajax({
url: $(this).attr("href"),
cache: false,
success: function(html){
$("#target-div").html(html); }
});
return false;
});
});
/* ]]> */
</script>
</head>
<body>
<strong>Links:</strong>
<ul id="links">
<li><a href="1.html">Page 1</a></li>
<li><a href="2.html">Page 2</a></li>
<li><a href="3.html">Page 3</a></li>
</ul>
<div id="target-div">Target</div>
</body>
</html>

1.html --

<strong>This is page 1</strong>
The others are the same, except for page number.

I have a feeling this is old stuff for many of y'all here - new enough for me, however.

HTH
Vern

Scott wrote:
With PHP you can include urls
http://www.php.net/manual/en/function.include.php
So maybe you could include the iSeries pages as widgets from ASP.
I can't test this but it looks like what you might be looking for

from http://www.teamcia.com/xmlhttp.asp
1. Create an ASP page
2. Use the object XMLHTTP
3. Add this ASP code where you want the other page to appear.

<%
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", "http://www.yahoo.com";, False
objXMLHTTP.Send
strPageText = objXMLHTTP.responseText
Response.Write(strPageText)
Set objXMLHTTP = Nothing
%>


Scott

Vern Hamberg wrote:
Mike

I'm learning, so the experts here can blow this out of the water - can you have a <div> whose contents are replaced using AJAX techniques? Oh, and it uses JQuery. Another developer here gave me a very simple template for doing that from a menu - header and menu and footer are unchanged, only the content <div> gets changed. Very cool, minimal ASP code. Each anchor in the menu points to some link that return only text and markup - stuff that'd be found inside <body> section. 'Cuz the rest of the page is already there.

HTH
Vern

Mike Cunningham wrote:
We do all of our static web pages for our public site on IIS and use Dreamweaver to create them. We do all of our dynamic web sites from the iSeries. Our public site group would now like us to generate simple single pages (a list of employees for a department) and also multi-page apps (like a shopping cart app with multiple steps) imbedded inside their pages. So they control the header/footer and left navigation using Dreamweaver running on IIS and we produce the code for the content part of the page. We want to stay with writing java apps that run under Websphere on the iSeries and not need to also start developing asp code for IIS. I have never used them but I think iFrames would do what we want but no one wants to even talk about using iFrames at this point. We almost are wanting to build something that acts like a portal and the iSeries apps would just be portlets/webparts. Has anyone done anything like this?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.