Keb hem hier in FF getest, maar hier werkt hij niet:quote:Op vrijdag 29 januari 2010 11:27 schreef Skonk het volgende:
Ons spelletje is af!
www.rockpaperscissorsultimate.tk
Werkt hier in FF/3.6.quote:Op vrijdag 5 februari 2010 21:57 schreef Ericjuh het volgende:
[..]
Keb hem hier in FF getest, maar hier werkt hij niet:
Ik zie btw dit:
[ afbeelding ]
3.5.7 heb ik hier btw.. voor de rest blokkeer ik geen javascript ofzo.quote:
Misschien moet je vragen of ze er een bril bij kunnen leverenquote:Op vrijdag 5 februari 2010 22:01 schreef Ericjuh het volgende:
Omg.. ik ben zo'n sukkel! lezen is moeilijk. Werkt inderdaad in FF. Vulde alleen mijn naam op de verkeerde plaatst inFail.
quote:Op vrijdag 5 februari 2010 21:47 schreef Chandler het volgende:
Weet iemand een tutoriaal of kant en klaar scriptje dat het volgende doet / kan.
Ik wil plaatjes uit een ajax gegenereerde div kunnen slepen naar een textarea en dan op de positie plaatsen waar ik de cursus op los laat, dus niet achteraan toevoegt..
Anyone?
automagisch?quote:Op vrijdag 5 februari 2010 23:10 schreef ralfie het volgende:
[..]
gebruik firefox of chrome, die doen dat automagisch al
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 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Sleep afbeelding in input text field</title> <script type="text/javascript"> if(typeof window.ActiveXObject != 'undefined' && navigator.platform.indexOf('Win') != -1){ document.ondragstart = function(){ if(event.srcElement.nodeName == 'IMG'){ event.dataTransfer.setData('TEXT', '[img]' + event.srcElement.getAttribute('src') + '[/img]'); } } } </script> </head> <body> <img src="http://www.cartoons.be/wp-content/garfield.gif" alt="een willekeurig plaatje" /> <form action="" method="post"> <textarea name="haha"></textarea> </form> </body> </html> |
1 2 | var LinknaarHuidigeOmgeving = Locatie.substring(Locatie.substr(0, 28) + Locatie.indexOf('/', 10) + 1, Locatie.indexOf('/', 31)) |
1 |
1 |
1 2 3 4 5 6 7 8 9 10 | <input type="text" value="DOOR JAVA SCRIPT VERBORGEN DE TEXT : HTTP:// wat iemand in vult EN WEER DOOR JAVASCRIPT TEXT : .NL* "> <buttom name=submit value=modify> <script type="text/javascript" name="JAVASCRIPT NAAM1"> de code om de form dingen te doen </script> <script type="text/javascript" name="javascript code2"> de code om de input te kopieren naar javascript code3 </script> <iframe src="JAVASCRIPT CODE3"></iframe> |
1 2 3 4 5 | <!-- function navigateUrl() { frames['iframeidorname'].location.href = document.form.text.value; } // --> </script> <form action="" enctype="application/x-www-form-urlencoded" method="post" name="form" onClick="navigateUrl();"> <label for="text">URL: </label> <input id="text" name="text" type="text"> </form> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | window.addEvent('keydown', function(event){ if($('float')) { if (event.key == 'l' && event.shift){ if ($('float').hasClass('DivHidden')){ $('float').set('class', 'DivVisible') } else{ $('float').set('class', 'DivHidden') } } } }) }); |
quote:
1 2 | setTimeout(2000, function() { popupWindow.close(); }); |
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 | <HEAD> <STYLE TYPE="text/css"> <!-- tr.over { font-family:arial; font-size:12;background-color: #3399ff; color: #FFFFFF; } tr.out { font-family:arial; font-size:12;background-color: #FFFFFF; color: #000000; } --> </STYLE> <script type="text/javascript"> var url; function insertdata(link) { url = link } function showdata(){ return url; } </SCRIPT> </HEAD> <BODY> <table width=590 border=0 style="padding:0px; border-collapse: collapse;"> <tr><td>MAAK EEN KEUZE</td></tr> <tr class="out" onclick="insertdata('een.html');" onmouseover="className='over'; this.style.cursor='hand';" onmouseout="className='out';"> <td>een</td></tr> <tr class="out" onclick="insertdata('twee.html');" onmouseover="className='over'; this.style.cursor='hand';" onmouseout="className='out';"> <td>twee</td></tr> <tr class="out" onclick="insertdata('drie.html');" onmouseover="className='over'; this.style.cursor='hand';" onmouseout="className='out';"> <td>drie</td></tr> </table> <input type=button onClick="location.href=showdata();" value="Go >>"> </BODY> </HTML> |
Ik heb het er in gezet en 'kleurtje' veranderd in 'red'. Helaas krijg ik een foutmelding datquote:Op donderdag 11 maart 2010 17:40 schreef KomtTijd... het volgende:
euh, onclick=this.parentNode.getElementsByTagName('tr').style.background='none';this.style.background='kleurtje'
Ik vraag me af waarom ik dit nog zeg ipv een linkje naar google te plaatsen...
1 |
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 | <head> </head> <body> <table> <tr id="1" onclick="this.style.backgroundColor='blue'; document.getElementById('2').style.backgroundColor='white'; document.getElementById('3').style.backgroundColor='white';"/> <td>Click to change the color</td> </tr> <tr id="2" onclick="this.style.backgroundColor='blue'; document.getElementById('1').style.backgroundColor='white'; document.getElementById('3').style.backgroundColor='white';"/> <td>Click to change the color</td> </tr> <tr id="3" onclick="this.style.backgroundColor='blue'; document.getElementById('1').style.backgroundColor='white'; document.getElementById('2').style.backgroundColor='white';"/> <td>Click to change the color</td> </tr> </table> </body> </html> |
Ja stupid getElementsByTagName geeft natuurlijk een array terug. Toch maar even een for-loop maken dus.quote:Op donderdag 11 maart 2010 17:53 schreef Etimm het volgende:
[..]
Ik heb het er in gezet en 'kleurtje' veranderd in 'red'. Helaas krijg ik een foutmelding dat
[ code verwijderd ]
leeg is.
Blijkbaar krijgt hij de waarde van tr niet mee :S
Als ik de volgende code gebruik werkt het zoals ik wil. Omdat er uiteindelijk nogal wat rijen komen is dit geen goede oplossing. Hoe kan ik hiervan een functie maken? Wat javascript betreft ben ik echt een "Dummie"![]()
[ code verwijderd ]
Hey, ik scheld jou toch ook niet uit?quote:Op donderdag 11 maart 2010 18:19 schreef KomtTijd... het volgende:
[..]
Ja stupid getElementsByTagName geeft natuurlijk een array terug. Toch maar even een for-loop maken dus.
kun je me een voorbeeldje geven? kan ik de tr's een zelfde id geven?quote:Op donderdag 11 maart 2010 18:13 schreef Darkomen het volgende:
Doet moet je niet inline gaan doen.
Maak een functie die door alle tr's van je tabel loopt.
Geeft je tr's een id en bepaald daarop de kleur.
http://w3schools.com/js/js_loop_for_in.asp alsjeblieft.quote:Op donderdag 11 maart 2010 18:30 schreef Etimm het volgende:
[..]
kun je me een voorbeeldje geven? kan ik de tr's een zelfde id geven?
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | <HEAD> <SCRIPT type="text/javascript"> var status=false; var wissel=false; function ChangeStatus(selected) { if (selected) { if (wissel) { status=false; wissel=false; } else { status=true; wissel=true; } } } function ChangeColor(tableRow, highLight) { if (status) { } else { if (highLight) { tableRow.style.backgroundColor = '#3399ff'; } else { tableRow.style.backgroundColor = 'white'; } } } </SCRIPT> </HEAD> <BODY> <table width=590 border=0 style="padding:0px; border-collapse: collapse;"> <tr><td>MAAK EEN KEUZE</td></tr> <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="ChangeColor(this, true); ChangeStatus(true);"> <td>een</td></tr> <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="ChangeColor(this, true); ChangeStatus(true);"> <td>twee</td></tr> <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="ChangeColor(this, true); ChangeStatus(true);"> <td>drie</td></tr> </table> <input type=button onClick="location.href='#';" value="Go >>"> </BODY> </HTML> |
Forum Opties | |
---|---|
Forumhop: | |
Hop naar: |