/    Sign up×
Community /Pin to ProfileBookmark

passing a value from a HREF to the page you are on.

Hi
I am trying to change a static html page from one language to another, by clicking on a HREF on that page.
The language translation is taken care of by passing in a value to the java middle layer.
The javascript function to return the chosen language is done and working fine.
I just don’t know how to tell the page that the value has changed and that it should refresh to display the new language.

My href is as follows.
<a> href = “thispage.jsp” > Language1 </a>

<a> href = “thispage.jsp” > Language2 </a>

So if i click on the href, how do i tell the page to refresh with the new value

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 17.2006 — You'll probably want to use a URL query string, something like:
[code=html]
<a href="thispage.jsp?lang=1">Lanugage 1</a>
<a href="thispage.jsp?lang=2">Language 2</a>
[/code]

I don't know the JSP syntax, but I know it has some sort of access to the URL query values (as does JavaScript, too, if that's where you need to do the processing).
Copy linkTweet thisAlerts:
@pcthugMay 17.2006 — The following demonstrates how to include the value of a request parameter in the generated output:[code=html]
<%= request.getParameter("lang") %>
[/code]
×

Success!

Help @Bluepill spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...