- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 14
- Posts with Upvotes
- 13
- Upvoting Members
- 13
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
65 Posted Topics
In all versions of Windows, there is the ability to press alt+tab to switch between application windows that are currently open. That's all fine and incredibly useful. The problem I have is how the ordering of these has changed since Windows XP. Let me explain... In Windows XP, when I … | |
Hi, all. I'm having trouble getting audio over a DVI-to-HDMI connection out of my video card. The video card supports audio over DVI by way of a 2-pin cable connecting the S/PDIF header on the motherboard to the video card. The motherboard is an Asus P5N7A-VM. The video card is … | |
Re: It is definitely possible to use $.ajax() within another jQuery function. I'm not sure what the issue is, but it is not that. One problem you are going to have once you do get the AJAX working is that you are potentially using the variable ReturnValue1 before it has been … | |
Re: As AleMonteiro said above, `.on()` is not a direct replacement for `.live()` because for `.on()` to work the element(s) must exist at the time `.on()` is called. See [jQuery.on API documentation](http://api.jquery.com/on/#direct-and-delegated-events) for more details on getting `.on()` to behave sort of like `.live()`. In your previous post, if `input.cancel_live` already … | |
Re: Do you want generate the entire table (document.createElement) using a loop and assign innerHTML, or just assign the innerHTML value using a loop? | |
Re: It's been a little while since I've worked on something like this, but the way I used to do it was to have a function called `requireLogin()`. I would call this function near the top of any page for which the user had to be logged in in order to … | |
Re: Try wrapping the `LIKE` arguments in single quotes: $user_query="SELECT * FROM rt_user WHERE rt_user_username LIKE '%".$_GET['term']."%' OR rt_user_name LIKE '%".$_GET['term']."%' OR rt_user_description LIKE '%".$_GET['term']."%' LIMIT 10"; Notice the single quotes around the `LIKE` strings? You should definitely take diafol's advice and sanitize the input instead of just directly injecting the … | |
Re: Per the jQuery [documentation](http://api.jquery.com/live/), "As of jQuery 1.7, the .live() method is deprecated." Instead it recommends that one "use [.on()](http://api.jquery.com/on/) to attach event handlers." For a click event, it could look like `$("button").on("click",function(){ /* blah blah code */ }`. | |
I noticed something today about Arrays in JavaScript that struck me as a bit odd. I imagine there is an easy explanation that will make perfect sense when I hear it, but until then I thought I would ask the community. If I use an Array as the sole component … | |
Re: I don't think `$_POST['IMAGE']` will contain anything, and therefore `$image` won't have anything either. You need to use `$_FILES['IMAGE']` instead. To see if a file was upload successfully you would do: if ($_FILES['IMAGE']['error'] === UPLOAD_ERR_OK) { // ... handle the uploaded file ... } `UPLOAD_ERR_OK` means file was uploaded successfully. … | |
Re: There are several issues I see right off the bat: In the Javascript file: 1. The function `getElementByName` should be `getElementsByName` (note the "s"). 2. The strings in the alerts need to be enclosed in quotes like `alert("please enter a number")`. Also you should put a semicolon after the alerts … | |
Re: pritaeas is right, you cannot mix call Javascript functions from PHP like you are trying to do. There are ways to achieve a similar effect, but there are better ways altogether. Try something like this. I would even take it further and merge the to `if` statements into an if-else, … | |
Re: How about this? while ($row = mysql_fetch_assoc($result)) { $dates[] = array( date("M,Y", strtotime($row["Datum"])), $row["forsta"] ); } | |
Re: You're setting the limit to 5 by using a `for` loop to only look at the first 5 results returned from the HTTP request. That is basically returning all of the data and then taking only what you need. This is not efficient. What you should be doing instead is … | |
Re: I can tell you what I would try. I would first try it without escaping the backslashes (i.e. `\r\n` instead of `\\r\\n`). Then try just using `\n` (without `\r`). If neither of those worked then I would try replacing the newlines with `<br>` (for HTML email). | |
Re: Are you passing the entire CSV file to MySQL or are you reading it line by line in a `while` loop? If reading line by line, then it's easy: do one read before the while loop to get the first row, then run the loop normally. <?php $csvHeadings = NULL; … | |
Re: Since neither link is working, I cannot see what you are talking about. However, my question is what is different about the two rendered select inputs? Does the dynamically-generated select contain more options than the static one or is it simply styled differently in such a way that it takes … | |
Re: What makes you think it's the access point? To me it sounds like a configuration issue or, even more likely, a virus or malware infection more so than a faulty access point. Do you have another computer or smartphone that you can connect to the wireless and see if it … | |
Re: It seems like it is working fine to me. I tried it on jsfiddle and locally and in neither case is it applying the margin to div#nav. I applied a border to each div in order to make it more clear. http://jsfiddle.net/dcdruck/gU6t9/1/ What browser are you using? I'm using Chrome. | |
Re: Line #9 in your JavaScript needs quotes around `Null` because you want to compare it to the string `'Null'`. I think that should fix your issue. if (ContactReason == "Null") { alert("Please Enter a Contact Reason"); return false; } | |
Re: What about adding `margin-left:0;` to the `.menubar UL` style? Could you also provide the HTML? | |
Re: Like LastMitch explained, without having more context it's unclear exactly what you are after. If you're just trying to append the value in $d to the value in $first_data, you would use the contatenation operator. `$first_data .= $d;` or `$first_data = $first_data . $d;` | |
Re: I doubt this is possible in JavaScript alone. You probably want to look into using Flash or Java to try to accomplish this. If you are compressing the file only for transfer and then immediately uncompressing it once it's on your server, is it really worth it? What type of … | |
Re: In my experience, a blank screen after making a change in PHP usually indicates some fatal error is happening in the PHP. You can try turning display_errors on and setting error_reporting to E_ALL. Also be sure to check the path in your include statement to make sure it is correct. | |
Re: What information are you trying to get that you aren't getting from `history`? The `history` command lists all of the commands that have been executed by your user account. If you are looking for a particular command or commands, you can pipe history to grep to filter out what you … | |
Re: I did a quick implementation in JavaScript but took a different approach. I look at the day first to see if it's greater than 15 or not. I created a five-element array of the seasons with 'winter' appearing both as the first and last elements of the array. Then I … | |
Re: I can't seem to reproduce what you're describing. It works fine for me when I copy only a select few lines. I've pasted into Eclipse, Notepad++, and regular old Notepad.exe and they all retain proper formatting. I'm using Chrome. | |
Re: The password to log in to the operating system (e.g. Windows) or is the whole hard drive encrypted and you need the password to decrypt the hard drive before the system will even boot the OS? Or is it a BIOS password (unlikely). | |
Re: Can you post the CSS code and the relevant HTML for the table? Maybe you have a CSS rule that's overriding what you're trying to do in JavaScript. | |
Re: I think you should be able to do that. Are you getting an error or just an empty resultset? | |
Re: It seems like your algorithm for each turn is not only randomly choosing a position on the board, but is also randomly choosing which player's turn it is (X or O). What you really want to be doing is choosing a random position on the board only and alternating whose … | |
Re: What do the values of EventDate look like before you do STR_TO_DATE()? Maybe you can post the output of `Select EventDate, DATE_FORMAT(EventDate, '%b %d, %Y') from details Order by STR_TO_DATE(EventDate, '%d-%m-%y')` so that we can see the real value and the computed value side-by-side. Just an aside, but do you … | |
Re: In the line `<a href="#" onClick="document.write('P');>P</a>` you are missing the closing `"` for the onclick event. If you set the onclick listener to `"document.getElementById('a').innerHTML += 'P'"` then it should add a letter 'P' to the div each time you click on it. <html> <body> <a href="#" onClick="document.getElementById('a').innerHTML += 'P'">P</a> <div … | |
Re: If you have another computer available that works, I would use an external hard drive enclosure for this to backup your files to the working computer. An enclosure can be picked up [fairly inexpensively](http://www.newegg.com/Store/SubCategory.aspx?SubCategory=92&name=External-Enclosures). Make sure you get one that matches the size (2.5" or 3.5") and interface (SATA vs … | |
Re: Or, if you have the printer hooked up to a computer that is always on and you just want to access the printer from another computer on the network, you can look into Windows built-in printer sharing feature (assuming you are running Windows). The print server that JorgeM suggested is … | |
![]() | Re: There is no good way that I know of to do this. The real question I have is why can't you allow the user to have two instances of the same session open? I did find a thread on SO that discusses a similar-sounding problem with an interesting solution: http://stackoverflow.com/questions/2178604/preventing-multiple-browser-sessions-on-the-same-server-session |
Re: You have a typo in your script tag: `text/javscript` should be `text/javascript`. (Missing the second 'a' in 'javascript'.) You also have a typo in your function `Grader()` ('finals' vs 'final'). The line that gets the value of the Final Exam reads: var am4=parseFloat(document.getElementById('final').value*0.30); but it should be: var am4=parseFloat(document.getElementById('finals').value*0.30); Fix … | |
Hi. I am currently in a position where I am having to learn Perl in the context of developing a website using Embperl. I am at a point where I have a few subroutines that I would like to try off-loading to a separate file and then including that file … | |
Re: You can just store data for all years in the one table and have your report query return only those records with a particular year value. An index on the column that contains the year would probably help this as well. However, if that's not desired, the other thing I … | |
Re: While the methods proposed above are the best ways to handle this, there is another way to do this which involves mostly PHP and only a single line of Javascript. The caveat is that it causes a page refresh whenever the category dropdown is changed in order to get a … | |
Re: I don't think window.event is part of the standard. This might be helpful though: http://stackoverflow.com/questions/9813445/why-ff-says-that-window-event-is-undefined-call-function-with-added-event-list | |
| |
Re: If you have HTML tags between `<textarea></textarea>` tags, they will be treated as plaintext content in the textarea, not as HTML tags. The browser will not interpret them as HTML tags, but will basically convert the < to < and > to > and you will see the tags printed … | |
Re: While I do think that Echo89 and mustafaneguib are correct (that you might be better off using one of their suggested methods instead), I think your code will work if you update the URL that you are redirecting to in your confirmBox function. If you notice, you were on the … ![]() | |
Re: See the PHP documentation for this function here: [http://us2.php.net/mysql_query](http://us2.php.net/mysql_query) Per the documentation, it states that `mysql_query` will return a resource upon successful execution of a SELECT query, but will return a boolean FALSE upon failure of such a query. In your instance, `mysql_query` is returning false because MySQL cannot process … | |
Re: It sounds to me like your CMOS battery is probably dead. This is usually a button cell type battery located on the motherboard somewhere. If this is a desktop PC, it should be pretty easy to replace. However, if it is a laptop, it can be quite a chore. I … | |
Re: <?php $temp='123'; ?> <div id="<?php print $temp; ?>"></div> OR <?php $temp='123'; print '<div id="'.$temp.'"></div>'; Either of those will do the trick. You can also use `echo` instead of `print`. | |
Re: I know there's a way that you can dynamically declare variable names, but I'm not exactly sure what the syntax looks like, so I'll let someone else chime in with that. In the mean time, could you use an array? [CODE] $count=1; $strDisk = array(); foreach ($disk as $device) { … | |
Re: Why not just insert the new user record into the database when they request the account, but have a field called "confirmed" or "verified" which initially is set to 0 (zero). When the admin confirms the account, simply make it a 1 (one). Then all you have to do is: … |
The End.