HaLo2FrEeEk Posted November 1, 2007 Share Posted November 1, 2007 Can someone please tell me what I'm doing wrong here, I'm trying to use a javascript to open a new window that will have an embedded flash player to play a podcast. The podcast URL and title are passed in the function to the javascript so the link someone clicks looks like this: <a href="javascript:play('http://www.mypodcast.com/fsaudio/claninfectionist_20070829_0450-73936.mp3', 'The End of The Beginning');">Play</a> And here's the javascript I'm using: function play(url, title) { var podcastWin = window.open('http://claninfectionist.com/play.php?url='+url+'&title='+title, '', 'height=79, width=310'); } So the url passed would look like this: http://claninfectionist.com/play.php?url=http://www.mypodcast.com/fsaudio/claninfectionist_20070829_0450-73936.mp3&title=The End of The Beginning My play.php looks like this: <?php $url = $_REQUEST['url']; $pause = $_REQUEST['title']." - PAUSED"; $stream = $_REQUEST['title']." - PLAYING"; echo "<head>\n" echo "<title>".$_REQUEST['title']."</title>\n" echo "</head>\n" echo <<<EOP // Player code (it's long and boring, and irrelevant) EOP; ?> So it should print this at the top of the page when play() is called: <head> <title>The End of The Beginning</title> </head> And it does, but the title of the page doesn't change, it first flashes this: http://claninfectionist.com/play.php?url=http://www.mypodcast.com/fsaudio/claninfectionist_20070829_0450-73936.mp3&title=The End of The Beginning Then changes to this: http://claninfectionist.com/?url=http://www.mypodcast.com/fsaudio/claninfectionist_20070829_045 - Windows Internet Explorer It's not a super big deal, but I want to make this look more professional and no title showing makes it look amateur to me. Can someone please tell me what's going wrong? I'm pulling all the information for this podcast from an rss feed that my podcast host provides and parsing it. If you want to check it out first hand the url to my podcast page is: http://claninfectionist.com/podcast.php Please, any help would be appreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 2, 2007 Share Posted November 2, 2007 It's probably an encoding issue with spaces in the URL. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 3, 2007 Author Share Posted November 3, 2007 I used str_replace to replace spaces with +'s, it didn't seem to work. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 3, 2007 Share Posted November 3, 2007 73936.mp3&title=The End of The Beginning Your problem should be the spaces in the end of your url, like above. Most browsers will count a space in the url as 'terminating' the url and none of the rest of the characters in the url will be processed(so, therefore, 'title' would have a value of 'The'). The above should have read: 73936.mp3&title=The+End+of+The+Beginning --a whole url passed as a url parameter like you do should also be escaped Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 3, 2007 Author Share Posted November 3, 2007 Ok, well I already said in my last post that I used str_replace to replace spaces with +'s, so that's done, so now all I have to do is something like urlencode($url) in the podcast.php page (the one that has the link to the javascript function) and then in the player.php page, I would do urldecode($url) before passing the link along to the flash player? Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 3, 2007 Author Share Posted November 3, 2007 Ok, sorry for the double post, but this is really getting on my nerves, there seems to be no reason why this wouldn't work, but it still doesn't. I'm gonna give you guys allt he code I'm using, for podcast.php, pop.js, and play.php, here goes: podcast.php <?php $podcast = "true"; $title = "Podcast"; include($_SERVER['DOCUMENT_ROOT'].'/header.php'); include($_SERVER['DOCUMENT_ROOT'].'/misc/snoopy.php'); $snoopy = new Snoopy; $snoopy->fetch("http://claninfectionist.mypodcast.com/rss.xml"); $text = $snoopy->results; $text = str_replace("itunes:", "", $text); preg_match_all("%[\t]+<item>(.+?)</item>%s", $text, $match); foreach($match[0] as $item) { preg_match("|<title>(.+?)</title>|i", $item, $title); preg_match("|<summary>(.+?)</summary>|is", $item, $summary); preg_match("|<guid ispermalink=\"true\">(.+?)</guid>|i", $item, $perma); preg_match("|<pubdate>(.+?)</pubdate>|i", $item, $date); preg_match("|<author>(.+?)</author>|i", $item, $author); preg_match("|<enclosure url=\"(.+?)\"|i", $item, $url); preg_match("|<duration>(.+?)</duration>|i", $item, $duration); preg_match("|<explicit>(.+?)</explicit>|i", $item, $explicit); $title = $title[1]; $rep = array(""", "'", " "); $with = array("_", "_", "+"); $esc_title = str_replace($rep, $with, $title); $summary = $summary[1]; $permalink = $perma[1]; $date = date("l, F j, Y g:i a", strtotime($date[1])); $author = $author[1]; $url = $url[1]; $playurl = urlencode($url); $duration = $duration[1]; if($explicit[1] == "clean" || $explicit[1] == "no") { $explicit = "<span style=\"border: 1px solid green; padding-left: 4px; padding-right: 4px; color: green;\">clean</span>"; } else { $explicit = "<span style=\"border: 1px solid red; padding-left: 4px; padding-right: 4px; color: red;\">explicit</span>"; } $pause = $title." - Paused"; $stream = $title." - Playing"; echo <<<EOP <table width="730" cellpadding="3" cellspacing="1" border="0" class="forumline" align="center"> <tr> <td class="catForum_front" align="center" colspan="2" height="22"><span class="cattitle"><a href="$permalink" style="color: black;">$title</a></span></td> </tr> <tr> <th colspan="2" align="left" height="25" > <span class="cattitle"><i><small>Posted by $author on: $date</small></i></span></th> </tr> <tr> <td class="row1" align="center" valign="middle" style="padding: 10px;" rowspan="2"><img src="http://claninfectionist.com/images/icon_listen.gif" alt="" /></td> <td class="row1" width="100%" onMouseOver="this.style.backgroundColor='#ECECEC';" onMouseOut="this.style.backgroundColor='#FFFFFF';"><span class="genmed">$summary</span></td> </tr> <tr> <td class="row1" width="100%"><span class="genmed">$explicit, Duration: $duration, <a href="javascript:play('$playurl', '$esc_title');">Play</a> (requires Javascript), <a href="$url">Download</a> (Right-click > Save Target As...)</span></td> </tr> </table> <table width="730" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top"><img src="http://claninfectionist.com/forum/templates/Xbox360/images/front_table_shadow.gif" alt="" /></td> </tr> </table><br /> EOP; } include($_SERVER['DOCUMENT_ROOT'].'/footer.php'); ?> pop.js function play(url, title) { var podcastWin = window.open('http://claninfectionist.com/play.php?url='+url+'&title='+title, '', 'height=79, width=310'); } play.php <?php $url = urldecode($_REQUEST['url']); $title = $_REQUEST['title']; $pause = $title." - PAUSED"; $stream = $title." - PLAYING"; echo <<<EOH <head><title> $title </title></head> EOH; echo <<<EOP <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="290" height="66"> <param name="movie" value="mp3player.swf" /><param name="quality" value="high" /><param name="wmode" value="window" /><param name="bgcolor" value="#CECED5" /> <param name="flashvars" value="config=%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22$url%22%20urlencoded=%22false%22%20volume=%2275%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22true%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#008000%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%228%22%20color=%22#000000%22%20streamingText=%22$stream%22%20pausedText=%22$pause%22%20width=%22270%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#008000%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#008000%22%20/%3E%3C/styles%3E%3C/mp3player%3E"> <embed src="mp3player.swf" width="290" height="66" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="window" flashvars="config=%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22$url%22%20urlencoded=%22false%22%20volume=%2275%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22true%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#008000%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%228%22%20color=%22#000000%22%20streamingText=%22$stream%22%20pausedText=%22$pause%22%20width=%22270%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#008000%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#008000%22%20/%3E%3C/styles%3E%3C/mp3player%3E" bgcolor="#CECED5"></embed> </object> EOP; ?> It seems to me what is happening is the javascript is removing the urlencode, becuase I put two alerts in before the window opened to tell me the values of url and title, url shows up like a normal url, so instead of the urlencoded() url: http%3A%2F%2Fwww.mypodcast.com%2Ffsaudio%2Fclaninfectionist_20071103_1842-120698.mp3 It shows just the normal: http://www.mypodcast.com/fsaudio/claninfectionist_20071103_1842-120698.mp3 Is there any way to make it not do that? Title is passed right in that the spaces are replaced, I also made it replace single and double quotes with an _ underscore. I would really appreciate help guys. Thank you. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 7, 2007 Author Share Posted November 7, 2007 ugh, bump. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 7, 2007 Share Posted November 7, 2007 You need to escape() the string your passing to JS. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 7, 2007 Share Posted November 7, 2007 when the 'play.php' page opens, do View/Source to look at the html returned and see exactly what is between the title /title tags. As well, that 'play.php' page is missing an html tag, a body tag and the closing tags of those. You deliver incomplete html to the browser and you're taking your chances. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 7, 2007 Author Share Posted November 7, 2007 Well the play page wasn't finished, purring those last touches are the last things I do, I wanted to get this working before I did that, and yeah, I checked the source and it shows the title with no spaces. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 7, 2007 Share Posted November 7, 2007 so the actual title you passed was found between the title /title tags in the html? If that is the case, then the reason the title of the page doesn't change to that is because it doesn't like your incomplete html. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 8, 2007 Author Share Posted November 8, 2007 It has nothing to do with that becuase I just finshed up the code for that page, here is my code: <?php $url = urldecode($_REQUEST['url']); $title = $_REQUEST['title']; $pause = $title." - PAUSED"; $stream = $title." - PLAYING"; echo <<<EOH <html> <head> <title>$title</title> </head> <body> EOH; echo <<<EOP <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="290" height="66"> <param name="movie" value="mp3player.swf" /><param name="quality" value="high" /><param name="wmode" value="window" /><param name="bgcolor" value="#CECED5" /> <param name="flashvars" value="config=%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22$url%22%20urlencoded=%22false%22%20volume=%2275%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22true%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#008000%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%228%22%20color=%22#000000%22%20streamingText=%22$stream%22%20pausedText=%22$pause%22%20width=%22270%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#008000%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#008000%22%20/%3E%3C/styles%3E%3C/mp3player%3E"> <embed src="mp3player.swf" width="290" height="66" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="window" flashvars="config=%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22$url%22%20urlencoded=%22false%22%20volume=%2275%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22true%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#008000%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%228%22%20color=%22#000000%22%20streamingText=%22$stream%22%20pausedText=%22$pause%22%20width=%22270%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#008000%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#008000%22%20/%3E%3C/styles%3E%3C/mp3player%3E" bgcolor="#CECED5"></embed> </object> </body> </html> EOP; ?> And here is my source output: <html> <head> <title>The Most Boringest 15 Minutes EVAR!</title> </head> <body><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="290" height="66"> <param name="movie" value="mp3player.swf" /><param name="quality" value="high" /><param name="wmode" value="window" /><param name="bgcolor" value="#CECED5" /> <param name="flashvars" value="config=%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22http://www.mypodcast.com/fsaudio/claninfectionist_20071103_1842-120698.mp3%22%20urlencoded=%22false%22%20volume=%2275%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22true%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#008000%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%228%22%20color=%22#000000%22%20streamingText=%22The Most Boringest 15 Minutes EVAR! - PLAYING%22%20pausedText=%22The Most Boringest 15 Minutes EVAR! - PAUSED%22%20width=%22270%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#008000%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#008000%22%20/%3E%3C/styles%3E%3C/mp3player%3E"> <embed src="mp3player.swf" width="290" height="66" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="window" flashvars="config=%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22http://www.mypodcast.com/fsaudio/claninfectionist_20071103_1842-120698.mp3%22%20urlencoded=%22false%22%20volume=%2275%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22true%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#008000%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%228%22%20color=%22#000000%22%20streamingText=%22The Most Boringest 15 Minutes EVAR! - PLAYING%22%20pausedText=%22The Most Boringest 15 Minutes EVAR! - PAUSED%22%20width=%22270%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#008000%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#008000%22%20/%3E%3C/styles%3E%3C/mp3player%3E" bgcolor="#CECED5"></embed> </object> </body> </html> I'll try using escape() in my javascript, I thought urlencode in the php before sending it would be ok though, I guess not. EDIT: Escape() doesn't help, it still won't display the title. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 8, 2007 Share Posted November 8, 2007 I copied your html output above into a page and tested it with ie6 and ff 1.5 and the title showed fine. There's no reason that the title should not be displaying. The way php and urlencode usually works is that items recieved by php from form fields and url parameter passing will be automatically urldecoded with no action necessary by the programmer: $urlvar = $_GET['urlvarname']; //no url decoding necessary --you usually only need to do your own urlencoding if you are adding things to the end of a url by yourself, normal form submissions don't need it, either GET or POST. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 10, 2007 Author Share Posted November 10, 2007 Well I thank you for that, but saying that there is no reason that it shouldn't work doesn't make it work. It still won't work. Go here: http://claninfectionist.com/podcast.php and click one of the "play"links under a section, it pops up with a page, view source, title is there, but it's not showing. Is there any way to set the title from the javascript page opening the new window up? I know document.title, and I tried podcastWin.document.title="..." and it didn't work. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 11, 2007 Share Posted November 11, 2007 I tried your link above and clicked play and the title does show in ie6 but not ff 1.5. I believe the reason is that you do not have a doctype and ff is more sensitive to that. You should not use self closing tags like below unless you have an xhtml doctype: <param name="movie" value="mp3player.swf" /> Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 11, 2007 Author Share Posted November 11, 2007 Well I have FF, I use IE7, and the title doesn't show: I don't think doctype tags will do anything, I think it has something to do with it being a popup in IE7, becuase another site has a javascript popup as well and it doesn't show the url. For the longest time I didn't have a doctype on the site itself (until about 4 months ago when I optimized the code for proper HTML 4.1) but the titles still showed. Quote Link to comment Share on other sites More sharing options...
trq Posted November 11, 2007 Share Posted November 11, 2007 Post your code! Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 11, 2007 Author Share Posted November 11, 2007 Oh I have multiple times. Look a few posts back, then a few posts before that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.