iFrames on myspace

As i’m sure anybody who uses myspace knows, Myspace doesn’t allow iframes on the page. well I have an iframe i was wanting to place on there. is there an alternative way to do iframes on myspace?

this is the iFrame code

<style type=“text/css”>.fvd_ytl { display:none; font-size:0px; }</style><iframe class=“iframe” src=“http://www.youtubefaceoff.com/outBat/box.php?idx=120” id=“112” width=“350” height=“200” frameborder=“0” allowtransparency=“” scrolling=“no” ></iframe>

You can mimic the same sort of display functionality of an iframe with a div (i.e. fixed width, scrolling on overflow), however you can’t just load a remote page into a div like you can with an iframe. But you could use <embed> in some situations, however it must be an object, not just a remote page.

umm that doesn’t really help all too much. it’s not an object. it’s a php file. if you got to this url you’ll see what the file is. it contains 2 smaller versions of youtube videos with buttons attached to them for voting.

URL
http://www.youtubefaceoff.com/outBat/box.php?idx=120

IFRAME CODE
<style type=“text/css”>.fvd_ytl { display:none; font-size:0px; }</style><iframe class=“iframe” src=“http://www.youtubefaceoff.com/outBat/box.php?idx=120” id=“112” width=“350” height=“200” frameborder=“0” allowtransparency=“” scrolling=“no” ></iframe>

Yes, I realize that. What I was saying is that without being allowed to execute PHP code, there is no way to load an entire webpage like you can do with an iframe, as far as I know. I could be wrong, but I have not come across any other way. Maybe Javascript could do it.

hmm. so the only way i’d be able to do this is by turning this whole thing into an object, and use embed or something of the sort?

The reason I ask is because i’m extremely un-experienced with Object Orientated Programming (OOP) and doing so will be extremely difficult. i’m pulling data from mysql.

The script itself is pretty small. but at the same time the iframe is calling box.php?idx=112 - where idx is the variable of the item in the db. so even making it an object i’d sill have to find a way to allow that to be dynamic allowing me not to have to create 2000 pages and a new one each time something is added into the db.


&lt;?php
include('../config/config.php');
$hiSet = array('344','295');
$batId =  $_GET['idx'];
$query = mysql_query("SELECT * FROM `battle` WHERE `id` = '$batId'");
while($row = mysql_fetch_array($query)) {
$batOneX = str_replace("425","150",$row['vidOne']);
$batOne = str_replace($hiSet,"121",$batOneX);
$batTwoX = str_replace("425","150",$row['vidTwo']);
$batTwo = str_replace($hiSet,"121",$batTwoX);
$vp1 = $row['vp1'];
$vp2 = $row['vp2'];
$batId = $row['id'];
$batTi = str_replace(" ","_",$row['title']);
}

echo "&lt;div style=\\"float:left;overflow:hidden;padding:3px;\\"&gt;";
echo "&lt;div style=\\"font-size:12px;font-family:Arial, Helvetica, sans-serif;text-align:left;font-weight:bold;padding-bottom:3px;\\"&gt;&lt;a href=\\"".$weburl."\\"&gt;YouTube Faceoff&lt;/a&gt;&lt;/div&gt;";
echo "&lt;div style=\\"float:left;\\"&gt;".$batOne."&lt;/div&gt;";
echo "&lt;div style=\\"float:left;vertical-align:middle;text-align:center;width:25px;font-size:14px;font-weight:bold;padding-top:50px;\\"&gt;VS&lt;/div&gt;";
echo "&lt;div style=\\"float:left;\\"&gt;".$batTwo."&lt;/div&gt;";
echo "&lt;/div&gt;";
?&gt;
&lt;div&gt;
&lt;form action="&lt;?=$weburl;?&gt;/face_off/&lt;?=$batId;?&gt;/&lt;?=$batTi;?&gt;" method="post" target="_blank"&gt;
&lt;input type="hidden" name="ckc" id="ckc" value="&lt;?=$batTi;?&gt;" /&gt;
&lt;input type="hidden" name="voteid" id="voteid" value="&lt;?=$batId;?&gt;" /&gt;
&lt;div style="float:left;padding:3px;"&gt;
&lt;div style="float:left;width:150px;overflow:hidden;"&gt;&lt;input type="submit" name="vpfora" id="vpfora" value="&lt;?=$vp1;?&gt; votes" style="cursor:pointer;"/&gt;&lt;/div&gt;
&lt;div style="float:left;width:25px;overflow:hidden;"&gt;&nbsp;&lt;/div&gt;
&lt;div style="float:left;width:150px;overflow:hidden;"&gt;&lt;input type="submit" name="vpforx" id="vpforx" value="&lt;?=$vp2;?&gt; votes" style="cursor:pointer;"/&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;

I’m not asking anybody to make this into an OOP file, though that would be nice, i can’t expect it to be done through a forum. i’m just wanting to know if anybody knows any good methods or an easy way to do this while remembering that i know absolutely nothing off OOP. never done it.

In this context when I say “object” I am not referring to classes created through Object Oriented Programming. I mean an object in its original sense - i.e. a video or flash file or something else that you can embed in a page. Using OOP won’t solve your problem - a webpage is a webpage is a webpage, no matter if it’s written through OOP or procedural or whatever.

Like I said, there may be a way to do this using Javascript, i’m not sure. I know innerHTML replaces html content, but I don’t think it can take a URL as an argument.

Do you know any flash? That would be a simple way to solve this.

I don’t really know flash all too well at all. I’ve played with it for probably a grand total of 3 hours. so no, not really. How would i be able to use flash for it though, i’m always up for learning new things and flash is on my List To Learn (yes i actually have one). Would i just have to turn the entire thing into a video playing image of some sort?.. wow. i just confused myself with that one.

I can’t help you with flash, I’m sorry - don’t know any of it myself. However, although I am not familiar with AJAX either, it seems like this might be a situation that it could solve. Try looking into that.

okay, AJAX is beyond me as well but i’ll look into it. thank you for your help. I really appreciate it.

This link may help you get the idea some - although the implementation may have to be different.

http://nodstrum.com/2007/02/27/ajaxcontentload/

You can embed the iframe code into a MySpace application.
You find the steps for creating a MySpace application in the MySpace developer wiki/platform.
Then you can add the application to your MySpace profile.