473,396 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

change url string without reloading page

Is there a way to access a string in the url with ajax and change a
variable but not reload the page.

I know you can do this for id's

document.getElementById("page").value = page;

but I want to change the page value in the url as well. Here is what i
am trying to do (maybe there is another way and I am going about it all
wrong) I use ajax to do some paging but if someone wanted to book mark
a page if would get the right page. I have it set up so if you dont
have javascript and click to the next page it really takes you there,
url and all. If you do have javascript it uses ajax to load the next
page, but the url stays at the first loaded page.

If i can change the page var in the url each time with javascript then
the bookmarking should work.

Any ideas???

Thanks for any help.

chad

Jun 20 '06 #1
2 4033
ch*********@gmail.com wrote:
Is there a way to access a string in the url with ajax and change a
variable but not reload the page.
No, thankfully.
I have it set up so if you
dont have javascript and click to the next page it really takes you
there, url and all. If you do have javascript it uses ajax to load
the next page, but the url stays at the first loaded page.


Bookmarking is a usability problem introduced by Ajax.
You can provide a link to a "permanent url for this page" which users can
then bookmark.
Or, if your users want to bookmark pages at random and see the page exactly
as they are looking at it, don't use ajax to update content.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jun 20 '06 #2
Hey Matt,

Thanks for the fast reply. Yeah I have seen some of the browser history
issues, the direct link may be the best as the page has maps and more
info I don't want to reload each time. I thought maybe I caould change
the url variable to at least help with bookmarking. Oh well. I will now
tackle the history issue. (I have seen some ways to make it work, do
you know if they are just ugly hacks or are they real world standards?)
Thanks for the pointers

Chad

Jun 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jbj | last post by:
Something like a php function that can be called? I have php in a page that needs to be update periodically (basically poll results) without reloading the page around it (I do have a button you...
4
by: J. J. Cale | last post by:
Hi Obviously I'm new to PHP. I would like to be able to update a table in a page from a database on the server without reloading the page each time. Is this possible with PHP? TIA Jimbo
8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
15
by: Henning Vestergaard Poulsen | last post by:
Hi, I have a problem that I hope someone can help me with. I'm building a web page with pictures I've taken with my digital camera. I have succeded making a javacript that, when clicking on a...
3
by: micchy | last post by:
Dear everyone, I'd like to know if 'view-source' in javascript can work without reloading the page. (or not calling the page again, just as I right-click in IE) Thanks for your help! micchy
9
by: michael | last post by:
I have many links on a page, but for example sake, these two: <a href="bla1.html" id="link1">bla1</a> <a href="bla1.html" id="link2">bla1</a> I use a Javascript function to change the link...
1
by: Mad Scientist Jr | last post by:
How do you get a ASP.NET page to return nothing, so the page posting form data to it doesn't reload? I have tried all combinations of the following: Response.SuppressContent = True...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
2
by: Tamer | last post by:
Hi! Is there a way to change the protocoll type through Javascript without reloading (or making a request from the webserver) via Javascript? for example: http://mydomain.com...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.