Quick Question

Discussion in 'Javascript' started by BryanA, Nov 2, 2008.

  1. BryanA

    BryanA Guest

    I am new to JS and after googling for a little while I couldn't find
    an answer to my question. I have an ajax JS that auto updates a
    certain element. The problem is it has to request another page for
    each individual page that it sits on. I have a php get in there but
    because this site is in full js, every time I pass a variable through
    the url it starts back at the base page. The javascript sits at the
    top of the page and then loads in other pages and acts as a template.
    How should I go passing the current page url into the JS? I was
    thinking about using a variable in the element that it refreshes but
    am unsure of how to do that.

    Any suggestions?

    Thanks,
    Bryan A
    BryanA, Nov 2, 2008
    #1
    1. Advertising

  2. BryanA

    BryanA Guest

    On Nov 2, 8:29 am, BryanA <> wrote:
    > I am new to JS and after googling for a little while I couldn't find
    > an answer to my question. I have an ajax JS that auto updates a
    > certain element. The problem is it has to request another page for
    > each individual page that it sits on. I have a php get in there but
    > because this site is in full js, every time I pass a variable through
    > the url it starts back at the base page. The javascript sits at the
    > top of the page and then loads in other pages and acts as a template.
    > How should I go passing the current page url into the JS? I was
    > thinking about using a variable in the element that it refreshes but
    > am unsure of how to do that.
    >
    > Any suggestions?
    >
    > Thanks,
    > Bryan A


    To further explain, the url format is: http://www.example.com/index.php#page
    which turns into http://www.example.com/#page

    Because the #page is just the id of the page and the js file is
    sitting at the top of the page it can't be edited with url parameters
    which is what I need?

    Any Help is much appreciated!

    -Bryan
    BryanA, Nov 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jack
    Replies:
    1
    Views:
    898
  2. jack

    Quick perl question 2

    jack, Aug 25, 2003, in forum: Perl
    Replies:
    1
    Views:
    900
  3. Jorell

    Quick Question

    Jorell, Aug 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    311
    Jorell
    Aug 8, 2003
  4. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    Quick Question - Newby Question

    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Feb 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    644
    Iain Norman
    Feb 16, 2005
  5. JKop
    Replies:
    11
    Views:
    873
Loading...

Share This Page