Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. This looks like server-side Javascript. The variable "WebService1" is not defined in the head. Try moving the ASP ScriptManager lines up to the head section before the rest of the Javascript.
  2. This is going to be pretty complicated for somebody who isn't experienced in programming. HTML and CSS are languages that describe and present data, but are not actual programming languages. Programming languages are quite a bit more complicated to learn. For your project you first need to decide what data your system has and what data structures you're going to use for it. One thing your system will have is probably a pet, or adoptable. Your pet will probably be an object with properties, such as "name", "species", "level", "image". It's up to you to determine all the properties your pet is going to have. To work with data that's just properties and values in PHP I recommend an associative array: $pet = array();$pet['name'] = 'Sparky';$pet['species'] = 'Dog';$pet['level'] = 1;$pet['image'] = 'dog.jpg'; You'll have to have scripts that create these objects, store them in the database, retrieve them from the database and display them on the page. You probably will need more kinds of objects, like maybe a species object that has properties common to all the pets of a particular species. This is where, in the database, you would have a relation between two different types of data, "pet" and "species". You'll have to learn database theory. Integrating this with PHPBB is probably going to be more difficult as a learning process than doing it without forum software. Once you actually know PHP you can try integrating this into the forum. You're trying to take on too much.
  3. You can have Javascript create a set of audio elements and attach the one currently being used. You can have it so that when a button is clicked all the audio elements stop playback before it changes the elements. Here's an introduction to controlling audio with Javascript. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video#Controlling_media_playback
  4. You can use an <iframe> to put the feed on your page. If you actually want to present it in a particular way you can attach an XSL stylesheet to the RSS file, or use a server-side language to load data from the feed and embed it right into the HTML.
  5. I'd start by getting a strong base in Javascript. Then move on to learn about Canvas interface. It's preferable to have knowledge of game development in general if you want to make anything larger than a minigame. A game is truly an immense project.
  6. "rn r preceded by two slashes rather than one. That will probably cause a problem.
  7. People making Javascript applications simply don't care that the API keys are publicly visible. You'll have to adopt that mentality if your application is going to be Javascript-based. If keeping the API key secret is that important, program a proxy on your server for the API instead and have Javascript use AJAX to communicate with it.
  8. The problem isn't that onclick doesn't work on mobile devices. It does. When you tap a touch screen it's registered as a click. The problem is that <option> element don't necessarily fire a click event. Options are bound to the select element they're inside, most of the time events are fired from the <select> element and not the <option>. Browsers, of course, don't always behave the same way; some will allow click events on options while others won't. Also, setting the value attribute to "javascript:void(0)" in an option is completely useless. The "javascript:void(0)" originated because the href attribute of a link allows Javascript to be executed by preceding it with "javascript:". This only works for attributes that take URLs as a value What will work is any of the following: <!-- Links always react to the onclick event --><!-- "return false" stops the link from actually going to the URL in the href attribute --><a href="#" onclick="window.open('vehicle_id_115.html','newwindow','height=320, width=670,toolbar=no,scrollbars=no'); return false;">1999</a><a href="#" onclick="window.open('vehicle_id_116.html','newwindow','height=320, width=670,toolbar=no,scrollbars=no'); return false;">2000</a><!-- Putting the event listener on the select element --><select onchange="window.open(this.options[this.selectedIndex].value,'newwindow','height=320, width=670,toolbar=no,scrollbars=no');"> <option value="vehicle_id_115.html">1999</option> <option value="vehicle_id_116.html">2000</option></select>
  9. He's using a CSS framework called bootstrap which has media queries internally. Bootstrap automatically stacks columns vertically when the window is small, this is done so that blocks don't become too thin on tiny screens. If you don't want that behavior then don't use the col-xs-12 class, set the width of the column yourself manually with CSS.
  10. Then give it a value. Write this somewhere: sessionStorage.clickcount = 0; You can't really use a variable if you don't give it a value.
  11. Learn about PHP form handling in order to get data from inputs to PHP: http://www.w3schools.com/php/php_forms.asp If you don't want to load a different page you can use AJAX to make Javascript receive the data instead. Learn AJAX: http://www.w3schools.com/ajax/default.asp
  12. The example they showed should works just as well on the forum RSS feed. Just change the URLs that are used in the PHP file to match the feeds you want to look at.
  13. You could view it that way, but I find it more helpful to see it as the position of a cursor between the letters, the 0 position being right before the first letter. Negative values are offsets from the position right after the last letter. "a" is not letter zero, it's the letter between positions zero and one. therefore: .slice(0, 1)
  14. Both the start and the end parameters place -1 at the same place. Look at the previous diagram again: if start is -1 then the letter than follows it ("g") will be shown. If the end is -1 then letters between the start and end are shown which don't include "g" Here's another diagram: Start is -1 a b c d e f [ g ] +---+---+---+---+---+---+---+ End is -1: a b c d e [ f ] g +---+---+---+---+---+---+---+
  15. If the start of the search for is five positions back from the end and you end the search three positions back then there are only two letters to show: Look which letters are between -5 and -3 in this graph: 0 1 2 3 4 5 6 7 | a | b | c | d | e | f | g | -7 -6 -5 -4 -3 -2 -1 The end of the string doesn't have a negative number associated to it. -1 means one position away from the end of the string.
  16. The reason that columns 1 and 2 don't occupy the space under the two-column box is because column 3 is floated to the left, which means that elements want to occupy space on the right-side of it. Since here isn't enough space on the right side of column 3, columns 1 and 2 go below it. If you float column 3 to the right then the other two columns will be further up.
  17. Did you ever define it at any moment?
  18. If the child window and parent window necessarily have to be together all the time then it's probably better to put all the content into the same document instead of two separate files, then you wouldn't need to worry about communication between windows.
  19. A comments section would require programming in a server-side language such as PHP. If by "Google sites" you mean sites.google.com, they don't have support for server-side programming, so you won't be able to have visitors posting comments on the page. Google Sites is OK for personal pages with no user input, but if you want a serious website you will have to get real hosting.
  20. But what's the relation between the two windows? They can't communicate between each other if they don't have a relation. If the second window was opened by the first one then access between windows would be like this: In the parent window: var child = window.open("file.html");// Call change() in the child windowchild.change(); In the child window: // call change() in the parent windowwindow.opener.change(); If the child is an iframe in the parent (<iframe id="child" src="page.html">) In the parent window: var child = document.getElementById("child");// Cross browser way to access the child windowif(child.contentWindow) { child = child.contentWindow;}// Call change() method in the child windowchild.change(); In the child window: // call change() in the parent windowwindow.parent.change();
  21. MVC is just one of many different programming paradigms. I wouldn't necessarily call it best, just better suited for certain tasks, such as a content management systems where you want to keep presentation separated from the logic.
  22. A link to a JS file will just load a copy of the script onto that page. If you want communication between the two pages (and only if they're both within the same website) you will need a reference between them, such as the ID of a frame or the returned window from a window.open() call.
  23. Setting "expires" to a date prior to the current date is what should actually delete the cookie, But you probably should use the exact same "path" value as you did when setting the cookie; If no path was set then you shouldn't add "path" to the deleting function. It's probable that a cookies with different paths are considered different cookies.
  24. Did you try this? SELECT id, MIN(CAST(dob AS CHAR)) FROM vot_sim GROUP BY addr ORDER BY dob
  25. What I meant was to add ORDER BY onto your existing query, in addition to GROUP BY.
×
×
  • Create New...