Trouble using iframes

i am trying to plug the phpbb forum into one of my websites but am having a very difficult time.

i have used iframes to do it, and everything shows up, but i would like to be able to have it adjust automatically depending on the data on each page, but instead it will add scroll bars to the pages that are a little bit longer, (so there is one already on my browser, then one in the webpage, which is very annoying!!).

i have found this site

and done what they said, but it doesn’t seem to work for me. has anyone else had this problem with iframes??? what should i do to fix the problem?

I used that exact script, and you can see it at work on my page here:

However, it doesn’t work in opera, or any older browsers, so you should assume that it won’t work and consider the user fortunate if it does.

I’m guessing just giving you my URL won’t help you, but if you’d like more specific assistance, just post your site URL and I will take a look at it.

thanks for the reply! the location where i am trying to use the iframe is

for some reason, the coding just doesn’t work for me…i follow the directions as it says…

When I go to your page, I get a 404 error in the iframe, and the iframe is resized to fit the 404 error.

it’s as if the phpbb is not in the directory you’ve specified.

i know! when i do just a regular iframe, without the code i put in the head tags it works fine…but will not resize the way i want it too…

Also, if you want to use javascript in the HREF of your anchor tags, you need to specify with the "javascript: " prefix, like so:

Otherwise the browser will attempt parse the string as a relative URL. Of course, doing this is generally regarded as bad form and what they say you should do instead is use an onClick event handler in your AREA or IMG tag. shrug

a-ha! I found your forum. I think I can help you with this now.

First, your IFRAME tag should look like this:

That looks almost exactly like yours, but you’ll see I’ve added a forward slash in front of the URL to indicate that the “forum” directory is in the web root. EDIT I also took out “display: none” from the style attribute, and removed the trailing forward slash!

Second, the link to “forum” can stay the same on your forum page as it is elsewhere. you don’t need to use the loadintoiframe function at all; as long as you specify the name of the iframe the javascript should take care of the resizing.

If you make those two changes and you still have trouble, let me know!

haha, still no luck! i think i may be going crazy!!! now it just says: “No input file specified.”

try removing the last trailing slash from the SRC attribute of the iframe. like this:


that did it! thank you so much for your help!!

no problem. glad I could be of assistance, and sorry I didn’t nab that sooner. :wink:

one last question…do you know if there is a way to do the same sort of thing to an external website?

Well, I have never done that so I’m not positive, but I imagine it would be possible. I would be cautious though, particularly if you don’t have control over that website’s content.

How to set pages url if I am using iframe in my page to load others, ex. search, login and so on…?
besides, using your example:
in my google chrome internet don’t show the scrollbar when I load much biger (height) page to frame than internet window has. How to fix it?

Don’t do that. Aside from the compatibility/usability issues you’re running into, an iframe-based site is much more difficult for a search engine to index, so your rankings will suffer significantly.

i am trying to add the following code to our website…i have tested it in numerous test banks, however when i add it to the page, it just shows up as a box, nothing inside it. help please :slight_smile:

Does Google allow iframing their content?

I thought they had widgets for that kinda stuff.

Did you read this thread?

That’s the best piece of advice here.