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
D

daveyerwin

@daveyerwin
About
Posts
157
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • HTML Select tag
    D daveyerwin

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <script type="text/javascript">
    function ok_clicked(){
    document.getElementById('sel1').style.fontSize = '17px';
    }
    function ok2_clicked(){
    document.getElementById('sel1').style.fontSize = '9px';
    }
    </script>
    <body>
    <select id="sel1" style="font-size: 13px;">
    <option>Volvo</option>
    <option>Saab</option>
    <option>Mercedes</option>
    <option>Audi</option>
    </select>
    <input type="button" name="Go2224" value="OK" onclick="ok_clicked();">
    <input type="button" name="Go2222" value="Decrease font" onclick="ok2_clicked();">
    </body>
    </html>

    modified on Tuesday, November 30, 2010 8:40 AM

    JavaScript javascript html tools tutorial question

  • dynamic event - pass value
    D daveyerwin

    you will get 0, 1 and 2

    <a href="#">link 1</a>
    <a href="#">link 2</a>
    <a href="#">link 3</a>
    <script type="text/javascript">
    var anchorNiz = document.getElementsByTagName("a");
    for(var i=0;i<anchorNiz.length;i++){
    var anchor = anchorNiz[i];
    anchor.attachEvent("onmouseover",(function(){
    var arg = arguments[0];
    return function(){
    alert(arg);}})(i))
    }
    </script>

    also attachevent omly works in IE

    modified on Tuesday, September 14, 2010 2:24 PM

    JavaScript javascript tools help

  • TextBox Validation ( Not Allow these Characters )
    D daveyerwin

    this simple example will demonstate how to dis allow certain chars

    <html>
    <head>
    <script>
    restictIt = (function(){
    var args = arguments;
    return function(el){
    for(var i=args.length;i--;){
    if (el.value.indexOf(args[i]) != -1){
    el.value = el.value.substring(0,el.value.length-1);
    }
    }
    }
    })('a','b','c')// put disallowed chars here
    </script>
    </head>
    <body>

    <input type=text onkeyup="restictIt(this)">

    </body>

    </html>

    modified on Tuesday, September 14, 2010 12:38 PM

    ASP.NET question

  • Detect Java Installed in machine
    D daveyerwin

    is java installed[^]

    modified on Monday, August 30, 2010 8:39 AM

    JavaScript java javascript html question

  • changing input value atrribute
    D daveyerwin

    document.getElementsByTagName try it this way (it will probably work but there is no gaurentee that the dom will be ready, you should move the script block to the end ot the page)

    <input type='hidden' name='member_id' id='number' value='***' />
    <script type="text/javascript">
    document.getElementById("number").value="40603";
    </script>

    JavaScript tools

  • Login Page with out Menu bar
    D daveyerwin

    http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx[^]

    JavaScript help question

  • countdown timer initializes on refreshing the page but it should not
    D daveyerwin

    blockquote class="FQ">

    vinci007 wrote:

    Any alternative to this ?? Yes, store the start time in a cookie. here is a very simple example

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title>My Timer Page</title>
    </head>
    <body>
    here is a timer that will keep count<br /> even if page is refreshed<br />press button to reset<br />
    <div id="timerDisplay"></div>
    <div><input type="button" onclick="myTimer.reSet()" /></div>
    </body>
    <script type="text/jscript">
    var myTimer = (function () {
    var readCookie = function () {
    var ca = document.cookie.split(';');
    for (var i = ca.length; i--; ) {
    var c = ca[i].split('name=');
    if (c.length == 2) return c[1];
    };
    return 0;
    };
    if (!readCookie()) {
    document.cookie = "name=" + (new Date().getTime()) + "; path=/";
    };
    var stuff = {};
    stuff.howLong = function () {
    return new Date().getTime() - readCookie()
    };
    stuff.reSet = function () {
    document.cookie = "name=" + (new Date().getTime()) + "; path=/";
    };
    return stuff;
    })();

    setInterval("document.getElementById('timerDisplay').innerHTML = myTimer.howLong();", 500);
    </script>
    

    </html>

    modified on Wednesday, August 25, 2010 9:45 PM

    JavaScript help csharp asp-net

  • usb
    D daveyerwin

    javascript in an HTML Application can. When a regular HTML file is executed, the execution is confined to the security model of the web browser, that is, it is confined to communicating with the server, manipulating the page's object model (usually to validate forms and/or create interesting visual effects) and reading or writing cookies. On the other hand, an HTA runs as a fully trusted application and therefore has more privileges than a normal HTML file; for example, an HTA can create, edit and remove files and registry entries [^]

    JavaScript javascript adobe question

  • Link through javascript
    D daveyerwin

    NeverHeardOfMe wrote:

    location.href = 'newpage.html';

    The difference between location.href and location.replace is that location.href creates a new history entry on the visitor's browser while location.replace replaces the history entry. If the history entry is not replaced the back button will lead to the redirect page again causing 'redirection loop' which is usually undesirable and may have unwanted side effects.

    JavaScript help question javascript html tools

  • Link through javascript
    D daveyerwin

    putting this in head will redirect IE browsers less than 6 (google 'conditional comments') Commonly, the necessary features are checked and the page redirected if they are present leaving browsers which do not have desired features at current page, the current page will explain the problem to the user. Users with appropriate browsers will not see the current page because they will have been redirected. (google 'javascript feature testing') Also, if a necessary feature is missing from browser there is always a javascript work-around that will compensate, unless of course it's javascript thats missing. In that case it will not redirect! So leaving that browser on current page is good option.

    JavaScript help question javascript html tools

  • Link through javascript
    D daveyerwin

    location.replace('oops.html'); But, your scheme seems wrong. Exactly which browsers will you disallow, and for what reason?

    JavaScript help question javascript html tools

  • countdown timer initializes on refreshing the page but it should not
    D daveyerwin

    Well, one answer is 'use frameset with timer in a frame that doesn't get refreshed'.

    JavaScript help csharp asp-net

  • How to detect .msi file ?
    D daveyerwin

    http://www.codeproject.com/KB/aspnet/AspxProtocol.aspx http://www.codeproject.com/KB/shell/MouseGestures.aspx http://www.codeproject.com/KB/cross-platform/NPAPIBrowserPlugin.aspx http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx

    JavaScript java tools tutorial question

  • asp.net accross different domains.
    D daveyerwin

    AndieDu wrote:

    when i run that asp.net application from another machine, which is in the different domain, say in Domain 2, i got this error: Could not find a part of the path Domain 1\ITManagement\WarehouseData\Current.

    Instead of accessing ITManagement\WarehouseData\Current from the file system make it available from a web service and access it that way.

    ASP.NET sysadmin help csharp asp-net windows-admin

  • How to detect .msi file ?
    D daveyerwin

    the .msi would need to insall a scriptable "plug-in"

    JavaScript java tools tutorial question

  • How to detect .msi file ?
    D daveyerwin

    Try to access a property or method of the ".msi" inside a try catch if no error your good to go http://www.w3schools.com/js/js_try_catch.asp[^]

    JavaScript java tools tutorial question

  • iframe in an apsx page
    D daveyerwin

    http://www.dyn-web.com/tutorials/iframes/refs.php[^] window.frames[iframeName].document.getElementById(elementId).value

    ASP.NET css help question

  • need ur help
    D daveyerwin

    Abdulhafeezo wrote:

    i wanna implement a webservice dat will syncronise wit my gmail and also with my yahoo acount.

    Joo may use RSS.

    Abdulhafeezo wrote:

    pls caould any1help mewit the source codes

    ShoDawg, hep bein found heyah.

    ASP.NET help

  • Refresh Div content
    D daveyerwin

    Shantanu Gupta 1337 wrote:

    but i have edited your code a bit to just meet that edge:

    You have edited your own code which I had modified. If it were my code it would look like this ...

    <html>
    <head>
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script>
    var redir = (function(){
    this.ic = 0;
    this.ar = arguments;
    return function(){
    if(++ic == ar.length){ic = 1;};
    $('#'+ar[0]).html(ar[ic])};})
    ("text1","Redirecting","Redirecting.","Redirecting..","Redirecting...")
    </script>
    </head>
    <body>
    <div id="text1"></div>
    </body>
    <script>
    setInterval(redir,500);
    </script>
    </html>

    modified on Sunday, August 1, 2010 4:40 PM

    JavaScript c++ java html help

  • Refresh Div content
    D daveyerwin

    <!DOCTYPE html>
    <html>
    <head>
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script>
    var ic = 0;
    var s0 = "Redirecting";
    var s1 = "Redirecting.";
    var s2 = "Redirecting..";
    var s3 = "Redirecting...";
    function redir(ic) {
    ic++;
    switch(ic) {
    case 1:
    $('#text1').html(s0);
    break;
    case 2:
    $('#text1').html(s1);
    break;
    case 3:
    $('#text1').html(s2);
    break;
    case 4:
    $('#text1').html(s3);
    ic = 0;
    break;
    default:
    $('#text1').html(s0);
    }
    if(ic > 0){setTimeout("redir("+ic+")", 500);}
    return 0;
    }
    </script>
    </head>
    <body>
    <div id="text1"></div>
    <script>
    redir(ic);
    </script>
    </body>
    </html>

    This works but you really should change the code to use use setInterval instead of setTimeout

    modified on Saturday, July 31, 2010 2:01 PM

    JavaScript c++ java html 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