Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding in open.window

Status
Not open for further replies.

holden21

Programmer
Sep 18, 2007
1
US
Hello all.

I'm a novice when it comes to down-and-dirty programing, which is why I am here for your advice.

I am constructing my online portfolio. Also, I am using a database to organize my projects dynamically.

At the moment I'm using PHP to to get my info from the database table to display a thumbnail, and descriptions to each corresponding project in their own individual <ul>'s.

Code:
----------------

<? php
DB connecting info
.
.
.
while ($row = mysql_fetch_assoc($getlist)) {
?>
<ul>
<li><a href="<? echo $row['source'];?>" target="_blank"><img src="<? echo $row['thumb']; ?>" border="0" /></a></li>
<li><h3>Name:</h3><? echo $row['name'];?></li>
<li><h3>Client:</h3><? echo $row['client'];?></li>
<li><h3>Date:</h3><? echo $row['date']; ?></li>
</ul>
<?
}
?>

Question:
Some of my projects are .flv. Is it possible to embed a .flv to an open.window(that is triggered by onclick through my thumbnail) so that it will pull from my database like I have above using javascript/PHP?

Let me explain further...
cause that question hardly makes sense to me :rolleyes:

When you visit my project page all my projects will be pulled from database and displayed in <ul>'s. Each Project will have a thumbnail, and a description.

I want the thumbnail of each project to be a link that opens a new window to play that movie, which is a .flv.

Is this possible?
if so, how would I go about tackling this?

Thanks :)
 
I did a search on google for the following and got a lot of hits:

open flash file in a new window

Certainly that would be a good starting point!

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Try something like this
<SCRIPT LANGUAGE="JavaScript1.1">
// declare global variable name
var newWindow = null
function makeNewWindow() {
// check if window already exists
if (!newWindow || newWindow.closed) {
// store new window object in global variable
newWindow = window.open("","","width=250,height=250")
// pause briefly to let IE3 window finish opening
setTimeout("fillWindow()",100)
} else {
// window already exists, so bring it forward
newWindow.focus()
}
}
// assemble new content and write to subwindow
function fillWindow() {
var newContent = "<HTML><HEAD><TITLE>Another Subwindow</TITLE></HEAD>"
newContent += "<BODY bgColor='salmon'>"
newContent += "<H1>A Salmon-Colored Subwindow.</H1>"
newContent += "<FORM><INPUT TYPE='button' VALUE='Bring Main to Front' onClick='self.opener.focus()'>"
// the following button doesn't work in NN6
newContent += "<FORM><INPUT TYPE='button' VALUE='Put Me in Back' onClick='self.blur()'>"
newContent += "</FORM></BODY></HTML>"
// write HTML to new window document

newWindow.document.write(newContent)
newWindow.document.close()
}
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top