719 Posted Topics
| |
Re: Not Tested: var timer = { // ID of div to display the time divId: "myDivId", // Used to store the div object div: undefined, // Used to store the interval object interval: undefined, // Used to store the current time currentTime: 0, // Initialize timer init : function() { … | |
Re: There's lots of ways of doing it, the more sofisticated are with JavaScript, but it can be done easily done only with CSS, using position `fixed`. See a example: <!DOCTYPE html> <html> <body> <style type="text/css"> #content { width: 500px; font-size: 30px; } #banner { position: fixed; top: 50px; right: 50px; … | |
Re: You should seach for `javascript scrolling banner` or `javascript floating banner` or `javascript fixed banner`. There's a lot of results, but only a few demos. Also, this is not an PHP question, it's DHTML/CSS/JavaScript. If you don't want to use javascript search for `CSS scrolling/floating banners`. Good luck | |
Re: In my opnion, if you want to learn you shouldn't use any frameworks. To learn you have to code it all. The more you code the more you'll learn. Choose and language and go hardcore with it. I'd suggest PHP or C#, the top two languages in web development today … | |
Re: Try alerting the value you are submiting to see if it's ok. I also suggest that you use your browser Network Profiler (in development tools) to analyse if the request is being made, and if so what's is being sent and what's being recieved. var valToEdit = edit_form.user_edit.value; alert("Editing: " … | |
Re: I'm not sure, but maybe this will help you: <!DOCTYPE html> <html> <head> <title>TEST</title> <style type="text/css"> /* Generated by F12 developer tools. This might not be an accurate representation of the original source file */ #wrapper { border: 1px solid red; width: 100%; height: 43em; } #page { margin: 0px … | |
Re: I find this most usefull: http://colorschemedesigner.com/ | |
Re: Div's width by default is 100% of it's parent. In your case I think it would be easier to use an <span>, wich the width just wrap it's content. Or you can set display: inline to the div, wich will make it just wrap it's content. | |
Re: You didn't say what is the problem or what you don't know how to do it. So, let me suggest you something, test your getdat.php in the browser and see what is the result. | |
Re: The loop seems fine. Try trimming the word, maybe it's getting an white space from the text file. And just to be sure reset the value of the text box before inserting the dashes. | |
Re: Using AJAX you can show the content to the user in the browser, but not download it. For downloading a file see this link: http://php.net/manual/en/function.readfile.php or this one: http://www.terminally-incoherent.com/blog/2008/10/13/php-file-download-script-straming-binary-data-to-the-browser/ | |
Re: You need to show the div when `msg === true`: $('#result').html(quantity+' items'); $('#result').show(); // OR, using chaning $('#result') .html(quantity+' items') .show(); Also, this is very ugly and with poor performance: `$('input:text#quantity').val();` Use just `#quantity` or as you are already inside the event scope, you could use just `$(this)`. So, I … | |
Re: Like this: ///For 2nd Schedule Interview $('#cbmSSId').bind('change', function(e) { e.preventDefault(); var value = $(this).val(); if ( value == 'Interviews' ) { $('#Interviews').bPopup(); } else if ( value == 'Something Else') { } else { } }); | |
Re: I think it's ok, but I'd use more like this: function isDuplicate(names,phone,email,adresa){ var isduplicate=false; for(var i=0,il=addresslist.length, addr; i<il, addr=addresslist[i]; i=i+1){ if( addr.names.toLowerCase()==names.toLowerCase() && addr.phone.toLowerCase()==phone.toLowerCase() && addr.email.toLowerCase()==email.toLowerCase() && addr.adresa.toLowerCase()==adresa.toLowerCase() ) { isduplicate=true; break; // Stop loop if it's duplicated } } return isduplicate; } // Verify if value is only number … ![]() | |
Re: Like this: $(document).ready(function () { $('input').change(function () { window.onbeforeunload = function () { return "You still have unsaved changes!" }; }); $("#mySubmitButton").click(function() { window.onbeforeunload = undefined; // OR window.onbeforeunload = function() {}; }); }); | |
Re: There's probally a simpler way, but this should work: var myString = "Hello Word"; var counters = {}; // Count letters for(var i=0, l=myString.length,c; i<l, c=myString[i]; i=i+1) { if ( typeof counters[c] != 'undefined' ) { counters[c] = 1; } else { counters[c] = counters[c] + 1; } } // … | |
Re: First of all, you shoudln't have multiple elements with the same ID. ID selectors only return the first element. So, use class instead of id in this case: `<div class="categorie"> ` Then you should use the attribute selector of jQuery for selectiong an element with an specific `cat` attribute. Like … | |
Re: I think the best solution is to put the connection string in the app.config file under the <connectionString> section. Then, use the name of the connection string as the name of the machine. Then, in the code, get the connection string by the name of the machine. | |
Re: There's a couple of syntax errors in your code, try like this: $(function(){ var $a = $("#content"); $a.append('<div class="scrollbar"><%--some content here-----%></div>') }); And I'm assuming that yout scrollbar function uses the class `scrollbar` to add the functionality. But keep in mind that the function must be called after this append. | |
Re: If I understood correctly this should be a good implementation for you: http://valums.com/files/2009/menu/final.htm And this is how it's done: http://valums.com/scroll-menu-jquery/ | |
Re: I don't think so. It should be like this: $.ajax({ url: 'addressbook.php?action=saveContact', data: { name: name, phone: phone, email: email, adresa: adresa }, dataType: 'json', type: 'post' }); | |
Re: So just don't use the onMouseOut event. You just have to handle onMouseOver to change the images/content. | |
Re: But the example posted does reload the whole page. It's a simple redirect to the same page with different parameters. | |
Re: You can check if the screen width/height is the same of the window width/height. Actually you have to use `screen.availHeight` to get the screen height without the taskbar. Something like this(not tested): if ( screen.height == window.height ) { // FullScreen Mode } else if ( screen.availHeight == window.height ) … | |
Re: You can either create the checkboxes in the form design view and use an ID for each one. Or you can create then dynamicaly at run time using some loop. | |
Re: Here is how you do it: function putTime(x,y) { var theDate = new Date(x*1000); // convert time value to milliseconds var now = new Date(); // Now var dif = theDate.getTime() - now.getTime(); // Difference between dates in millisseconds // Date is in the past if ( dif < 0 … ![]() | |
Re: If it does what it should do, then it's OK. Complexity doesn't mean quality. Complex codes could be a result of one(or a combination) of various cases: - Too much and too complex functionalities - Security reasons (complex code are more dificult to analyse, copy and break) - Performance reasons … ![]() | |
Re: I really didn't understand what you are trying to do. You have an array and you want to delete an random item of that array? Is that it? ![]() | |
Re: Hi, if you check the default example in http://jqueryui.com/autocomplete/ you'll see that the default functionality is exactly what you want. You don't need any extra event handling to make this happen. Try updating to the last version of jQuery UI. | |
Re: Hello and welcome to DaniWeb. I don't wish to be rude, but please search a little bit in this forum and you'll you find a lot of great answers to your questions. There's a similar post about learning and starting with Web Developemnt every week. We're here to help and … | |
Re: Try `Integer.toString(a)` or `String.valueOf(a)` | |
Re: JavaScript is very dynamic, so you can use OOP in various ways. Take a look at a couple of examples: // ------------------------- // Using Prototype var MyPrototype = function () { // do something }; MyPrototype.prototype.MyMethod1 = function() { return this.MyMethod2(); }; MyPrototype.prototype.MyMethod2 = function() { return "something"; }; // … | |
Re: I think it could be something like this: if(!empty($secondMenus)) { $backgroundColor = $idMenuParent == 2 ? 'blue' : 'gray'; ?> <div id="secondary-menu-main"> <div id="secondary-menu-items" style="background-color: <?php echo $backgroundColor; ?> "> <?php foreach($secondMenus as $secondMenu) { | |
Re: Have you set margin, padding and border to 0? If you set the height/widht to 100% and have padding/margin the scroll will show. This kind of stuff is very trick and browser compability doesn't help either. I had the need to do a very sofisticated interface fit in a large … | |
Re: The only way to store that in the client with only JS is cookies. If you have an server-side script you can store in a session object or an database. | |
Re: I think there's no problem, it's good. If they already have the data in excel it's the easiest way to update the DB. Couple months ago I did an web app so the user could upload the excel and import to the SQL DB. If you are thinking of doing … | |
Re: If you're planning to make various date/time calculations and does not have much experience with JS or does not want to code a lot, I suggest you use the DateJS lib. I've used in a couple of projects and it works very well. http://www.datejs.com/ | |
Re: I'd start parsing the text file data into a object model and keep it in an list, like `List<Product>`. Then I'd use the generic sorting functionalities for performing the sort, this you can see at http://www.codeproject.com/Tips/323985/Sorting-using-Csharp-Lists | |
Re: I used and liked very much this JS chart API: http://www.highcharts.com/ Hope it helps. | |
Re: I'd say the best way to handle the address bar text is using Regular Expression. Or if just want to check if it's a valid URI, use this: `Uri.IsWellFormedUriString(YourURLString, UriKind.RelativeOrAbsolute)` | |
Re: Nobody is here to do you work for you, we're here to help. And nobody wants to help someone that wants everything done for him. | |
Re: Are you talking about an windows aplication or web? | |
Re: I think your want to make `int` comparisson, if sou use `parseInt(document.getElementById('min').innerText)`. If it's float, use `parseFloat()`. Using `>` and `<` with string will not do you any good. | |
Re: I think the most important aspect of your app is to have the list of the hospitals with their address. If you have it, building the app is quite simple. For what plataform are you planning on develop? | |
Re: You'll have to use an Neural Network to identify the images, I think it's the only decent way of doing it. This is a nice and simple tutorial wich may help you: http://neuroph.sourceforge.net/tutorials/android_image_recognition_using_neuroph.htm | |
Re: A master page have a single a html file (.aspx). But the master page can hold any number of user defined controls or you can have multiple nested master pages. It really depends on what you are trying to do. | |
Re: You need to use the same name on all the radios, then the valeu submited will be that of the selected one. | |
Re: This should get you started: http://php.net/manual/en/book.json.php http://php.net/manual/en/ref.json.php | |
Re: Why do you have to use a cursor? I suppose the quotes table have the user id, right? So you can make just one delete, like this: DELETE FROM Table_Quotes WHERE user_id NOT IN ( SELECT user_id FROM users WHERE user_name LIKE '%SOMESTRING ' ) You don't even need the … |
The End.