target of hyperlink in app web changes automatically

We are using some apps in our Intranet. Within an app we want to have hyperlinks in a TextBox linking to other Intranet pages. After having inserted and saved the target url is transformed like this:

http://app0123/SitePages/Homepage.aspx

Originally we wanted to link to 

http://intranet/SitePages/Homepage.aspx

It seems that the host url is transformed relatively to the app address.

How can we get around this?


  • Edited by hp-oswald Thursday, March 19, 2015 1:44 PM
March 19th, 2015 1:37pm

Hi,

Per my understanding, there is an issue when adding some hardcoded hyperlinks in a SharePoint App.

I tried to reproduce this issue by creating a Napa App as below:

1. When designing app in Napa Tool, the source code of the hyperlinks are:

2. Launch the app, the hyperlinks in the browser would be:

It turns out that the URL stay the same all the time.

I suggest you provide more details about this issue if the steps above dont match your scenario.

Thanks

Patrick Liang

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 7:50am

Hi Patrick, thanks for your reply. No, it's not an aspx page. The scenario is like this:

  1. App has got a list
  2. this list has got a column (name = Information) of type Multiple Lines of Text
  3. we create a list item and put a hyperlink into the information column like http://intranet/SitePages/Homepage.aspx
  4. we save the list item and have a look at it in display form. Seems ok. If we click at the Hyperlink the browser changes the address into http://app0123/SitePages/Homepage.aspx

so the "http://intranet" is replaced by the host header of the app


  • Edited by hp-oswald Friday, March 20, 2015 1:56 PM
March 20th, 2015 1:54pm

Hi,

I add a list with Multiple Lines of Text column in my app with some sample data in it:

It turns out that the URL stay unchanged either.

Would you mind creating another App project with only one list and make the test again? It will be helpful to narrow down the issue cause it might be an issue of other customization in the app or the configuration of the app environment.

Thanks

Patrick Liang

Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2015 10:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics