This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 8, 2011, 2:26 PM
170 Posts
topic has been resolvedResolved

Get hash part of URL

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 3
 Is it possible to get the hash part of the url if you do a reload of a page that has this set ?
 
www.xpagedeveloper.com/test.xsp#U=Start 
 
if the above example I would like to get U=Start 
Nov 8, 2011, 3:19 PM
149 Posts
Re: Get hash part of URL
 You can only set and get hash values using client side javascript
 
/Thomas 
Nov 11, 2011, 9:32 PM
6 Posts
Take a look at the xspUrl object...
var url :XSPUrl = context.getUrl(); print(url.getFragment()); Use url.setFragment("newValue") to set it...
Nov 12, 2011, 4:03 PM
149 Posts
Not working
I tried to use  url.getFragment() in a computed value but that does not work
 
if set and get the fragment in the same computedField it shows the value set.
 
So this works, but it is pretty useless. 
 
var url = context.getUrl();
url.setFragment("Test");
"fragment= " + url.getFragment()
 
 
So.... 
 
#1. I cant get hold of the fragment value using getFragment()
#2. the setFragment method does not update the address bar url
 
 
 
- Thomas 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal