...

View Full Version : How to have cgi page show in html page codes?



Rocki
12-29-2003, 05:01 AM
How do I get this cgi page of a countdown for the Super Bowl to show in HTML codes for on a compter??

http://siggiez.com/countdownz/nfl/sbt.cgi

In webtv we can use
<embed src="http://siggiez.com/countdownz/nfl/sbt.cgi">
for the page to show in HTML codes, but embed does not work on a computer.

Thank you,
Rocki

:thumbsup:

COBOLdinosaur
12-29-2003, 10:06 PM
Try:

<iframe src="http://siggiez.com/countdownz/nfl/sbt.cgi" width="160" height="175" scrolling="no"></iframe>

Rocki
12-30-2003, 12:32 AM
Yes and thank you but that is what I have on my page of countdowns I made.

http://siggiez.com/countdownz/nfl/index.cgi

That is the only way I can get it to work is with iframe, but there must be another way for it to show in HTML codes. With the iframe and scrolling=no it leaves an edge around the countdown even with sizing it.

Rocki

COBOLdinosaur
12-30-2003, 03:51 PM
You can try populating a layer with XMLHTTP.

You can use this script to bring external include files into a layer in the page, or insert the text inline:

<script type="text/javascript">
<!--
function include(lyr,url)
{
if (document.all)
{
// IE version
var xml = new ActiveXObject("Microsoft.XMLHTTP");
// older versions (IE4 and some IE5.0) might be using MSXML2.XMLHTTP.4.0
xml.Open( "GET", url, false );
xml.Send()
document.getElementById(lyr).innerHTML=xml.responseText;
}
else
{
// Mozilla/Netscrap 6+ version
var xml=new XMLHttpRequest();
xml.open("GET",url,false);
xml.send(null);
document.getElementById(lyr).innerHTML=xml.responseText;
}
}
//-->
</script>
You can trigger the script off the load:
<body onLoad="include('somediv','http://siggiez.com/countdownz/nfl/sbt.cgi')">
where somediv looks like: <div id="somediv">&nbsp;</div>

or inline as a conventional include:

<script type='text/javascript'>
document.write('<div id="somediv">&nbsp;</div>');
include('somediv','http://siggiez.com/countdownz/nfl/sbt.cgi');
</script>

If the string returned from the call contains valid HTML it will be rendered, otherwise it will display as plain text.

Does not work for older browser like Netscrap 4.x that do not know what XML is.

It can produce an alert in IE if the user security settings have activeX disabled



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum