quote:<p id="player1881">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
</p>
<script type="text/javascript">
var FO = {
movie:"player.swf",
width:" 200" ,
height:"200",
majorversion:"7",
build:"0",
bgcolor:"#FFFFFF",
flashvars:"file=/lynx/uploads/Flash/test.flv&showdigits=true&backcolor=0xABD7FE&showicons=true&image=bla.jpg"
};
UFO.create(FO, "player1881");
</script>
Niet al te ongeduldig doen he.quote:
Met een cookie?quote:Op woensdag 7 februari 2007 19:50 schreef Chandler het volgende:
Leuke vraag denk ik:
Stel ik wil een POPUP op een website en deze popup wil ik maar 1x laten zien! nu hebben genoeg mensen een popup blokker dus als mensen de pagina reloaden dan krijgen ze de popup niet meer te zien. Nu wil ik alleen de popup laten verdwijnen als de popup daadwerkelijk is geopend.. hoe realiseer ik dit?
Je kunt de popup het koekje laten bakkenquote:Op donderdag 8 februari 2007 09:25 schreef Chandler het volgende:
Cookie wordt toch ook aangemaakt wanneer de popup zich niet laat zien?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function popUp() { day = new Date(); id = day.getTime(); window['page'+id] = window.open('popback1.html', id , 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0'); } </script> <form method="post" name="userinfo"> <input type="text" name="name"><br/> <input type="text" name="cijfer"> - <a href="#" onClick="javascript:popUp();">Select</a><br/> <input type="submit" name="send" value="Verstuur"> </form> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | function returnVariable(formName, fieldName, content) { opener.document.forms[formName].elements[fieldName].value = content; } function wclose() { window.close(); } </script> <form name="cijfertjes"> <input type="text" name="cijfer"> <input type="submit" name="Verzend" onclick="returnVariable('userinfo','cijfer', this.form.elements['cijfer'].value); wclose();"> </form> |
1 2 3 | var returnvar='cijfer'; ...window.open('popback1.html?returnvar='+returnvar... |
1 2 | onclick=returnvariable(opener.returnform, opener.returnvar, this.form.elements['cijfer'].value)" |
1 2 3 | var returnform='userinfo'; var returnvar='cijfer'; |
1 2 3 4 5 6 7 8 9 10 11 12 | function colPalet(value) { day = new Date(); id = day.getTime(); var retvalue = value; window['page'+id] = window.open('./layout/layout_colors.html?varname=' + value, id , 'width=300,height=200,toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0'); } </script> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | function returnVariable(fieldName, content) { opener.document.forms['colortable'].elements[fieldName].value = content; } function wclose() { window.close(); } function SendColor(value) { alert(opener.retvalue); returnVariable(opener.varname, value) } </script> <MAP name=map_webpal> <!--- Row 1 ---> <AREA shape=RECT coords=2,2,18,18 href="javascript:SendColor('#330000')"> ... etc |
1 |
1 2 3 4 5 6 7 | var newdate = new Date(currentdate.substring(6,10), currentdate.substring(3,5) - 1, currentdate.substring(0,2)); newdate.setTime(newdate.getTime() - 86400000); newday = newdate.getDate(); newmonth = newdate.getMonth() +1; newyear = newdate.getFullYear(); changevalue(newday + "-" + newmonth + "-" + newyear,'chosendate'); |
1 2 | if (newmonth<=9) newmonth = "0" + newmonth; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | var currentdate = document.getElementById('chosendate').value; var newdate = new Date(currentdate.substring(6,10), currentdate.substring(3,5) - 1, currentdate.substring(0,2)); if (dir == 'left') newdate.setTime(newdate.getTime() - 86400000); else if (dir == 'right') newdate.setTime(newdate.getTime() + 86400000); newday = newdate.getDate(); if (newday<=9) newday = "0" + newday; newmonth = newdate.getMonth() +1; if (newmonth<=9) newmonth = "0" + newmonth; newyear = newdate.getFullYear(); changevalue(newday + "-" + newmonth + "-" + newyear,'chosendate'); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | Converts the date to string using provided formatting. %D = full date (%d/%m/%Y) %T = full time (%H:%i:%s) %Y = year (4 digits) %y = year (2 digits) %m = month (01 - 12) %d = day (01 - 31) %H = hours (01 - 24) %h = hours (01 - 12) %i = minutes (01 - 59) %s = seconds (01 - 59) %A = AM/PM %% = % */ Date.prototype.format = function(format) { format = format.replace(/%D/g, "%d/%m/%Y"); format = format.replace(/%T/g, "%H:%M:%S"); format = format.replace(/%Y/g, this.getFullYear()); format = format.replace(/%y/g, (this.getFullYear() % 100).toString().padLeft(2, '0')); format = format.replace(/%m/g, (this.getMonth () + 1).toString().padLeft(2, '0')); format = format.replace(/%d/g, this.getDate().toString().padLeft(2, '0')); format = format.replace(/%H/g, this.getHours().toString().padLeft(2, '0')); format = format.replace(/%h/g, ((this.getHours() + 11) % 12 + 1)); format = format.replace(/%i/g, this.getMinutes().toString().padLeft(2, '0')); format = format.replace(/%s/g, this.getSeconds().toString().padLeft(2, '0')); format = format.replace(/%A/g, (this.getHours() < 12 ? "AM" : "PM")); format = format.replace("%%", "%"); return format; } /* Pads a string on the left to a certain length with another string. */ String.prototype.padLeft = function(length, padding) { if (padding == '' || padding == null) padding = ' '; var result = this; var n = (length - this.length); if (n > 0) { while (padding.length < n) { padding += padding; } result = padding + result; result = result.substr(length - result.length); } return result; } |
1 2 3 | var s = d.format('%D %T'); alert(s); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <script type="text/javascript"> document.getElementById('display').innerHTML= 'test'; </script> </head> <body> <div id="display" name="display"> leeg </div> </body> </html> |
Ik begrijp niet wat ik fout doe?quote:document.getElementById('display') has no properties
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <script type="text/javascript"> function test(){ document.getElementById('display').innerHTML= 'test'; } </script> </head> <body onload="test()"> <div id="display" name="display"> leeg </div> </body> </html> |
Dit is de versimpelde versie, hij wordt aangeroepen door een functie die na een submit wordt aangeroepen.quote:Op dinsdag 27 februari 2007 16:08 schreef Geqxon het volgende:
Zo uit mijn hoofd zou ik zeggen dat het niet werkt omdat het javascript uitgevoerd wordt nog voordat de div "display" op het scherm getekend is / geinitialiseerd is. Misschien er een functie van maken, en die in de onload gooien?
Forum Opties | |
---|---|
Forumhop: | |
Hop naar: |