Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Finding value after the # in a URL

 
   Database Forums (Home) -> PHP SQL RSS
Next:  M,I.5'Per secution , abuse in set-up sit uations ..  
Author Message
Matthew White

External


Since: Jul 16, 2007
Posts: 17



(Msg. 1) Posted: Mon Mar 24, 2008 8:22 pm
Post subject: Finding value after the # in a URL
Archived from groups: alt>comp>lang>php, others (more info?)

Hi all,

I'm working on an AJAX site, and I'm using Dojo and Mootools (both
Javascript) to provide some interactivity. Dojo has a back button fix, but
it requires the use of of a string added onto a URL (I.e.
www.site.com/pages/ becomes www.site.com/pages/#page1). I want to harness
this function to allow you to go back to the page you were on. Since AJAX
does not reload a page, a PHP script would only be called when someone did
something to reload the page, such as hitting the back button. I have tried
a few different $_SERVER variables, but none will give me the "#page1", only
the URL up until that point. Can anyone think of a way to grab the entire
URL, with the # modifiers?

Thanks in advance,
Matt White

 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
ELINTPimp

External


Since: Apr 24, 2007
Posts: 16



(Msg. 2) Posted: Mon Mar 24, 2008 8:22 pm
Post subject: Re: Finding value after the # in a URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mar 24, 4:22 pm, "Matthew White" wrote:
> Hi all,
>
> I'm working on an AJAX site, and I'm using Dojo and Mootools (both
> Javascript) to provide some interactivity. Dojo has a back button fix, but
> it requires the use of of a string added onto a URL (I.e.www.site.com/pages/becomeswww.site.com/pages/#page1). I want to harness
> this function to allow you to go back to the page you were on. Since AJAX
> does not reload a page, a PHP script would only be called when someone did
> something to reload the page, such as hitting the back button. I have tried
> a few different $_SERVER variables, but none will give me the "#page1", only
> the URL up until that point. Can anyone think of a way to grab the entire
> URL, with the # modifiers?
>
> Thanks in advance,
> Matt White

Matt,

Interesting problem. I'm not sure if the #page1 gets stripped at
HTTP...but I am recreating the issue on my server as well....

Any way you can overload that method and change that page value to a
GET value? Then your PHP will receive the value and act accordingly.

I would love to hear what your eventual solution is, though.

Regards,

Steve

 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
Damodhar

External


Since: Feb 05, 2008
Posts: 6



(Msg. 3) Posted: Mon Mar 24, 2008 8:22 pm
Post subject: Re: Finding value after the # in a URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi ,

using jquery to over come the problem for the particular instance
 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
Matthew White

External


Since: Jul 16, 2007
Posts: 17



(Msg. 4) Posted: Mon Mar 24, 2008 9:37 pm
Post subject: Re: Finding value after the # in a URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The problem with a GET value will reload the page- something that I don't
want to do with an AJAX site. Only a # value won't force a reload.

Matt

"ELINTPimp" wrote in message

> On Mar 24, 4:22 pm, "Matthew White" wrote:
>> Hi all,
>>
>> I'm working on an AJAX site, and I'm using Dojo and Mootools (both
>> Javascript) to provide some interactivity. Dojo has a back button fix,
>> but
>> it requires the use of of a string added onto a URL
>> (I.e.www.site.com/pages/becomeswww.site.com/pages/#page1). I want to
>> harness
>> this function to allow you to go back to the page you were on. Since
>> AJAX
>> does not reload a page, a PHP script would only be called when someone
>> did
>> something to reload the page, such as hitting the back button. I have
>> tried
>> a few different $_SERVER variables, but none will give me the "#page1",
>> only
>> the URL up until that point. Can anyone think of a way to grab the
>> entire
>> URL, with the # modifiers?
>>
>> Thanks in advance,
>> Matt White
>
> Matt,
>
> Interesting problem. I'm not sure if the #page1 gets stripped at
> HTTP...but I am recreating the issue on my server as well....
>
> Any way you can overload that method and change that page value to a
> GET value? Then your PHP will receive the value and act accordingly.
>
> I would love to hear what your eventual solution is, though.
>
> Regards,
>
> Steve
 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
Matthew White

External


Since: Jul 16, 2007
Posts: 17



(Msg. 5) Posted: Mon Mar 24, 2008 10:01 pm
Post subject: Re: Finding value after the # in a URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm sure jQuery is a decent framework, but I'm already using two (but both
are superior in their own ways), and a third just seems like it would be
awkward to implement, especially since it shares some of the same namespaces
with Mootools. I'd like a way to implement this is one of the two
frameworks I'm already using, or in PHP.

Matt

"Damodhar" wrote in message

> hi ,
>
> using jquery to over come the problem for the particular instance
 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
Matthew White

External


Since: Jul 16, 2007
Posts: 17



(Msg. 6) Posted: Mon Mar 24, 2008 10:08 pm
Post subject: Re: Finding value after the # in a URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Damodhar's comment made me think, and I whipped up a piece of JavaScript
that runs only one (when the page is loaded), and that seems to be
accurately giving me the data after the #. Thanks for looking into the
problem anyways!

Matt

"Matthew White" wrote in message

> I'm sure jQuery is a decent framework, but I'm already using two (but both
> are superior in their own ways), and a third just seems like it would be
> awkward to implement, especially since it shares some of the same
> namespaces with Mootools. I'd like a way to implement this is one of the
> two frameworks I'm already using, or in PHP.
>
> Matt
>
> "Damodhar" wrote in message
>
>> hi ,
>>
>> using jquery to over come the problem for the particular instance
>
 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 397



(Msg. 7) Posted: Tue Mar 25, 2008 6:56 am
Post subject: Re: Finding value after the # in a URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ELINTPimp wrote:
> On Mar 24, 4:22 pm, "Matthew White" wrote:
>> Hi all,
>>
>> I'm working on an AJAX site, and I'm using Dojo and Mootools (both
>> Javascript) to provide some interactivity. Dojo has a back button fix, but
>> it requires the use of of a string added onto a URL (I.e.www.site.com/pages/becomeswww.site.com/pages/#page1). I want to harness
>> this function to allow you to go back to the page you were on. Since AJAX
>> does not reload a page, a PHP script would only be called when someone did
>> something to reload the page, such as hitting the back button. I have tried
>> a few different $_SERVER variables, but none will give me the "#page1", only
>> the URL up until that point. Can anyone think of a way to grab the entire
>> URL, with the # modifiers?
>>
>> Thanks in advance,
>> Matt White
>
> Matt,
>
> Interesting problem. I'm not sure if the #page1 gets stripped at
> HTTP...but I am recreating the issue on my server as well....

The #page1 won't be sent to the web server, it's just something that the
browser uses internally

The request (seen in the url field)
www.site.com/pages/becomeswww.site.com/pages/#page1

is sent as
www.site.com/pages/becomeswww.site.com/pages/



--

//Aho
 >> Stay informed about: Finding value after the # in a URL 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Finding Acute-e - Hi, Does anyone know how to query a varchar field to bring back any records containing an acute-e - that's the "é" The table is set to Colldation: latin1_swedish_ci I have tried a number of things but nothing seem to work - it seem to retur...

HELP FINDING A PHP/Mysql ERP/POS SYSTEM - I have been searching for ERP system that runs on PHP/Mysql for a med-large sized business. Most of the ones I have found are pretty cheesy and don't do everything a ecommerce company would need. Looking for 1. Ability to maintain inventory 2. Ability....

finding a file directly - From a database of flowering plants (and ferns actually) visitors can select a genus name and the narrow the search for species of that genus. Then links are offered to the plants found. The code is: ..... $sql = "SELECT nr, genus, species FROM flpl...

multiple column sort MySQL - I am using $qryResult = mysql_query("ALTER TABLE MyTable ORDER BY County"); But I would like it sorted by multiple columns such as $qryResult = mysql_query("ALTER TABLE MyTable ORDER BY County"); $qryResult = mysql_query("ALT...

One query and problem LIMIT - Hi all, I have 2 tables: articles and categories articles table: ------------ articleid categoryid name categories table: --------------- categotyid name description I want to get the last entred 5 articles for each category with one quey: like..
   Database Forums (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can 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



[ Contact us | Terms of Service/Privacy Policy ]