-
Thanks Troy for your reply. I'm trying to replace \ with : in code below, but it's no working. Any help or advise as usual is greatly appreciated.
cmCreatePageviewTag("<<label id="myDiv1"></label>>","<<label id="myDiv2"></label>>");
<script type="text/javascript">
document.getElementById("myDiv1").innerHTML = window.location.pathname;
document.getElementById("myDiv2").innerHTML = top.location.pathname.replace(/\\/g,":").replace( /\/[^\/]*$/, ":" );
alert("cmCreatePageviewTag(\"<" + window.location.pathname + "," + top.location.pathname.replace(/\\/g,":").replace( /:[^:]*$/, ":" ) + ">\")");
</script>
-
Nevermind guys, here is the solution below plus uppercase function:
cmCreatePageviewTag("<<label id="myDiv1"></label>>","<<label id="myDiv2"></label>>");
<script type="text/javascript">
document.getElementById("myDiv1").innerHTML = window.location.pathname.split('/').join(':').toUpperCase();
document.getElementById("myDiv2").innerHTML = top.location.pathname.replace(/\\/g,"/").replace( /\/[^\/]*$/, "" ).split('/').join(':').toUpperCase();
</script>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks