'href' links not working in local HTML file hosted within winform app. (more detail)

Viewed 182

So my last question received no answers and can be found here.

So I thought that seen as I've done some more testing, I'd write a new, more in depth question regarding this issue.

So the problem is with some links written inside html code that link to other local html files on my system. The files are all found within the compiler of a winforms app (C#) that utilizes the browser function to display the html files.

location of file both within the solution and the files in explorer

As you can see above, the file is located within a winform app and is considered a resource by the compiler (although it is not in the resource folder). The other HTML files in this particular folder interact fine with each other, with links on 'index.html' and 'signUp.html' working as expected between each other.

The link on 'signUp.html' to 'pageTwoSU.html' does not work however.

heres the code on 'pageTwoSU.html':

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pageTwoSU</title>
</head>

<body>
Hello world
</body>
</html>

and here's the code for the link:

<a href="pageTwoSU.html"><p id="nextbutton">NEXT</p></a>

(the 'id' is simply some styling. I've tried removing it and there is no change.)

For the hell of it, here's 2 working links from the same page:

<a href="signUp.html"><p>SIGN UP</p></a>

<a href="index.html"><img id="logo" src="img/logo.png"/></a>

So the page being linked to works fine, and the links syntax is correct, but it simply wont work, i.e. the target page does not even open, it simply stays on the same page, clicking it has no effect. I have tried everything at this point:

  • localising the files somewhere else on the system away from the compiler...
  • changing the name of the file being linked to multiple times
  • adding working links in the same location as the broken one (they worked fine)
  • writing a javascript function to try and bypass <a href>
  • removing all styling and placing the broken link in different areas of the page.
  • placing a link in the target page back to 'signUp.html' (process works fine in reverse)

Please help! I've been banging my head against my desk for days now!

Happy to provide more information/code if needed.

UPDATE:

Still not working, managed to get the link working by creating a new 'test.html' document and replacing the 'signUp.html' with that, but now the link between 'index.html' and 'test.html' does not work.

0 Answers
Related