Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

Evan Gallup

@Evan Gallup
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How can i present my new device to windows to recognise it?
    E Evan Gallup

    After a quick Google search, I've come to the conclusion that the answer to your question is both yes and no. You can write some drivers in C# (see User-Mode Driver Framework (UMDF)[^]), but kernel-mode drivers cannot be created with C# because it "produces intermediate language that is interpreted by a virtual machine (.NET)". The general consensus is to use C/C++ for drivers. Source: http://stackoverflow.com/questions/994600/writing-drivers-in-c[^]

    If I had a nickel for every time I tried to teach someone some programming, they didn't pay a cent of attention, then gave up, claiming it was too difficult - well, you know the rest... sadly, I'm just a programmer in an endless sea of cubes, typing my life away.

    C# question csharp game-dev tutorial

  • simple javascrpt: checkbox
    E Evan Gallup

    Yes, something very very very basic. You need to look at the AJAX script.

    function saveCheckBoxValue(value)
    {
    var xmlhttp;
    if (window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
    }
    else{
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange=function(){
    if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
    if(document.getElementById('users').checked) document.getElementById('users').value = '1';
    else document.getElementById('users').value = '0';

    document.getElementById('#ex11').innerHTML += "Value saved!";
    }
    }

    xmlhttp.open("GET","[LOCATION TO PHP SCRIPT HERE]?value=" + value,true);
    xmlhttp.send();
    }

    Then just make sure you set the 'id' attribute on your checkbox.

    <input name="users" id="users" type="checkbox" value="0" onchange="saveCheckBoxValue(this.value)" />

    Keep in mind what the value should start as based on the value from the database if needed. That's opening a whole new can of worms. You're going to need to get the current value from the database with PHP, and then use and if-else like the one in the javascript above to set the initial value. There are a lot of things going on in your script, you really have to keep your mind open and figure out the logic behind everything that's happening to be a successful programmer. Good luck! -Evan

    JavaScript database question javascript php html

  • XML and Javascript
    E Evan Gallup

    It is possible to do this, although depending upon your Javascript abilities, could be very frustrating. Check out this link: http://www.w3schools.com/dom/default.asp[^] A server-side language is far easier to use for this sort of thing IMHO. PHP may be your best free option, just look for an XML class. Coldfusion has excellent XML support if you've got money to spend or already have a license for it.

    JavaScript javascript xml announcement

  • simple javascrpt: checkbox
    E Evan Gallup

    The way I would do so (if you want to do it on the fly, without the user changing pages) is to use AJAX. It's really quite simple actually, don't let AJAX scare you off if you haven't ventured into it yet.

    function saveCheckBoxValue(value)
    {
    var xmlhttp;
    if (window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
    }
    else{
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange=function(){
    if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
    [DO SOMETHING HERE SUCH AS THE EXAMPLE BELOW THIS]
    document.getElementById('#ex11').innerHTML += "Value saved!";
    }
    }

    xmlhttp.open("GET","[LOCATION TO PHP SCRIPT HERE]?value=" + value,true);
    xmlhttp.send();
    }

    Then, in the HTML code for your checkbox, all you must do is this:

    <input type="checkbox" id="ex11" value="" onchange="saveCheckBoxValue(this.value)" />

    Not sure if this is what you were looking for, but I figured I'd give my two cents. The best part about this is that you can create multiple checkboxes, but still only use that one js function to save the values. You will most likely need to tweak this to your needs, such as the value that the checkbox must have, but it's a start at least. Happy coding! :-D

    JavaScript database question javascript php html

  • Passing on Javascript array data to a PHP-array
    E Evan Gallup

    I'd love to help, but I'm really not clear as to what you're asking here. Can you explain further? Also, just a tip, put any code you must share inside of these tags: <pre></pre> Do so by clicking the 'code' button above the message box. It makes your code a lot easier to read.

    JavaScript help javascript php html database

  • Contact form
    E Evan Gallup

    Check the link out at the bottom, it's a PHP mailer library that should make it much easier to do what you're trying to accomplish. If you're still having trouble, just remember, Google is your friend! http://bit.ly/p9DUif[^] Literally every result on that first page should walk/help you through it. http://swiftmailer.org/[^]

    Linux, Apache, MySQL, PHP php html database com hosting

  • please helpme
    E Evan Gallup

    A linux server would be best. Install ffmpeg on the box and have a cron job run every few minutes to convert any video uploads to flv format for displaying. As for a player, I would recommend Flowplayer (http://flowplayer.org[^]) It is very easy to operate and a commercial license isn't all that expensive.

    Linux, Apache, MySQL, PHP php com sysadmin business help

  • Find visitor's Internet service provider with PHP
    E Evan Gallup

    You could play around the host area on your site. I know mine displays "comcast.net" in it with some other things before it (IP address, location, etc.). You could do some figuring that way.

    modified on Sunday, September 4, 2011 1:41 AM

    Linux, Apache, MySQL, PHP php help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups