0

Good morning guys, i have encountered a problem here.

This is my current URL:

 blabla/shoe?type=boot&zoom=true

i want to remove the "&zoom=true" part, without reloading the page. But bare in mind that the URL may also look like this:

blabla/shoe?zoom=true

how do i accomplish this, can someone give me an example of Jquery statements. So can start from there. thank u in advance

The reason why i wanna do this is because of the following:

<div class="standard" style="<%=isZoom?"":"display:none;" %>">

isZoom() is checking for any zoom query in the URL, i want the &zoom=true to go away so that the div can be shown

1 Answers1

1

Changing the URL in the browser will reload the page. What's more, the loaded page will not contain your ASP.NET condition. It will only say style="display: none;", so even if you could change the URL without reloading the page, you'd still need to reload the page to have ASP.NET render something else.

The good news, though, is that you can show a div without changing the URL or reloading the page:

$('.standard').show();
David Hedlund
  • 128,221
  • 31
  • 203
  • 222
  • omg...thank you it's working...sorry, because i keep thinking that the "style="<%=isZoom?"":"display:none;" %>" will overwrite the show() method...thank u again... – Gopinath Koothaperumal Jun 20 '13 at 06:11
  • 1
    @GopinathKoothaperumal: ASP.NET's `<% ... %>` only has control over how the HTML code is rendered and gets passed to the client. Once your browser receives a bunch of HTML, it has no idea that there was a .NET page with conditions that caused it to look the way it does. You may find it useful to select "View source" on your pages, to see what gets sent to the browser, and compare that with the .NET code you've written, to get a better idea of what's going on. – David Hedlund Jun 20 '13 at 06:15