Resolutie probleem? En een ander probleem.

Status
Niet open voor verdere reacties.

javahulp

Gebruiker
Lid geworden
20 apr 2013
Berichten
5
Wat is de beste manier om te zorgen dat mijn website net zo goed(of net zo slecht :p) er uit ziet op jou scherm als op mijn scherm?
Oh en en hoe ken ik de er voor zorgen dat mij verwijzing naar ander website geopend worden in een venster of tabblad?
PHP:
<html>
<head><title>Combine the basic</title></html><link rel="icon"href="http://imageshack.us/a/img138/2917/logonyu.jpg" type="image/png"/>
<style type="text/css" language="css">
.links
{
margin-left: 0%;
margin-top: 1%;
width:20%;
background-image:url('robzombie.jpg');
height: 30%;
}

.hoofdtitle
{
margin-left: 10%;
margin-top: -20%;
width: 90%;
background-image:url('zombie.jpg');
height: 31%;
}

.menu
{
margin-left: 10%;
margin-top: 2%;
width: 90%;
background-image:url('greenblack.jpg');
height: 100%;
}


p.title
{
font-size: 100px;
font-family: Bodoni MT Black;
margin-left: 450px;
color:red;
}

p.ondertitle
{
font-size: 80px;
font-family: Bodoni MT Black;
margin-left: 120px;
margin-top: -20px;
color:#FFFFFF;
}

p.schrijfmenu
{
font-size: 50px;
font-family: Bodoni MT Black;
margin-left: 0px;
margin-top: -40px;
color:#3ADF00;
}

</style>
<script language="JavaScript">

function Mijbest()
{
beste = window.document.formulier.bestevdw.selectedIndex
window.location.href = window.document.formulier.bestevdw[beste].value;

}

function Mijbest1()
{
beste = window.document.formulier1.bestevdw.selectedIndex
window.location.href = window.document.formulier1.bestevdw[beste].value;
}

 function vraagInvoer()
    {
    var getal = new Array();
    var input;
    while((input = prompt("Voer het wachtwoord in?", '')) != "basis")
    {
    getal.push(input*1);
    }
    return getal;
    }
	
	var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.userAgent,
			subString: "Chrome",
			identity: "Chrome"
		},
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari",
			versionSearch: "Version"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			   string: navigator.userAgent,
			   subString: "iPhone",
			   identity: "iPhone/iPod"
	    },
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();
	
alert("U gebruikt " + BrowserDetect.browser + " " + BrowserDetect.version + " en je besturing systeem is " + BrowserDetect.OS); 
 alert( "De som van alle ingevoerde getallen is: "+som(vraagInvoer()) );
	
	
	
	
</script>
</head>
<body bgcolor="#B40404">

<div class="links">
<font color="#0404B4" size="5px"><b> Menu:</b></font>
<br>
<FORM NAME="formulier1"><font color="#D7DF01" size="3px"> Andere interne pagina:<br><br></font>:
<select name="bestevdw" onChange="Mijbest1()">
<option value="j5.html" name="Maak een keuze!">Kies gerust!.</a>
<option value="http://www.google.nl" name="google">pagina2</a>
<option value="" name="http://www.google.nl">pagina1</a>
<br>


</select>
</form>


<FORM NAME="formulier">
<form name="formulier"><font color="#D7DF01" size="3px"> Andere externe pagina:<br><br></font>:
<select name="bestevdw" onChange="Mijbest()">
<option value="j5.html" name="Maak een keuze!">Kies gerust!.</a>
<option value="http://www.google.nl" name="google" >Google</a>
<option value="http://nl.hardware.info/" name="DOS">Nlhardware.info</a>
<option value="http://tweakers.net/" name="tweakers">Tweakers</a>
<option value="http://nl.hardware.info/" name="DOS">Nlhardware.info</a>
<option value="http://www.codecademy.com/" name="codeacademy">Codecademy</a>
<option value="http://nl.hardware.info/" name="DOS">Nlhardware.info</a>
<

</select>
</form>


<form name="bgcolorForm"><font color="#D7DF01"> Kleurachtergrond:<br> <Br></font>
<select onChange="if(this.selectedIndex!=0)
document.bgColor=this.options[this.selectedIndex].value">
<option value="choose">Kies achtergrond kleur 
<option value="#B40404">Basis kleur
<option value="#F7FE2E">Geel
<option value="#0000FF">Blauw
<option value="#01DF01">Groen
<option value="#A4A4A4">Grijs
<option value="310101">Bruin
<option value="#2E2E2E">Donker Grijs
<option value="#0B1907">Donker Groen
<option value="#070719">Donker Blauw
<option value="#AEB404">Geel/groen
<option value="#3B0B0B">Donker Rood
<option value="#000000">Zwart
<option value="#FFFFFF">Wit
<option value="#61210B">Donker Oranje
</select></form>
</div>

<div class="hoofdtitle">

<p class="title">Hoofdpagina</p>
<p class="ondertitle">HTML,CSS,JAVA in deze website</p>
</div>

<div class="menu">
<p class="schrijfmenu">
<br>

<br><br>
<p class="schrijfmenu">Voorlopige is er op dit moment nog geen tekst<br>
<hr><br><br>

<p class="schrijfmenu">
Nog steeds bezig met de website.
Zoals youtube zou zeggen:  team of highly trained monkeys has been dispatched to deal with this situation 
<hr>
<p class="schrijfmenu"><br>
Links  kent u de achtergrond kleur aanpassen<br>
Ook kent u daar naar een andere pagina<br>
</p>


</div>


</body>
</html>
 
Antwoord op vraag 2 is: <a href="link" "target=_blank">tekst van link</a>
 
Antwoord op vraag 1 is: er is geen manier om dat voor elkaar te krijgen.
Je hebt altijd te maken met een client. De client heeft zijn eigen resolutie, eigen browser, eigen addons.
Daarom kun je dit niet echt voor elkaar krijgen. Probeer zoveel mogelijk browsers te testen en daarvan zoveel mogelijk versies.

Wat ook wel handig is is om je code door een html validator te halen:
hierdoor voorkom je dat elke browser zijn eigen weg kiest als jij niet volledig aan de richtlijnen voldoet:
http://validator.w3.org/check
ik haalde je code erdoorheen en er kwamen 30 errors uit...
 
Ik heb de meeste foute er uit...
Maar alleen deze 2 errors:
No Character Encoding Found! Falling back to UTF-8.

None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents.

Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document.

Unable to Determine Parse Mode!

The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because:

the MIME Media Type (text/html) can be used for XML or SGML document types
No known Document Type could be detected
No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document.
No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">) could be found at the root of the document.
As a default, the validator is falling back to SGML mode.

<FORM NAME="formulier1"> <p class="font"> Andere interne pagina:</p>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

Ik snap niet hoe ik deze ken oplossen
 
Laatst bewerkt:
No Character Encoding Found!
In de <head> van de pagina moet de zogenaamde charset staan, d.w.z. een beschrijving van de lettertekens die gaan volgen (voor de interne codering in machinetaal ofzo). Anders kunnen browsers niet weten hoe ze bv. met accenttekens moeten omgaan. Het beste is om "UTF-8" te nemen.
Hoe de html-regel er uit moet zien, hangt van je Doctype af.

Is je Doctype: html4.01 of xhtml1.0, dan wordt het:
HTML:
...
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
... enz.
Is je Doctype: html5, dan wordt het:
HTML:
...
<head>
<meta charset="utf-8">
... enz.
=======
<FORM NAME="formulier1">
Een <form> moet altijd de eigenschap action="..." hebben, eventueel een lege action="" als er niets moet gebeuren.

Met vriendelijke groet,
CSShunter
 
De volgende fout mededeling krijg ik nog die ik niet ken oplossen... (ik gebruikte <meta http-equiv="content-type" content="text/html;charset=utf-8" />)


Line 4, Column 67: NET-enabling start-tag requires SHORTTAG YES
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

For the current document, the validator interprets strings like <FOO /> according to legacy rules that break the expectations of most authors and thus cause confusing warnings and error messages from the validator. This interpretation is triggered by HTML 4 documents or other SGML-based HTML documents. To avoid the messages, simply remove the "/" character in such contexts. NB: If you expect <FOO /> to be interpreted as an XML-compatible "self-closing" tag, then you need to use XHTML or HTML5.

This warning and related errors may also be caused by an unquoted attribute value containing one or more "/". Example: <a href=http://w3c.org>W3C</a>. In such cases, the solution is to put quotation marks around the value.

Line 4, Column 68: character data is not allowed here
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
 
Ah, sorry: ik was onvolledig. Het moet als volgt zijn.

Is je Doctype: html4.01, dan wordt het:
HTML:
...
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
... enz.
Is je Doctype: xhtml1.0, dan wordt het:
HTML:
...
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
... enz.
Toelichting:
  • Bij xhtml moet een losse tag (zonder eigen eind-tag) altijd self-closing zijn, d.w.z. eindigen met />.
  • Bij gewone html moet dit juist niet: daar eindigen de losse tags als <meta>, <br> enz. alleen met een >.
Kennelijk gebruik je een html4.01 Doctype, en dan protesteert de html-validator tegen de slash. :)
De tweede gesignaleerde fout is een vervolg-fout, die verdwijnt vanzelf als de eerste is gecorrigeerd.
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan