FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
Reading the current address bar...
Message  

Reply with quote
Post Reading the current address bar... 
I have designed a JS module of an events calendar so that users can use my DB and Server for processing and have a calendar show up on thier site.

I am trying to pass queries to the page to allow users to change months/years and to track what site the calendar is being viewed from.   Thats all fine,  but how do I retrieve the query string from the PHP servers end.  if I use $_server['php_self'], I get the server location where the PHP is hosted, not where the originating file was called from.  In essence, I need to be able to pull down whatever is showing in the address bar at that time..  Can't seem to find that anywhere...

Any Ideas?

View user's profile Send private message MSN Messenger

Reply with quote
Post Got it figured 
used the following function to do what I needed.

Have the initial file called be a true .js file, which in turn calls the PHP file.

function GetParam(name)
{
  var start=location.search.indexOf("?"+name+"=");
  if (start<0) start=location.search.indexOf("&"+name+"=");
  if (start<0) return '';
  start += name.length+2;
  var end=location.search.indexOf("&",start)-1;
  if (end<0) end=location.search.length;
  var result=location.search.substring(start,end);
  var result='';
  for(var i=start;i<=end;i++) {
    var c=location.search.charAt(i);
    result=result+(c=='+'?' ':c);
  }
  return unescape(result);
}

View user's profile Send private message MSN Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com