Forum Moderators: open
<title><script>document.write(window.location.search.substring(1))</script></title>
I have some doubts since I am not certain whether the browser will evaluate the title before or after the javascript command is evaluated.
It would be certain to work if it was done server side with php,perl,asp,jsp,etc...
The whole reason I wanted to do this was to present a correct page title to SE's. I however find with this method (using sim spider from the tools here), that the file name of the html file is seen as the Title and not the dynamic Title generated.
It displays perfectly in the browser but the sim spider sees only the file name, in this case search.html
I think, (and I'm pretty stupid on this subject) what I'm looking for is not possible this way?
------------
<%@ LANGUAGE = JScript %>
<html><head><title><%=[CODE_HERE]%></title> -----------
Where
[CODE_HERE] is: 1)
Request.QueryString This is equivalent to the client-side,
location.search.substring(1). or, 2)
Request.QueryString("title") Gets the value for the title attribute (eg.
?title=bananas => bananas) If there is no title attribute in the query string, the output is an empty string.
If there are more than one, their values will appear separated by commas (but let's assume we won't be getting more than one in any query string).