How can I remove the comma from this query string's url?

DenyAccutane

New Member
\[code\]<script type="text/javascript"> //GET DATA FROM URL ...index.html?PageTitle,YOUTUBE_ID var DATA = http://stackoverflow.com/questions/15725332/window.location.search.replace("?", ""); //STORE IN ARRAY FOR EASY ACCESS AND EXPANDABILITY DATA = http://stackoverflow.com/questions/15725332/DATA.split(","); //LOAD THE PAGE TITLE document.title = DATA[0] //UPDATE THE IFRAME SRC AFTER THE DOCUMENT LOADS window.onload = function() { var YouTube = document.getElementById('YouTube'); YouTube.src = "http://www.youtube.com/embed/" + DATA[1] };</script>\[/code\]\[code\] <div class='content'> <iframe id="YouTube" width="853" height="480" frameborder="0" allowfullscreen> </div>\[/code\]I've got this code above, which allows me to change my websites embedded video depending on what the user inputs in the url. The standard url goes \[code\]www.mysite.com/index.html/?,\[/code\] and then obviously the video code on the end. How could I rewrite this code so there is no comma after the question mark? or if possible no question mark at all so just \[code\]www.mysite.com/index.html/videocode\[/code\]NOTE: the comma is intentional in the standard url example.
 
Back
Top