PDA

View Full Version : Dynamic inline content



netip
09-22-2005, 03:17 PM
I'm trying to accomplish something, but don't even know if it is possible.

I need to place the following code on my site:

<form action="http://lookup.computerlanguage.com/host_app/search" method="post">
<b>Enter a Computer Term</b><br>
<input type="text" name="term" size=17 value=""><br>
<input name="cid" type="hidden" value="xxxxxxx">
<input type="submit" value="Look Up" border=0>
</form>

The user enters a search term and it opens the computerlanguage.com site. Unfortunately, that site does not have my "look and feel". Not to mention, that takes them off my site.

I could create a "look and feel" template at their site, but that would be a pain to maintain. The template would contain this reference:
<!-- ENCYCLOPEDIA RESULTS -->

What I would like to have happen is for the computerlanguage search page to open in an inline window much like the "drop-down document viewer" found at
http://www.dynamicdrive.com/dynamicindex3/dropdownview.htm

Is that possible?

Many Thanx for any help...

jscheuer1
09-22-2005, 04:04 PM
That is doable, as far as coding it goes. There are at least two reasons that it may not work in this particular case:

1 ) Your host. If your site is hosted by Geocities or one of the other many free or inexpensive hosts available these days that choose not to allow, or even just a host who doesn't allow, for whatever reason, external content to appear through frames and iframes on pages that they host, it will not work.

2) Computer Language Dot Com. If their pages are designed to 'break out of frames', as are many sites that offer content that other sites may feel tempted to frame in the method (and any other) that you are proposing, it will not work.

Let's first see if we can establish that neither of the above, or any other unforseen thing is a problem before proceeding to detailed code modification. Upload this page to your host and see what happens when you try to use the form:

<html>
<head>
<title>External Site Iframe Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<form action="http://lookup.computerlanguage.com/host_app/search" method="post" target="extern">
<b>Enter a Computer Term</b><br>
<input type="text" name="term" size=17 value=""><br>
<input name="cid" type="hidden" value="xxxxxxx">
<input type="submit" value="Look Up" border=0>
</form>
<iframe name="extern" src="blank.htm" width="500" height="450" scrolling="auto" frameborder="1"></iframe>
</body>
</html>Make sure to enter your customer's license (cid value?) first.

netip
09-22-2005, 04:20 PM
That works almost perfectly as you can see at http://www.netip.com/encyclopedia.htm

ignore this - I figured it out: I just have to figure out how to get it not to display the 404 error page in the frame when it first loads.

ignore this - I figured it out: To change the size, I think I can use something like width:95%... is that correct?


And Thank You very much for the very rapid response.

netip
09-22-2005, 04:54 PM
It is working perfectly. This is exactly what I wanted/needed. I can't thank you enough for your help.

I did just realize I posted the code without any lines giving you or dynamic drive any credit. I'm not exactly sure how to modify the code to do that or what it needs to say.

If you can pass that along to me, I'll be happy to do so.

jscheuer1
09-22-2005, 09:29 PM
Well, the help provided was very minor but, if you'd like to credit me and the forum here, you can place this comment:

<!-- Form modification and Iframe code courtesy of jscheuer1 from http://www.dynamicdrive.com/forums/ -->above the initial form tag:

<!--webbot bot="HTMLMarkup" startspan --><form action="http://lookup.computerlanguage.com/host_app/search" method="post" target="extern">I wish they were all this easy. :D

netip
09-22-2005, 09:59 PM
Thank you sir. I have the attribution line posted now.

Just one more question if I may.....


I assume the code you provided is good for IE4+, FF1.0+, and NS6+? Is that correct?


I'm glad this one was easy for you... but for a non-coder like myself, this was pure magic. It made anything in the Harry Potter books look like cheap parlor tricks.

Again, you have my thanks!

jscheuer1
09-22-2005, 10:08 PM
I don't have all those browsers handy but:

IE4+ confirmed
FF1.0.6 confirmed 1.0+ implied
NS6+ implied

It should work on almost any modern browser and a few relics as well.