Working with HTML and a Free WordPress Site

I noticed that <iframes> work on the free wordpress however <script> tags do not.

  • works a little differently then a normal wordpress site
  • JavaScript <script> tags don’t work on a site
  • there maybe is a <iframe> work around and that topic is discussed in this blog entry
  • the goal is to be able to insert JavaScript right into a wordpress blog post without updating php code

First off what is an <iframe>?

<iframe src="table.php" flex="2" id="browserTable" name="table_frame"/>


<iframe> you will notice gets its source from a different file called table.php.

Google Calendar also uses an <iframe> to insert itself into wordpress and that works.


MySQL bridge

Here is an interesting way to send messages to and from MySQL by calling a php file – its suppose to work with Jquery.

 jquery request from html page:

    url: "messages.php",
    type: "POST",
    async: true, 
    data: { WHAT GOES HERE ? },
    dataType: "html",

    success: function(data) {
}); //data: {'messagecontent': $("#message-content").val()},

response code:


$host = "localhost";
$user = "root";
$pass = "root";
$databaseName = "myDataBaseName";
$tableName = "comments";  

$con = mysql_connect($host,$user,$pass);
$dbs = mysql_select_db($databaseName, $con);

$result = mysql_query("SELECT * FROM $tableName ORDER BY date DESC LIMIT 0 , 10 ");            
$data = array();

while ($row = mysql_fetch_array($result)) 
echo $row['message']." - ".$row['date'];
echo "
"; } ?>


NOTE: There is still some type of jquery code that does a .send() I believe?