Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

IFRAME issue


  • Please log in to reply

#1
Trido

Trido

    New Member

  • Member
  • Pip
  • 3 posts
I ran a search and couldn't find my specific problem, so I thought I'd post it.

I am trying to put the new Battlefield 2 Stats program onto my clans website. Now because of the style sheet associated with it, I can't just include it as it changes everything about the page.

So I thought of putting it in an iframe. Sadly, when I put it in, the box comes up, but then it opens up the php file that I want inside the box.

Click here for an example of my problem.

Below is my IFRAME code. Am I missing something I need? And yes, I know the size is wrong, I would alter that after I get the silly thing working.

<P ALIGN=center><IFRAME SRC="stat.php" WIDTH=350 HEIGHT=118 SCROLLING=NO></IFRAME></P>
  • 0

Advertisements


#2
remintellegere

remintellegere

    Member

  • Member
  • PipPip
  • 34 posts
Frankly, I'm not sure why your trying to put it on a separate page anyways. But thats just me.

Personally, I'd put the source in a Table, make the whole page frames, or you can always just use the standard <?php include('yourfile.php'); ?>

If your bent on doing it with iFrames, the code is valid to me. You might want to consider enclosing the values of the tags. Width and Height should have quotation marks enclosing their pixel values. This may or may not fix your problem but its a good coding practice.

As for why it reloads. Does the source file of your script have a meta reload tag? If it does, you may want to tell it to reload to window=_self or get rid of it all together. This may be your problem.

As for the stylesheet issue, are you trying to run 2 styles in the same sheet? You might want to break them into 2 stylesheets and run only one per page.

You can see MY implementation of iFrames at My Webpage and see if thats any resource.

Beyond this, I don't know what to tell you. If this doesn't fix your problem let me know and I'll see what I can do.
  • 0

#3
Trido

Trido

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
Thanks for the reply. I'll give them all a go.

That Stats thing only gives a general output, free of any sort of formatting. I lack the ability to create a style sheet that will not mess with my original site. (Unknowingly, I did it and the tables holding the left menu looked real funky etc) The original site doesn't use a style sheet, I just created everything in Photoshop and sliced it in. I thought that IFRAMEs might be the way to go because I can keep that existing Style sheet.

Just checking quickly, there is no meta reload tag, and I did try the old PHP include. It worked, except for the funky style sheet issue (Mentioned above, it changed colours (Duh), tables etc). Any ideas?

I really wanted it as a page on my main website. If I knew CSS better, I'd try to make a sheet that would work with my existing site, as well as colour coordinating my stats page with the rest of the site. But I wouldn't know where to start.
  • 0

#4
remintellegere

remintellegere

    Member

  • Member
  • PipPip
  • 34 posts
Sounds like you have a classic case of misdefined CSS and HTML. If you want this issue resolved quickly, I can help you myself. Shoot me over an email and I'll take a look at the code. Problem with Photoshop(don't get me wrong, its easily the most kickass program on a computer) is that its HTML formatting isn't the greatest in the world. If you want some serious help, I can just do it for you. That way it'll get done quickly and you'll have support that knows how the site was programmed. Plus, you'll get someone who knows this stuff backwards and forwards(I've worked with PHP/Server stats for Half-Life mods in the past).

If you don't want my help(its free I wouldn't know why), then you can always play around with the code in HTML until it fixes itself. You can even embed the CSS into the primary HTML file, thus ending the need for the external file. Make sure that the HTML file isn't overriding CSS formatting in some way(eg<body vlink="#000000">).
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP