Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Xpages issue

Status
Not open for further replies.

pmonett

Programmer
Sep 5, 2002
2,632
FR
I have a db to design for web access. Being a web developer, I know how to use PHP and variables to set various things. Most importantly, I know that you can use the onclick event on an image to set a value, thus changing things when the page refreshes.

With that in mind, I developed my Notes db around a view that categorizes things by language. On the top right-hand corner of my Xpage, I have the familiar FR - RN that just about anyone these days should easily understand what they are for.

My idea is that, when the user clicks on the FR, the sessionScope "language" variable is set to French, when clicking on EN it is set to English.

Of course, there is an initial value (English") for this variable. When accessing the page for the first time, it correctly shows docs that are in the category English. If I set the initial value to French, it does show the docs in the French category.

But I just can't get the bloomin' link to do it !

My code :
Code:
<xp:link escape="false" id="lang1" text="FR">
	<xp:eventHandler event="onclick" submit="true" refreshMode="refresh">
		<xp:this.value>
			<![CDATA[#{javascript:
				sessionScope.put("language", "Français");
				return "/";
			}]]>
		</xp:this.value>
	</xp:eventHandler>
</xp:link>

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top