Widget problem
-
[Moderator Note: Topic title amended. Your problem is no more urgent than anyone else’s.]
Hello all,
This is my first post here, so apologies if I am posting this in the wrong section.
The problem I have is on the website http://www.greekagribusinessawards.gr
As you can see on the left had side is a small menu (just two options, Organizers and Contact Us). As you can see it’s in two language, english and greek.
This menu was created in a widget. The complete code within the widget is:var thisLocation = window.location.href; var thisLocationEn = thisLocation.search("/en/"); if(thisLocationEn != "-1") { document.write('<div style="color:black;padding-bottom:40px;width:150px;margin:0 auto;font-size:16px"><img src="/gtf2013/wp-content/themes/gaf2013/images/GAgroF_velos_portokali.png" /><span style="padding-right: 10px;padding-left: 5px"><a href="'+thisLocation+'diorganwtes">ORGANIZERS</a></span><img src="/gtf2013/wp-content/themes/gaf2013/images/GAgroF_velos_portokali.png" /><span style="padding-left: 5px"><a href="'+thisLocation+'contact-form">CONTACT US</a></span></div>'); } else { document.write('<div style="color:black;padding-bottom:40px;width:150px;margin:0 auto;font-size:16px"> <img src="/gtf2013/wp-content/themes/gaf2013/images/GAgroF_velos_portokali.png" /><span style="padding-right: 10px;padding-left: 5px"><a href="'+thisLocation+'diorganwtes">ΔΙΟΡΓΑΝΩΤΕΣ</a></span> <img src="/gtf2013/wp-content/themes/gaf2013/images/GAgroF_velos_portokali.png" /><span style="padding-left: 5px"><a href="'+thisLocation+'contact-form">EΠΙΚΟΙΝΩΝΙΑ</a></span></div>'); }Can someone please helm me out and tell me what I am doing wrong?
-
Wrap your code in script tags.
<script> // code here </script>I tried what you suggested ( and thanks for the reply by the way)
and what happens is tha the <script> tags disappear as soon as I press save
The topic ‘Widget problem’ is closed to new replies.