First one is used for pop-up window when someone press an icon for changing language on the website, second one is in other part of the html code and it is used for the gallery. If I remove the first line, the second works perfectly.Thanks in advancePS: I can post the entire code if needed

sdleihssirhc
—
2012-01-27T20:01:27Z —
#2

All <a> tags need to be closed, so just based on the HTML you posted, I imagine that the top one is being left open, the browser thinks that the second one is a child of the first, and that messes with the JS. But that's a wild guess. If you link to a live example, I could investigate a little more thoroughly. (And if you were feeling particularly awesome, you could link to a version that has the first line, and then another version that doesn't, so that we could compare.)

Nikolay_Ivanov
—
2012-01-27T20:07:28Z —
#3

Give few minutes to make the links and upload them, it's not the <a> tag, cause it's closed on proper place. The code works fine on the other pages, but on this one there is js gallery and that's why it has problem, something with the java that I use for the gallery is messing up.

Nikolay_Ivanov
—
2012-01-27T20:16:38Z —
#4

Ok, here is the link: http://www.eccofarm.com/jsSo, on the first page, I've put the js code for the flags of English language and Greek language. So far so good, works fine.On page Галерия(Gallery, the one before the last in the menu) I've tried to do the same for the English language button. So I just copied the code, that works fine on the first page. And it's not working fine;

Also, I have made bad positioning for the flags, don't pay much attention, will fixed it later.

sdleihssirhc
—
2012-01-28T04:09:34Z —
#6

Okay, I think I figured it out.

The "htmlExpand" method is only created in the "highslide-with-html.js" file. However, all of your code in "highslide-with-html.js" is wrapped in a giant if block:

if (!hs) {
// create the object and all of its methods,
// including htmlExpand
}

But on your gallery page, the "highslide-with-gallery.js" script runs first. It creates an "hs" object, so none of the code in "highslide-with-html.js" gets executed.

The quickest fix would be to add another if in your "highslide-with-html.js" script:

if (!hs) {
// create the entire object
} else if (!hs.htmlExpand) {
// the object exists, but not the method you want
// so just create the method
}

However, you'd probably be better served in the long term by refactoring all of your scripts. I imagine that if one method got left out, others did as well. Who knows how many bugs you'd have to keep chasing down...

Nikolay_Ivanov
—
2012-01-28T11:28:01Z —
#7

Thank you very much dude. This pop-up windows will stay until i translate the pages in the different languages. May be you can advice me to use something else to show a warning message, which will not be in conflict with the JS Gallery?

Nikolay_Ivanov
—
2012-01-28T13:07:14Z —
#8

Never mind, I figured it out with new JS code. Will posted later if someone wants to take a look. Greetings and thank you very much.