When using a hyperlink within the same page, the traditional method of doing it is to use <a href="#text">text</a> and then place an id=“text” within the page somewhere as the anchor for the link.
When I attempt this in Wappler, using both the hyperlink icon and hand-coding, it works within the preview of Wappler, but not when published. I have tried using Chome and Firefox on a Windows PC and Safari on iPad.
On the live server, in any browser, the coding looks right but the behavior is not. On a live server, when you click on the link, instead of going down further in the page, it attempts to open a new page named #test.
…
Steps to reproduce
Create a hyperlink using the icon or hand-coding with #test as the link.
I had the url rewrite on because I planned on utilizing it on the front end for friendlier urls, however, if it conflicts with hyperlinks within the same page, I may need to rethink my process.
Hi crew, unfortunately I’ve the same problem.
On my page I’ve this link: <a class="btn" href="#home_foreground"><i class="arrow-pulse fas fa-angle-double-down p-2 mb-3 fa-lg"></i></a>
pointing to a section: <section id="home_foreground">
I’m getting crazy because it’s so stupid code but doesn’t work.
Any Idea
PS: I’ve solved the problem using smooth scroll. Anyway I’d like to know why html anchor link doesn’t work properly
I will admit, I have not had the occasion to go back and revisit this since posting a few years ago.
I prioritized friendly urls through the url rewrite over linking within the same page and just created separate pages instead of linking within the same page.
I can try to look back into this later today if you still need this resolved. Let me know which server type you are using, nodejs or php so I can do it on the right server.