Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-31-2011, 08:15 PM   PM User | #1
turpentyne
Regular Coder

 
Join Date: Aug 2010
Posts: 312
Thanks: 10
Thanked 1 Time in 1 Post
turpentyne is an unknown quantity at this point
changing url with <0bject>

I'm trying to change the parent page of site1 when someone clicks on an <object> that is sitting on site2. Not sure how to do this. Onclick doesn't seem to do anything. I would have it go to a function that changes document location, but even alert('test') isn't doing anything. Is it because they're on two different website locations? I have access to both sites, but I have to object or iframe in this item and have it change the url when clicked.

Here's the object tag I have:
Code:
<object onclick="alert('test');" id="http://www.website2.com/file.html" data="http://www.website2.com/file.php" type="text/php"></object>


and here's the basic jist of file.php:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <body style="margin:0; padding:0;"><div id=final>
            
   <?php
          
require_once("db.php");
$item "on_the_cover__thumb1";

$data mysql_query("SELECT * FROM auth2es WHERE id LIKE '37' AND id2 LIKE '1'");

$row variableThis makes it easier to echo each field.

$link1 'http://www.site1.com/page/';

while(
$row mysql_fetch_array($data)){
echo 
'

<a href="'
.$link1.'"><img src="' $row['filepath1'] . '"></a>';
}

?>


    </body>
</html>
turpentyne is offline   Reply With Quote
Old 11-01-2011, 12:30 AM   PM User | #2
turpentyne
Regular Coder

 
Join Date: Aug 2010
Posts: 312
Thanks: 10
Thanked 1 Time in 1 Post
turpentyne is an unknown quantity at this point
scratch this question... I found the answer using javascript and post.message.
turpentyne is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:03 PM.


Advertisement
Log in to turn off these ads.