By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

Quick Question

P: n/a
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
Nov 2 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Nov 2, 8:29*am, BryanA <Bryan.Andr...@gmail.comwrote:
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
Nov 3 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.