Forum Moderators: coopster
I am relatively new to php and am currently trying to get a popup to work. Basically I run a photo sharing site and I'm using a pre-bought bit of php software that runs the site. It uses templates, where you can modify the html, which feeds into the php.
I am trying to modify one of these templates using a javascript, however I'm not getting the results I want from it. At the moment, this is the script I'm using:
<script>
<!--
Popup('showalbum_desc.php?aid={aid}', 'AlbumDescription{aid}', 600, 600);
//-->
</script>
This is working, however when it parses the Album description (ie a journal of someone's travel's) there is no paragraph formatting retained (i.e. all the text is joined together). I'm finding that apostrophe's are also appearing as ////'s.
Also I would like the Album name to be parsed to the <title></title>... at the moment it is just a scrappy long url.
If anyone is able to help, I would be ever so grateful! Mainly it is the formatting that's bugging me.
Thanks very much!
Travis.
Where is the description coming from, db?
you could use stripslashes [ca.php.net] to get rid of the escaping before apostrophes.
Yes the description is coming from the database.
Currently there is a sub-routine (not sure if that's the right terminology) called {albummsg}. This is found in one of the templates and calls the description. However I've found that if I put this in the popup script it doesn't work. I'm assuming that it wouldn't be able to identify an exact entry from the database using this method. (?)
I can send you a screen capture of how it currently appears if that helps?
Thanks for your help!
It should work the same way in the popup since it's just a different page. Have you looked to see if you are including all the necessary files that the script may need?
So it works just fine if you don't put it in the popup? I would look for differences output functions. See how it is being output in other places and then see if there is any difference to how you are trying to do it in the popup.
Look at another script which is using it and look at the top of it (where includes normally are) or just search it for include statements.
look at how it handles the output from that function on that other script as well and make sure you are doing the same things on output.