How can I change URL without refreshing the page?

Discussion in 'Programming' started by web-developer, Jan 27, 2011.

  1. #1
    web-developer, Jan 27, 2011 IP
  2. sitearena

    sitearena Peon

    Messages:
    229
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think there is not any code yet created to convert the URL automatically.If you find any let me know.
     
    sitearena, Jan 27, 2011 IP
  3. longcall911

    longcall911 Peon

    Messages:
    1,672
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Your questions is not very clear, so I assume you mean that you want to update or change specific content areas on the page. To do this, there must be an event that triggers the content change. That could be a mouse click, a menu selection, a timer, or similar action. Then when this event occurs, the content changes.

    All major programming languages offer this. I happen to be most comfortable with asp.net but all it is doing is running javascript anyway.
     
    longcall911, Jan 28, 2011 IP
  4. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #4
    jquery is a form of javascript.

    i dont think javascript has anything for it, as far as i know.

    only solution i can think of is url rewrite.
    if you are on linux server you can easily use .htaccess for this.
    for windows server there are different approaches you can take for it.
     
    webcosmo, Jan 29, 2011 IP
  5. web-developer

    web-developer Member

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    But this URL is genreated dynamically.
    So how I can rewrite using .htaccess.
     
    web-developer, Jan 29, 2011 IP
  6. QiSoftware

    QiSoftware Well-Known Member

    Messages:
    805
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    158
    #6
    I use iframe to update areas on my pages-- without refreshing entire pages. Reminder: iframe allows you to specify a url src.

    Q...
     
    QiSoftware, Jan 31, 2011 IP
  7. Shane-

    Shane- Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You should use basic ajax (Javascript) to do your task, it'll "Request" a different page in the background, and load it. It still makes a request, etc, but its more eye friendly for the user.

    An example of ajax being used is this forums "Quick reply"... Do a quick reply and you'll notice the page isnt refreshed, If you Google Ajax, you'll find a lot of guides, find the one you're most comfortable with, create two new pages for testing it, etc, once you've got it working how you wish, then add the code to your live pages.
     
    Shane-, Jan 31, 2011 IP