473,388 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

PHP embed problem

// New popup funstuff

function _cpg_link_href_popup($image) {
global $cpg_base;
$width=$image->pwidth+20;
$height=$image->pheight+20;
$desc=$image->caption;
$title=$image->title;
if (cpg_is_image($image)) {
return
"javascript:void(mywindow=window.open('','mywindow ','toolbar=no,status=no,re
sizable=yes,width={$width},height
={$height}'));mywindow.document.write('<html><head ><title>{$title}</title></
head><body bgcolor=#ffeedd><img src=&quot;{$cpg_base}dis
playimage.php?pid={$image->pid}&amp;fullsize=1&quot;><br
/><br/>{$desc}</body></html>');mywindow.document.close();";
} else {
$uri=cpg_urlencode(_cpg_get_image_uri($image));
return "javascript:void(window.open('$uri'));";
}
}
This returns exactly what it looks like it should...except the image is
broken. If I look at the source, it looks exactly like it should, and I can
copy/paste it into a new browser window and get the image I'm looking for.
I've tried messing with leaving the quotes, using single quotes, not using
them at all, leaving the question mark in the php? call, etc.

The title and desc variables work just fine.

I cannot figure out what's broken here. Can anyone help?

Thank you!

Peace,
Pen

Jun 15 '06 #1
2 1295
Penelope Baker said the following on 6/15/2006 6:25 PM:
// New popup funstuff

function _cpg_link_href_popup($image) {
global $cpg_base;
<snip>

That line should come out - in the browser - as something like this:

global someVariableName;

Which is a syntax error:

Error: missing ; before statement
Source code:
global someVariableName;

Anything that happens after that is a free for all.
This returns exactly what it looks like it should...except the image is
broken. If I look at the source, it looks exactly like it should, and I can
copy/paste it into a new browser window and get the image I'm looking for.


Can you post a URL to a sample page that displays the behavior?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 16 '06 #2

"Randy Webb" <Hi************@aol.com> wrote in message
news:Ho******************************@comcast.com. ..
Penelope Baker said the following on 6/15/2006 6:25 PM:
<snip>
Can you post a URL to a sample page that displays the behavior?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/


I actually got it all figured out (to some extent). There was a totally
different method of building that page in existence than I thought there
was. I didn't understand the structure of the thing and was modifying the
wrong file!

Thank you for the code correction!!!

--
Peace,
Pen
-----------
Pawbreakers - The Candy for Cats!
http://www.pawbreakers.com
Jun 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
2
by: Cris Curtis | last post by:
When I use an embed tag that uses a dynamic aspx page, the dynamic aspx page appears to get called 2 times instead. Below is code that adds an embed tag to a placeholder control that will use...
8
by: Cowan Services | last post by:
My apologies if this has been covered before, but I was unable to download messages before 11/23/05. I am trying to bring some HTML pages w/embedded .WMV files into W3C compliance. Right now,...
1
by: snicks | last post by:
I have a series of XLS files which I need to embed into a PowerPoint presentation on an IIS server. I’ll be using VB.NET. I’ve tried using an ASPOSE.PowerPoint control to do this and it does...
1
by: Andrew Poulos | last post by:
With "normal" SWF HTML there's an EMBED tag nested within an OBJECT tag. How can I check which tag is actually displaying the SWF? I'm using CSS on them and the style on the OBJECT affects the...
6
by: qualitychecker | last post by:
Hello thanks for your help.. I try to reference a PHP module from within a HTML file, see below ---------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">...
13
by: windsorben | last post by:
I have some javascript that checks whether or not an answer is correct. It was working fine when the question was asked with text but now that I'm asking the question with audio, the javascript no...
1
by: MoroccoIT | last post by:
Greetings - I have a CF Form that uploads news articles, at times, I like to paste Youtube Videos with my articles. I noticed that on one server, it works fine, but on a different hosting company,...
1
by: movieking81 | last post by:
This really isn't an ASP question, but the code is ASP so feel free to move this to the right place if necessary. I have two ASP pages with some embed code on them on two different hosting...
1
by: movieking81 | last post by:
I have some html pages with some embed code on them on two different hosting platforms. First one (Win2003,IIS) <object> <param name='movie' value='st1.mov'> <embed src='st1.mov' width='725'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.