Jump to content


Photo

Html5 Hyperlink Appends Page To The Url


  • Please log in to reply
7 replies to this topic

#1 robvenable

robvenable

    New Member

  • Members
  • Pip
  • 3 posts

Posted 13 October 2012 - 05:35 AM

Hi,
I have a mobile site that I've been developing in HTML5 with Visual Studio 2010. My default page has 5 links on it that links up to 5 pages on my site.
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">Menu</li>
<li><a href="Services.aspx" data-transition="slide">Services</a></li>
<li><a href="Support.aspx" data-transition="slide">Support</a></li>
<li><a href="Hosting.aspx" data-transition="slide">Web Hosting</a></li>
<li><a href="About.aspx" data-transition="slide">About</a></li>
<li><a href="Contact.aspx" data-transition="slide">Contact</a></li>
</ul>

The problem is, when I click on a link, it appends the page to the url rather than navigating to that page. The page still displays but the url is wrong. So if my url is "http://www.mydomain....e/default.aspx" and I click on the Services link above, the url changes to "http://www.mydomain....Services.aspx". This is just a simple link.
Has anyone ever experienced this behaviour and what can be done to have the correct url come up?

Thanks

#2 robvenable

robvenable

    New Member

  • Members
  • Pip
  • 3 posts

Posted 15 October 2012 - 05:53 PM

Update,
This in only hapenning on IE9. Works on Firefox and Chrome. This can be viewed at www.codenet.ca/m.
You can see when you click on the buttons on the default page, it appends the page to the existing url with a pound (#) sign.
Has anyone seen this behaviour before?

#3 AverageJake

AverageJake

    Active Member

  • O'Reilly Author
  • PipPip
  • 36 posts
  • Gender:Male
  • Location:Seattle, WA

Posted 16 November 2012 - 04:19 PM

Update,
This in only hapenning on IE9. Works on Firefox and Chrome. This can be viewed at www.codenet.ca/m.
You can see when you click on the buttons on the default page, it appends the page to the existing url with a pound (#) sign.
Has anyone seen this behaviour before?


Were you ever able to get this working correctly? Since you're using ASP.NET and jQuery Mobile, there could be a lot of different things going on. It would be nice to try to rule some of them out. Let me know if you're still having this issue and I can try to help you work through it.

Jake

#4 robvenable

robvenable

    New Member

  • Members
  • Pip
  • 3 posts

Posted 16 November 2012 - 06:56 PM

Hi Jake,
Yes I did get this working. Apparently this is the behaviour of jquery mobile so what you have to do is set an attribute of data-ajax="false" in the link and that will take care of it. Or, you can put it in your form element and it will do it for the entire page.
<form id="form1" runat="server" data-ajax="false">

Rob

#5 Indianic

Indianic

    New Member

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:India

Posted 15 February 2013 - 03:43 AM

Thanks for sharing the information. It is really informative and useful.


Android App Developer | Android game Development

#6 Hariot Marks

Hariot Marks

    New Member

  • Members
  • Pip
  • 2 posts

Posted 18 July 2013 - 02:24 AM

This info will be very helpful for me. I would like to say thanks to all of you for sharing here worthy and informative content. Liked your efforts.

#7 DietKart

DietKart

    New Member

  • Members
  • Pip
  • 7 posts
  • Gender:Male

Posted 04 September 2013 - 04:29 AM

This in only hapenning on IE9. Works on Firefox and Chrome

#8 axqqsb

axqqsb

    New Member

  • Members
  • Pip
  • 1 posts

Posted 18 September 2013 - 02:03 AM

FF14 RMT rebirth of exit international clothing line after the game player who pour in hot, warm moment let O. Zeya immersed in a be in full swing adventure atmosphere. The clothes all finished the work has been completed, is the final testing and preparation work. As an epic MMORPG, FF14 RMT uphold the final fantasy series of excellent quality one principle runs through it all. The huge world architecture, exciting, in the vast world, different regions of the local customs and practices with the flavor, urban style is also be quite different, today I will introduce the FF14 RMT in six big city.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users