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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DIV alternative to IFRAME 3

Status
Not open for further replies.

redletterrocko

Programmer
Aug 8, 2005
53
US
All-

After some great input on my last post, I have decided to get rid of my IFRAME on my site. However, this means I'm doing something I've never done before. I'm trying to add a div that functions exactly like the IFRAME, only isn't dynamic (meaning every time there is a navigation move, a new page needs to reload). It doesn't seem to be working, and even though I consider myself a programmer, I am HORRIBLE at syntax, and can never remember the proper way to do it all. Could someone tell me what I'm doing wrong here?

Code:
<div height=387 width=500 style="position:absolute; top:113px; left:50px; overflow:auto">
<?php include( "[URL unfurl="true"]http://eventuallyanyway.com/blog.html"[/URL] ); ?>
</div>

Any help would be appreciated.

Thanks, Paul
 
Auch. When div is "an alternative to iframe" it functions as a visual alternative, not syntactic. You cannot shove entire html file inside the div. You can put every tag that is a descendant of the body element, but that is it. So you won't be able to simply do it like that, you will need to rewrite all your included files. Also, I would definitely not use absolute positioning on the div and would move width and height properties to css.
 
That is, in effect, what I'm doing. Those pages are formatted to be included, and the php does the include, so you never see that side. It's like the included page would is placed between the div tags. I just need something with a scrollbar, and someone told me that a div would be a good solution. If anyone has any other ideas, please detail where I can learn about it. PLEASE, no opinions. I seem to be getting a lot of that here.
 
The trouble with posting raw php code is that we have to guess what will be included from the php commands. It's generally better to post a URL, or to post the code you get when you "view source" - that is, after all, what the browser is trying to interpret.

If you're horrible at syntax, try validating your pages - it'll tell you where your syntax is going wrong.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Could someone tell me what I'm doing wrong here?

It would be much easier if YOU tell is WHAT is going wrong, and we'll try to tell you WHY it is going wrong. We can see that one small part of your code, but you haven't said what is not working about it. Does the div just come up empty? Does it not display at all? Does it display improperly? Need input!

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
PLEASE, no opinions. I seem to be getting a lot of that here.

If you don't like it then don't ask questions. People are using their valuable time to help you any way they can. It's up to you to decide what is usefull for you.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Three rules of debugging:

1. What happens? (we don't know that... yet)
2. What should happen? (OK, we know that)
3. Is there any smoke coming outside computer case?

So plz give us more details about #1 and #3 and maybe we can help.

Also: that PHP include requires enabled URL fopen wrappers, otherwise it won't work.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top