I am trying to create a statement that shows a line of JavaScript, if the current page URL is given a given Matches the string you entered. Here are some fake codes:
If the URL mail ("example.com/sitename/") then the response. Type ("& lt; script = 'file.js' & gt; & lt; / script & gt;") End if The problem is how do I check that the current page's URL matches string or not?
Many thanks!
Thanks for your reply I am trying to make it a bit more complicated with an array of possible URL matches. I made the following asap, but it does not work properly The script is being written on the page where the URL does not match. Is there something that seems wrong? I can not understand it!
& lt;% lower page URL page URL = request Server ("SERVER_NAME") & amp; Request for each URLNPP in URLRRR. ("URL") URLRRE = Array ("example.net/folder1/", "example.net / folders2 /") If the URLRRR (page URL, ULLPPET) answers then. Type ("& lt;! - Exchange -> Script Type = 'Text / JavaScript' src = 'script.js' & gt; & lt; / script & gt; & lt ;! - END EXCLUDE - & Gt; ") and finally if the next & gt%; This should match the URL that matches example.net/folder1 and example.net/folder2, but it also matches example.net folder3!
Try
if requested. Server ("URL") = "/myurl.com/script.asp" then 'do stuff end if
Comments
Post a Comment