
chrici
Members-
Content Count
31 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout chrici
-
Rank
Newbie
- Birthday 05/10/1992
Previous Fields
-
Languages
(X)HTML, CSS, Javascript, PHP
Contact Methods
-
Website URL
http://
-
ICQ
0
Profile Information
-
Location
Denmark
-
Oh yeah thanks! :)Then I think I will try an AJAX/PHP solution.
-
I have an XML file and I want to manipulate it from user input and save the changes to the same file. Is this possible with javascript? I know how to load the XML file and manipulate the nodes but not how to save it. I have tried to search google and the forums aswell as reading the tutorials but I have not been able to find anything
-
Because that I am the kind of person who learns by trying. This code is not for a client or a site.I read about event targeting some time ago and thought that I would like to learn it
-
You need to declare that it is a string in your javascript code.Otherwise javascript will think it is an integer or a variable. To declare it as a string put quotation marks around it: jsvar = "<?php echo $tempvar; ?>";
-
I tried to do it but it is not working.I am not passing anything into the functions event parameter. I am just doing what I have seen other sites do.
-
I have the following code. <!DOCTYPE html><html> <body> <p id="clickme">Click me!</p> <div id="new"></div> <script type="text/javascript"> document.onclick = function(event) { target = event.target || event.srcElement; if (target.id == 'clickme') { paragraph = document.createElement('p'); content = document.createTextNode('This is a test...'); paragraph.appendChild(content); document.getElementById('new').appendChild(paragraph); } } </script> </body></html> When the paragraph id="clickme" is clic
-
You should read this tutorial: http://www.w3schools.com/js/js_timing.asp :)You can delay a function using setTimeout. function popups() { setTimeout('alert(first)',1000); setTimeout('alert(second)',5000); setTimeout('alert(third)',10000);} When called this function will display the first alert after 1 second (1000 milliseconds), the second alert after 5 seconds and the third alert after 10 seconds.
-
You say that you are using the onkeyup event but in the code you are using the onkeydown event. Change that to onkeyup and I think it will work.
-
I would suggest that you read the MySQL part of the PHP tutorial.http://www.w3schools.com/php/php_mysql_intro.aspIn the tutorial you will learn to handle a MySQL database.
-
string.style.color; This is a property of the string and will (if declared) output the current color of the string. In order to change the color you need to assign the property with a value. For instance: string.style.color = "red";
-
Try to declare the desired font size.I can see that the font-size is 14px in Chrome, 13.5px in Firefox and 13px in Opera.
-
Yes - now it is working.And thank you very much!!
-
Yes - much easier.But it is still not working.I changed the anonymous function to: function(newelement,newtext) { newtxt = document.createTextNode(newtext); newel = document.createElement(newelement); newel.appendChild(newtxt); parent = this.parentNode; first = parent.firstChild; this.insertBefore(newel, first);}; The console in Chrome gives me the following message:Uncaught TypeError: Cannot read property 'firstChild' of undefinedI guess that there is something wrong with the use of "this"?
-
Hi all.I am learning javascript and therefore I create my own javascript experiments to learn it.In my latest experiment I want to append an element as the first child instead of the last.I managed to make it work but I also want to learn how to use objects aswell. This is the triggy part...I know this can be done with JQuery but I want to learn how to do it myself.Hope that you can help me :)This is the code: <!DOCTYPE HTML><html> <head> <title>Javascript test</title> <script type="text/javascript"> function element(element) { this.elementType = ele
-
Just found the the problem :)In the included file I am including another file. It is the path to the second included file that was problem.Thanks for your help!