Anchor problems with Opera and Chrome

Sorry Ryan. I had missed your post. Feel proud to be promoted!..

Lte’s try again: no good. nothing happens!

Can you be more specific, nothing happens when you click the button? Or when you click Upload from the following dialog?

1 Like

Hi

I get as far as choosing a file “From my device” but when I press “Upload” nothing happens!

Success!!! It would not work with IE9 but works with Chrome.

Look forward to some help on the original issues.

Thank you

Thanks for the screenshot which confirms that we are all looking in the right place.:slight_smile:

Unfortunately , I am still unable to reproduce the bug and it seems strange that you can reproduce it on another computer quite easily as I doubt they will be running the same plugin/extensions/virus software etc. New windows can often be intercepted by things like adblocker causing them not to work properly.

There does seem to be a number of bugs with fragment identifiers and re-directs but doesn’t seem to apply in your case.

It is a mystery indeed and perhaps we need some more people to test this out and see if they can replicate the bug which may help narrow down the problem.

The only drastic thing I can suggest is that perhaps you do away with the horrible new window and just show the data in a CSS popup (lightbox effect) instead which is much more friendly as it doesn’t spawn windows all over the place.

It would be interesting though to get to the bottom of this.

1 Like

Hi Paul

First of all, many thnks for your persistence and I am happy to read that you want “to get to the bottom of this”.

I know someone very experienced who tested it first by downloading the files into his computer, and then uploading them to his server. He could not replicate the problem. But when he went online he got exactly what I get. Besides, if you looked at the link I sent you from the Opera forum, someone there also confirmed the problem. My daughter’s computer has the same problem on Chrome (she doesn’t have Opera).

On the assumtion that we have the same versions, say of Chrome, if you go into http://pintotours.net/Americas/DomRepublic/StoDomingo.php

then press consecutively the various anchors of “Major attractions” you may get them all, rarely, to show in the right place, the first time you do it, but if you try again when you click on “parque Mirador” you get “Los Tres Ojos” instead, which is the last item.

I have checked with the host to see if this could be a problem at their end but they say it cannot be.

I agree that I may have to change the code, but the fact is that it works fine in IE, Firefox, and Safari, and I am pretty sure that it worked well in the past, both in Chrome and Opera. Apparently their rendering engine is the same and it could be that there have been changes in the code recently that introduced a bug.

One again, many thanks

One interesting fact is that if you press “Parque Mirador” you end up immediately in "Los Tres Ojos, but if then you use F5, while you’re still hovering over “PM” you see PM briefly before it moves to LTO. Something seems to be forcing it down.

Also, if you use the right mouse and open in new window you get PM always without any problem

Hi,

I’ve been trying repeatedly but cannot reproduce this issue at all so it seems that my set up isn’t affected by this bug.

What I would usually suggest at this point is to start making tests and changing one item at a time to see if we can find where the bug creeps in. A likely target would be this code you have at the bottom of the popup which I can see flashing when the popup opens and then hides when your js gets hold of it.

		<div class="ad" id="popup-test"> <a href="StoDomingo.php" target="_blank">
				<h3>Visit the Dominican Republic pages</h3>
				</a> <a href="StoDomingo.php"><img src="/Pinto/images/whitelogo75.jpg" title="Home" alt="Home button" style="border:none"/></a> </div>
		<!-- close ad --> 

Your js takes that code and changes it to:

Close

I would suggest removing the js from the top of the page that references that code and then just putting the html above directly into place by default. test that out and if the problem is still there then that can be discounted from the list of possible causes.

(Also its worth noting what I said earlier and some Virus software and adblockers may remove elements that have classes or ids of ‘ad’ as they guess they might be ads.)

1 Like

Hi Paul

I did as you told me. Removed the script from the top and still the same. I will change things back in an hour or so so that you can see.

I’m still seeing the old code in place. Did you revert back already?

I see a logo flash and the text change when the popup loads.

It’s probably got nothing to do with the issue but was worth a try :smile:

1 Like

No!

I took this one out, and am coming to the conclusion that it was not doing anything anyway…

 <script type="text/javascript">
 <!--
 function popup(url)
 {
  params  = 'width='+screen.width;
  params += ', height='+screen.height;
  params += ', top=0, left=0'
  params += ', fullscreen=yes';

  newwin=window.open(url,'windowname4', params);
  if (window.focus) {newwin.focus()}
  return false;
 }
 // -->
 </script>

…and I took the rest also but it did not make any difference to the missing PM in Chrome and Opera

If I understand what you’re saying, you’re having an issue with the Parque Mirador Sor link opening up to Los Tres Ojos in your popup. If that’s what you’re asking, I can duplicate it.

I think it’s because your html is seriously malformed. There are numerous instances of opening paragraph links with no closing. I know you’re supposed to be able to be leave them out, but I’ve often found that not making the browsers interpret is a better approach than being quick and dirty and hoping the browsers get it wrong (or blame the browsers - which some do).

I’ve gone through and cleaned up the html very quickly. Replace your sightsStoDom.html file with this markup and see if that resolves your issue.

<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>What to see, Santo Domingo, Dominican Republic, tourist sites</title>
	<link rel="stylesheet" href="/Pinto/infoBig.css">
	<style>
	a
	{text-decoration:none;
	color:blue;}

	h2 {
		display: inline;
		
	}
	h4 {
	color:blue;
	}
	</style>
	<!--Google analytics-->
	<script type="text/javascript">

	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-40629899-1']);
	  _gaq.push(['_trackPageview']);

	  (function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();

	</script>
	<script type="text/javascript">
	(function() {
	   'use strict';

	function init(){
	  
	if(window.name=='newwindow') {
	document.getElementById('popup-test').innerHTML=
	   '<h3><a href="#">Close<\/a><\/h3>'+
	   '<h4><\/h4>'+
	   '<h3><a href="StoDomingo.php" target="top"><\/a><\/h3>';
	var anc=document.getElementById('popup-test').getElementsByTagName('a');
	for(var c=0;c<anc.length;c++) {
	anc[c].onclick=function() {
	   window.close();
	   return false;
		}
	   }
	  }
	 }
	   window.addEventListener?
	   window.addEventListener('load',init,false):
	   window.attachEvent('onload',init);

	})();
	</script> 
 </head>
 <body>
	<div class="box">
		<h3>Attractions in Santo Domingo</h3>
		<h4>Zona Colonial</h4>
		<p>The Colonial Zone offers a lot to see.</p>
		<p>It was near this place, on the eastern side of the Ozama River that Bartholomew Columbus, the brother of Christopher Columbus, founded the first settlement in 1496. In 1502, the settlement was destroyed by a hurricane and Nichol&#225;s de Ovando, Bartholomew’s successor, rebuilt Santo Domingo on its present site, on the western bank of the Ozama River. Its layout became a blueprint for many New World cities.</p>

		<div class="ad">
			<img src="images/ZonaColon2.jpg" title="Zona Colonial" alt="The Zone Colonial of Santo Domingo">
		</div>
		<div class="credit">
			<a href="richie2.html" rel="nofollow" target="_blank" >Photography by Richie Diesterheft</a>    
		</div>
		<p>One of the oldest structures in the Colonial Zone is Casa del Cord&#243;n. Built in 1502, it was the home of Diego Col&#243;n, the son of Columbus and the viceroy of the  Spanish colony. He lived there until the completion of the Alc&#225;zar  (1510-1514), which became, then,  the new viceroy’s residence. The Alc&#225;zar was thoroughly restored in 1957 and, nowadays, it displays a collection of items owned by the Governors overseeing the colony in the period from 16th to the 19th centuries. Of particular interest is the 16th century furnishings and other belongings of Diego Col&#243;n and his wife Maria de Toledo. The street where Do&#241;a Maria used to promenade with her court ladies received the name Calle de las Damas. On this street stands the Ozama Fort, another old structure of the Colonial Zone. The fort is praised as the oldest military fortification in the Americas. Inside, the 18, 5 meters tall Torre del Homenaje (the Homage Tower) was named to honor the conquest of Hispaniola – the island shared between the Dominican Republic and Haiti. The fort and the tower have a dual symbolic meaning. First, because it was from this fort that numerous expeditions of conquest began: Hern&#225;n Cort&#233;s, to M&#233;xico; Diego Vel&#225;squez, to Cuba; Francisco Pizarro, to Peru; Alonso de Hojeda, to Venezuela; Vasco N&#250;&#241;ez de Balboa, to Panama; and Ponce de Le&#243;n, to Puerto Rico. And second, because the Homage Tower displays the flags of those nations that attempted to dominate this country: Spain, England, France, (Greater) Colombia, Haiti and the USA. From the top of the tower opens a spectacular view towards the Caribbean coast and the entrance to the Ozama River. </p>
		<p>The major attraction in the Colonial Zone is the, predominantly Gothic, Cathedral of Santa María la Menor. Built of solid limestone in the period 1514-1544, it is the first cathedral in the Americas. The Dominicans claim that the relics of Columbus were kept here until recently, when they were transferred, in 1992, to a place specially designed for the purpose in the Faro a Col&#243;n-  the Columbus Lighthouse.</p>
		<div class="ad">
			<img src="images/ParqueColon2.jpg" title="Parque Colon" alt="Parque Colon in Santo Domingo">
		</div>
		<div class="credit">
			<a href="richie.html" rel="nofollow" target="_blank" >Photography by Richie Diesterheft</a>    
		</div>
		
		<h4 id="att1">Malec&#243;n</h4>
		<p>The Malec&#243;n (the word meaning a sea wall) stretches along the George Washington Avenue running the length of the  Santo Domingo’s oceanfront from the port near the Colonial Zone. The Malécon is a popular place for promenades, particularly on Sundays when the traffic is diverted from this area to give space to pedestrians.
		Along this waterfront boulevard there are several large hotel and casino complexes and plenty of small restaurants, clubs and cafes.</p>
		<p>The Malecón is a place for romantic rides in an old-style horse carriage. Many large events in the city life throughout the year happen on the Malecón, and  include the Carnival in February-March and the Merengue Festival in  the last week of July, and the first week of August (but check the dates, as they may change). The Merengue is a lively Caribbean dance with its origins in the island of Hispaniola. It is the equivalent of the Cuban rumba or the Brazilian samba.</p>
		<h4 id="att2">Columbus Lighthouse</h4>
		<p>The Columbus Lighthouse (Faro a Col&#243;n) is a huge monument to Christopher Columbus, built in 1992 to commemorate the 500th anniversary of the island’s discovery. The remains of the great explorer were removed, on that occasion, from the Santa Maria Cathedral and placed in the lighthouse. The memorial is 210 metres long, 34 metres wide, and 46 metres high. There are 157 beams of light that emanate towards the sky from this monumental lighthouse. It is clamed that those beams can be seen at great distances, even reaching neighbouring Puerto Rico.</p>
		<p>There is a museum here with displays from different countries influenced by Columbus’s discoveries, colonization, and evangelization of the Americas. The museum is closed on Mondays.</p>
		<h4 id="att3">Parque Mirador Sur</h4>
		<p>The Parque Mirador Sur is in the western part of the city. This beautiful park is near the Avenida Anacaona, the place where most of the embassies are. The park is popular spot for daily walks, jogging, roller-skating and cycling. The park has stone caverns that in pre-Columbian days were inhabited by Ta&#237;nos, the local Indian people. One of those caverns was currently transformed into the famous discotheque &ldquo;La Guacara Ta&#237;na&ldquo;. The place is worth a visit to appreciate its exuberant interior and for shows and events that are staged there.</p>
		<h4 id="att4">Los Tres Ojos</h4>
		<p>In a different part of town, the Parque Mirador Este, about ten kilometres from the city centre, is known for its natural lime stone caverns filled with water. The lagoons, poetically called "ojos" make up the “Tres Ojos” (three eyes). These once subterranean lagoons, which collapsed to form and expose small open-air lakes. They  contain water of varied and vivid colours, which drain into the lakes from underground currents. Usually the visit starts with Laguna Azul that has sky blue water; the next lake to visit is Lago del Frigorifico (Fridge Lake). It’s name is due to its waters having a constant temperature of +2&#176; C. The lakes and lagoons in the park can be crossed by boat for an extra fee. The third lake takes visitors to a beautiful stalactite grotto with views over the lush tropical forest. The place was recently used as the setting for Tarzan movies.</p>
		<div class="ad" id="popup-test">
			<a href="StoDomingo.php" target="_blank"><h3>Visit the Dominican Republic pages</h3></a>
			<a href="StoDomingo.php"><img src="/Pinto/images/whitelogo75.jpg" title="Home" alt="Home button" style="border:none"/></a>
		</div><!-- close ad -->
	</div><!-- close box -->
 </body>
</html>

Hi Dave

Many thanks. I have to go out now, but will have a go at it latwer on and et you know. I am sure you’ve cracked it!

many thanks

Hi Dave

Half the problem solved! Unfortubnately the other half still misbehaving. I uploaded your file to the server and it works in Opera but not in Chrome

PS - I spoke too early: now it’s back to where it was in Opera too…

Are you sure? I’m looking at the source and it looks EXACTLY the same as it did before I edited it.

It doesn’t work here. Are you using the same versions of Chrome and Opera (mine 38.0.2125.104 m and 25.0.1614.50 on Windows7

Your code is still live

PS- Please note that someone else found that the problem only exists online, not LOCALLY.

Dave

Could you give me an example of what you wrote about the html code, please?

There are numerous instances of opening paragraph links with no closing.

I’m reading this bit again. What do you mean? That it is the code I had before and not what you sent me? The code is still what I uploaded to the server, having got it from you. As you can see there are various black losangles which were produced by your code.

I couldn’t replicate the problem using Firefox, but I could using Chrome.

I wonder if it might be related to character encoding?

Sorry, I am unable to validate this document because on line 67 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

The error was: utf8 “\x92” does not map to Unicode

1 Like

Hi Mittineague

The present code is that given me by Dave. In the code that I use I changed all the foreign accents to HTML encoded characters to see if it made any difference; it did not!

Firefox is fine (so is IE and Safari) The problem is only with Chrome and worse still with Opera where the problem is over several pages.