Problem with this html code - every time i see the dead bird :(



  • Hello guys!

    After installing version 2.3.1440.41 (Stable channel) (64-Bit) i get the dead bird every time when sending the form! It is ok in the chrome browser version Version 72.0.3626.96 (Offizieller Build) (64-Bit)!

    Here is the code:

    <!DOCTYPE HTML>
    <html>
    <head>
    	<meta http-equiv="content-type" content="text/html" />
    	<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
    	<meta name="referrer" content="no-referrer">
    	<title>Jahreskarte Graz Antrag Check</title>
    
        <style>
    		body {
    			font-size: 1.0em;
    			font-family: Calibri, sans-serif;
    			text-shadow: -1px -1px 10px grey;
    		}
    
    		.diver {
    			width: 10px;
    			height: 10px;
    			border: 1px dotted grey;
    			float: left;
    			border-radius: 5px;
    			margin-left: 2px;
    		}
        
        button, input {
          box-shadow: 2px 2px 10px 0 #808080;
          border-radius: 10px;
        }
    
    		</style>
    		<script type="text/javascript">
        
          function ms(){
    				  document.getElementById('OK2').value = "Alles OK";
    					document.forms[0].submit();
            }
    			document.onkeyup = function(evt){
    				console.log(evt.keyCode);
            if(evt.code == "NumpadAdd")
            {
              document.location.href = "Antrag_Check.php?NEW=1";
            }
    				if(evt.code == "NumpadEnter")
    				{
    					document.getElementById('OK2').value = "Alles OK";
    					document.forms[0].submit();
    				}
            if(evt.code == "NumpadDecimal")
    				{
    					document.getElementById('NOK').value = "Kein Antrag";
    					document.forms[0].submit();
    				}
    				if(evt.code == "NumpadSubtract")
    				{
    					if(document.getElementById('mimg').style.width == "0px")
    					{
    						console.log("mimg1");
    						document.getElementById('mimg').src = "http://10.15.25.1/JG/foto.php?foto=261354";
    						document.getElementById('mimg').style.width = "200px";
    					} else
    					{
    						console.log("mimg2");
    						document.getElementById('mimg').style.width = "0px";
    						document.getElementById('mimg').src == "http://10.15.25.1/JG/blank.jpg";
    					}
    				}
    			}
    		</script>
    
    
    </head>
    
    <body>
    <table>
        <tr>
            <td style="vertical-align: bottom;">
    OK<br /><br /><span><span>261354000</span> <a style="text-decoration: none;" href="http://graz.at/otcs/cs.exe?func=magic.browse&cno=261354" target="_blank">&rarr;</a>
    
    </span><br /><br />Vorname Name<br /><br />Adresse<br /><br />PLZ<span style="background: lightgreen;">ORT/span><br /><br />29-10-1984<br /><br /><!--ÖBB: <span style="background: lightgreen">Mobil</span><br />Marketing: <span style="background: lightgreen"></span><br />-->ausgestellt Magic am: 05-02-2019<br /><br />Dateien im Ordner: <br /><span id='' style='cursor: pointer;' onclick='document.getElementById("show_pdf").src = "show_pdf.php?file=S:/000/000/000/261/261354/Jahreskarte Graz/Antrag_2019.PDF&name=00261354.PDF"'>Antrag_2019.PDF Datum: 05-02-2019</span><br /><span id='' style='cursor: pointer;' onclick='document.getElementById("show_pdf").src = "show_pdf.php?file=S:/000/000/000/261/261354/Jahreskarte Graz/Antrag_2018.PDF&name=00261354.PDF"'>Antrag_2018.PDF Datum: 25-01-2018</span><br /><span id='' style='cursor: pointer;' onclick='document.getElementById("show_pdf").src = "show_pdf.php?file=S:/000/000/000/261/261354/Jahreskarte Graz/Antrag_2017.PDF&name=00261354.PDF"'>Antrag_2017.PDF Datum: 06-02-2017</span><br /><br /> von 529 Datensätzen<div style="position: absolute; left: 1000px; top: 490px; z-index: 10000;">PLZ<span style="background: lightgreen;">Ort</span></div><div onclick="ms();" style="cursor: pointer; border: 1px solid red; position: absolute; left: 1000px; top: 450px; z-index: 10000;">Zuname</div><!--<div style="position: absolute; left: 1000px; top: 670px; z-index: 10000;">Marketing: <span style="background: lightgreen"></span></div><div style="position: absolute; left: 1000px; top: 630px; z-index: 10000;">ÖBB: <span style="background: lightgreen">06769454533
    </span></div>--><div style="background: red; position: absolute; left: 1000px; top: 530px; z-index: 10000;">Datum: 06-02-2017</div><div style="position: absolute; left: 1000px; top: 670px; z-index: 10000;"><img id="mimg" src="http://10.15.25.1/JG/blank.jpg" style="width: 0px;" alt="" /></div><!--<div style="background: none; background-color: transparent; border: 2px dotted red; position: absolute; left: 500px; top: 700px; width: 350px; height: 150px; z-index: 2;"></div>-->	<script type="text/javascript">
    		function selectElmCnt(elm) {
    		// for Internet Explorer
    		if(document.body.createTextRange) {
    			var range = document.body.createTextRange();
    			range.moveToElementText(elm);
    			range.select();
    		}
    		else if(window.getSelection) {
    			// other browsers
    			var selection = window.getSelection();
    			var range = document.createRange();
    			range.selectNodeContents(elm);
    			selection.removeAllRanges();
    			selection.addRange(range);
    		}
    	}
    
    	</script>
    
                <form action="Antrag_Check.php" method="POST">
                    <input type="hidden" name="KNR" value="00261354" />
    								<input type="hidden" name="DATUM" value="15-02-2019" />
    								<input type="hidden" id="OK2" name="OK2" value="" />
                    <input type="hidden" id="NOK" name="NOK" value="" />
                    <input onfocus="this.style.height = '50px';" onblur="this.style.height = '';" type="submit" name="OK" value="Alles OK" />
                    <input onfocus="this.style.height = '50px';" onblur="this.style.height = '';" type="submit" name="NOK" value="Kein Antrag" /><br />
                    <input onfocus="this.style.height = '50px';" onblur="this.style.height = '';" type="submit" name="NOK" value="Falscher Antrag" />
                    <input type="text" name="KNRR" value="" />
                </form>
            </td><td>
    <iframe id="show_pdf" src="" style="box-shadow: 2px 2px 10px 0 #808080; border-radius: 30px; width: 630px; height: 890px; left: 500px; top: 0px; z-index: 1;" ></iframe>        </td>
        </tr>
    </table>
    PDF-Source: show_pdf.php?file=S:/000/000/000/261/261354/Jahreskarte Graz/Antrag_2017.PDF&name=00261354.PDF<br /><script type="text/javascript">
    	window.onload = function()
    	{
    		document.getElementById('show_pdf').src = 'show_pdf.php?file=S:/000/000/000/261/261354/Jahreskarte Graz/Antrag_2017.PDF&name=00261354.PDF';
    		//console.log("now");
    		//document.getElementById('maker').src = "Antrag_Check.php?make=1";
    	}
    </script>
    </body>
    </html>
    

    I don't know what's the problem?!

    Thx for your help!

    LG Klaus



  • How are we supposed to test this? The html alone doesn't throw an error in the browser of course.



  • It looks like the code loads a PDF. There have been issues with PDF tabs crashing, so it might be related to that instead.

    I've just tried to make a basic html that only contains an iframe (to a local pdf file) and a button, and I do find that about 50% of the time, the page crashes when it is loaded.

    However, when the PDF points to a real URL on the internet, it doesn't crash. Maybe it's an issue with local pages?

    <button onclick="document.querySelector('iframe').src='http://africau.edu/images/default/sample.pdf'">x</button><iframe src="http://africau.edu/images/default/sample.pdf">
    

  • Moderator

    You may start Vivaldi, open chrome://flags and Enable flag for

    • debug-packed-apps
    • silent-debugger-extension-api

    Restart Vivaldi.
    Now you can inspect a tab with Developer Tools and check in Console what went wrong.



  • @ Gwen-Dragon - Thx for your hint - but can't find the problem till now. So i decided to convert the pdf to jpg and no problem any more!


 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.