Trouble using iframes

design

#1

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

http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

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?


#2

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

http://www.trashpot.com

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.


#3

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

http://www.misstechnicolor.com/html/misstechnicolor.php

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


#4

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.


#5

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…


#6

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


#7

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!


#8

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


#9

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

SRC="/forum/index.php"


#10

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


#11

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


#12

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


#13

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.


#14

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:
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
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?


#15

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.


#16

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:


#17

Does Google allow iframing their content?

I thought they had widgets for that kinda stuff.


#18

Did you read this thread?

That’s the best piece of advice here.