FUNCTION:  URL.getReferer

URL.getReferer()
 
The URL.getReferer function returns the smallest relative URL for the resource (the referer) that called the current file. This returned URL is relative to the base URL of the current file. The empty string "" is returned if the current file does not have a referer. Note that local function calls cannot change the referrer.
 
This function does not take a parameter.
 
Code for GetRefererExample.wml
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

<card id="card1">
   <p>
   getReferer example
   </p>
   <do type="accept">
      <go href="GetRefererExample.wmls#findgetreferer()" />
   </do>
</card>

<card id="card2">
<p>
   referer = $(refer)
</p>
</card>

</wml>

 
Code for GetRefererExample.wmls
extern function findgetreferer()
{
   var ref = URL.getReferer();
   WMLBrowser.setVar("refer", ref);
   WMLBrowser.go("GetRefererExample.wml#card2");
};


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information