|
Post by uwienand on Aug 1, 2012 15:36:34 GMT
Hello experts,
...I need to setup my own form using virutal html in antenna. Because the cgi behind generates some pages I need to get the current language setting (to bring it into a hidden field within the form). The problem is: I do not find how to get the current language-setting...
Anyone out there who has some needful informations on that for me? Thanks in advance.
cu Uwe
|
|
|
Post by uwienand on Aug 1, 2012 18:13:24 GMT
Hello experts,
...again I...
Some more informations: I setup a textbox (Id: text753nshyg) within my multilingual-pages and set the content to "de" or "en" depending on the language setting. To hide the textbox I set the opacity to "0".
For the form I added a virtual-html-element with the following content in body-section:
<script type="text/javascript"> function getLang(){ document.gaga.lang.value=documents.getElementById("text753nshyg").value ; } </script>
<form name="gaga" action="http://localhost/cgi-bin/kws/kws.pl" method="get"> <p><input name="lang" type="hidden"></p> <p><input name="blabla" type="text" size="25" maxlength="25"></p><br><br><br> <p><button type="submit" onclick="javascript:getLang();" width="50"> <img src="../grafic/accept.png" alt="ok..." align="center"> </button></p> </form>
It seems that no information will be brought to input-element "lang". The Perl-CGI does not get a parameter for that. So, what do I wrong?
cu Uwe
|
|
|
Post by explorer on Jun 23, 2015 8:12:10 GMT
Hello to all,
this question is not solved. But for me this topic is also interessting. Is there any solution?
|
|
|
Post by explorer on Jul 1, 2015 9:54:04 GMT
Ok, this little js function works for me ;-) Three languages (de (standard), en and ja) are setting for the site assumed. Whithin a visual html object:
<script>
function GetLanguage() { var _myurl= document.URL; var str="de";
if (_myurl.lastIndexOf("_ja") != -1) {str="jp"} else if (_myurl.lastIndexOf("_en") != -1) {str="en"} return str; } </script>
|
|