279 Posted Topics
Re: Hi! I've read that you are just starting to learn PHP! Good :) It makes it easier to read your code if you have a few coding guidelines: >> Indent and comment your code, keeping statements and function calles seperated and clarified: [CODE] /* Doing something: */ doSomething(); /* Doing … | |
Hi, I've been working on a project that needs to list all the drives on a computer (it's kind of a file explorer, but without using the standard one provided by windows). I've searched and found the function [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364972%28v=VS.85%29.aspx"]GetLogicalDrives()[/URL], which does exactly what I want. However, the return value is … | |
Hi, In the past few months I've been learning how to make applications for android by making small games just for the fun of it. I am stuck at the moment at the database object I created to manage the database, specifically the cursor: it won't close. A snippet of … | |
Re: Hi! About a year ago I was working on a [URL="http://www.deltacdev.com/products/modern-text-editor/index.html"]text editor[/URL] which included highlighting and such, but also offered the functionality to insert BB-code, just like at DaniWeb. The basic idea of this is to retrieve the position of selected text, retrieve the text, embody it with BB-code and … | |
Re: Hi erixxye, As this is your first post to the forums, you might want to keep some things in mind: - Place code between CODE tags - When you post, first describe your problem, then post code But anyway, onto your issue. You are mixing up PHP with JavaScript. The … | |
Hi, At the moment I am trying to open a log file with notepad.exe while the original process continues. As I am developing for Windows, fork() is not available for me. I googled alot and found a good reference to opening processes ([url]http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html[/url]), however they all put the original process … | |
Hi, Recently I started working on a project (it's called 'fd') that needs to retrieve the current processes running. It is written in C using the WinAPI. I am running Windows XP SP3 and am using MinGW compiler with Code::Blocks. After much searching I found the PSAPI to provide the … | |
Re: Hi, Your code looks alright and should work. I think the problem lies in how you approach the page. When you look at your address bar when you are at request.html, is there a file path (e.g. C:\some\folder\request.html)? If so, you need to go to the file via the localhost: … | |
Re: Hi, In your code you defined that there are three variables needed to search for wine: - The color of the wine (e.g. red, white, or something like that), which I think is not really relevant but whatever - The country of origin, or more specifically a region - The … | |
Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for PHP! It uses a words file, on the bottom of this post you will see a small example of a few words. The source … | |
Re: If you want to shorten a URL, you either use only a .htaccess file or a combination of a .htaccess file and a PHP script. The basic principle: - Either admins or visitors (I don't know why you need to shorten URL's, perhaps as service or for usage on your … | |
Re: The below code will show the results just like you wanted: [code] <?php $query1 = "SELECT * FROM table1"; $result1 = mysql_query($query1); while ($row1 = mysql_fetch_array($result1)) { $qid = $row1['qid']; $qtitle = $row1['qtitle']; $query2 = "SELECT * FROM table2 WHERE qid='$qid'"; $result2 = mysql_query($query2); echo "<span style=\"text-decoration:underline; font-weight:bold;\">".$qtitle."</span><br />"; while … | |
Re: Try googling? [URL="http://www.google.com/search?&q=php+forum+open+source"]http://www.google.com/search?&q=php+forum+open+source[/URL] ~G | |
Re: Situation 1: The three men pay 30 pounds (Status: 30 pounds manager/porter, 0 pounds men) Situation 2: The porter/manager gives back 3 pounds and keeps 2 pounds (Status: 27 pounds manager/porter, 3 pounds men) So you can not add up 27 + 2, as the 2 pounds are already added … | |
Re: It really requires little work: [code] <script type="text/javascript"> function show(Id) { document.getElementById(Id).style.display="inline"; } </script> <span onmouseover="show('myImage')">Hover here to see the image!!!</span> <img src="someImage.jpg" id="myImage" border="0" style="display:none;" /> [/code] ~G | |
Re: A pocket PC is just like a regular computer, so you just need to do the following things (assuming you want to create dynamic sites using PHP & MySQL): - Install a Apache server, preferably with MySQL implemented: I would suggest XAMPP [url]http://www.apachefriends.org/en/xampp.html[/url] - Place the files into the xampp/htdocs/ … | |
Re: Well, you can: [CODE]<form action='' method='post' onsubmit='sendRequest(); return false;'>[/CODE] Keep in mind that you need to write the function yourself: retrieve all variables from the form and send them along with the AJAX request. Also you will have to notify the user that the form is submitted by hiding the … | |
Re: Well, you call the function calcHeight, however in your javascript code, the function is called calcheight , (notice the caption). Also your function just retrieves the height? I assume you have some code that sets the height of the iframe that you have not posted. ~G | |
Re: The book sounds like it has some good information on how to create web applications on the large-scale, but why is there a dog on the cover? Just wondering...;) | |
Re: Perhaps you could give us some code to work with? The description "the code was in js and html" is not really a full sourcecode ~G | |
Re: The event argument is automatically passed on with the function, alternatively you can use: [CODE]canvas.onmousedown = function(e) { return myDown(e); }[/CODE] I am not yet familiar with the HTML 5 javascript methods, but it appears as if the init() function formats the canvas into a moveable object, and then redraws … | |
Re: You can modify the styles of elements easily: Let's say you have some have an element with some text: [CODE]<span id='my_text' style='font-family:Arial;'>Some text</span>[/CODE] Then you can use JavaScript to change its font family: [CODE]document.getElementById("my_text").style.fontFamily = "Times New Roman";[/CODE] For all CSS properties and how to use them in JavaScript, see: … | |
Re: Look on: [url]http://en.wikipedia.org/wiki/Geometric_Shapes[/url] ~G | |
Re: You can handle the keys pressed on the keyboard: [CODE]document.onkeypress = function(e) { return HandleKey(e); } function HandleKey(event2) { var key; /* Retrieving the pressed key: */ if (window.event) { key = window.event.keyCode; //IE } else { key = event2.which; //firefox } /* Switching the pressed key: */ if (key … | |
Re: Line 1 - No document type? Line 2 - You forgot to add [ICODE]<title>MyTitle</title>[/ICODE] element Line 4 to 16 - Your script needs to be either within the <head> or within the <body> tag Line 20 - You did not add the id attribute: [CODE]<select name="box" id="box">[/CODE] Line 21 - … | |
Re: Do you mean that the form is loaded without the page being refreshed/changed or with the page refresh? Anyway, if the page is refreshed after the user pressed the button, you can just simply retrieve the form values using PHP and then echo that as values inside the full form: … | |
Re: Executing a file on your system, via javascript is only possible when people use Internet Explorer (as it is like a swiss cheese when it comes to security): [url]http://www.tek-tips.com/viewthread.cfm?qid=1226233&page=1[/url] ~G | |
Re: You can in fact make a timer (= interval) that increments the variable 'play_time' every second, untill it reaches the end of the length of the song. Then it resets the play_time and load a new song. I am not sure how you play the song, so you need to … | |
Re: The message will only pop up if you are submitting a form from the secure [url]https://*[/url] page to the [url]http://*[/url] page. If you do not submit a form, and just redirect the user using a header() or a regular <a> element, the warning you described will not be shown. ~G |
The End.