0

Hi, I'm making a 404 page, and I want it to display the current URL, but I don't want it to be server side. I don't know much about any variables are anything, so it would be nice if a nice person could give me all of the needed code and how to use it! :$
Thanks in advance!

2
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by keavon
0

Why certainly!!

As gained from here:

<SCRIPT LANGUAGE="JavaScript">
      <!--
      document.write("The current URL is : "+location.href)
      // -->
</SCRIPT>

You will need to modify it a bit to match the input you want for your 404 but that snippet will get you the URL of the current page the user is on.

Hope that helps :)

Edited by Lusiphur: n/a

0

Thank you SO MUCH!
Solved.
I have an other question about Javascript, but i'll post a new thread. Thanks!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.