name box to new link, name box to new link |
name box to new link, name box to new link |
mrc333777 |
Oct 23 2022, 08:12 AM
Post
#1
|
Group: Members Posts: 2 Joined: 23-October 22 Member No.: 28,603 |
<p align="center"><font size="5" color="#FF0000">SEARCH</font><br><br>
<font size="3">Enter Name To Search For</font> <p align="center"><input type="text" id="page" /> <input type="submit" value="submit" onclick="goToPage();" /></a></p><br><br><br><br><br> </p> </html> <script type=""> function goToPage() { var page = document.getElementById('page').value; window.location = "http://192.168.0.101/" + page + ".htm"; } </script> i have that above and it does most of what i want, but what do i need to add to make it remove the spaces from the name and then check to see if the link exists or not? |
CharlesEF |
Oct 24 2022, 08:24 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
I've never done this myself but I think you could use Javascripts FileReader API to check if the file exists. At least it might be worth looking into.
|
Lo-Fi Version | Time is now: 28th April 2024 - 06:15 AM |