Jump to content

tarun

Members
  • Posts

    321
  • Joined

  • Last visited

    Never

Posts posted by tarun

  1. Found Something For You

    <script LANGUAGE="JavaScript">
    <!--
    // Nannette Thacker http://www.shiningstar.net
    function confirmSubmit() 
    {
    var agree=confirm("Are you sure you wish to continue?");
    if (agree)
    return true ;
    else
    return false ;
    }
    // -->
    </script>
    
    
    <form method="POST" 
    action="/articles/articles/javascript/confirmsubmit.asp?shoeid=shoes&ID=AW" 
    onsubmit="return confirmSubmit()" id="submitform" name="submitform">
    
    Shoes	
    <input type="Submit" value="Delete" id="Delete" name="Delete">
    </form>

     

    From: http://www.shiningstar.net/articles/articles/javascript/confirmsubmit.asp?ID=AW

     

     

     

     

     

    Thnx,

    Tarun

  2. Im Not Sure Whats Going Wrong

    Its Actually Trying To Litererally Replace "string" Rather Than A Specified Input

     

    function deltxt(where,string){
    var old = document.getElementById(where).innerHTML;
    var new = old.replace(/string/g, "");
    document.getElementById('taskbar').innerHTML = close;
    }

     

     

    Any Help...?

     

     

    Thnx,

    Tarun

  3. .button {
    background-image: url('images/normal.gif');
    background-repeat: no-repeat;
    height: 15px;
    width: 15px;
    }
    td.button:hover {
    background-image: url('images/over.gif');
    background-repeat: no-repeat;
    height: 15px;
    width: 15px;
    }
    td.button:active {
    background-image: url('images/down.gif');
    background-repeat: no-repeat;
    height: 15px;
    width: 15px;
    }

     

    Okay Ive Got This ^--^--^

    And The Over Works Like OnMouseOver (hover)

    But The Down Does Nothing - It Should Act Like OnClick (active)

    But I Doesn't Any Help...?

     

     

    Thnx,

    Tarun

  4. [u][b][size=14pt][url=http://www.editplus.com]EditPlus[/url][/size][/b][/u]
    It Supports The Following File Types:
    [list]
    [*]Text (.txt)
    [*]HTML (.html .htm .asp .asa .shtml .stm)
    [*]C/C++ (.cpp .c .cxx .h .hpp .rc)
    [*]Perl (.pl .pm .cgi)
    [*]PHP (.php3 .php)
    [*]Java (.java)
    [*]JSP (.jsp)
    [*]JavaScript (.js)
    [*]VBScript (.vbs)
    [*]CSS (.css)
    [*]XML (.xml .xls .wml .xsd)
    [/list]

    Its Not Free But Theres Is A Trial Version Available
  5. Well Say I Have An XML File:

    <?xml version="1.0" encoding="ISO-8859-1" ?> 
      <udata>
          <uname>tarun</uname> 
          <age>12</age> 
          <hobby>php</hobby> 
          <profile>
    [center][color=red]Welcome To My Profile[/color][/center]
    </profile> 
      </udata>
      <udata>
          <uname>john</uname> 
          <age>13</age> 
          <hobby>asp</hobby> 
          <profile>
    [left][color=blue]Welcome[/color][/left]
    </profile> 
      </udata>

     

     

    How Do I...

    1. If uname tag Is tarun Display The profile tag

    2. List All The Ages In A List

    e.g.

    12

    13

    18

    43

     

     

    AnY HelP...?

    Thnx,

    Tarun

    35

  6. Its more typing that way, sometimes ../ is better, but, say you want to call up a page from 3 different locations on your server, a stats page for example.  if you use ../stats.php, wherever you call it up from it will think that you mean ../ relative to that location, if you use $_SERVER['DOCUMENT_ROOT'] it will know exactly where the page you are looking for is located.  ../ is mostly guesswork, that is why I prefer the $_SERVER method.

     

    Okay I Saw This Quote Somewhere And It Exactly What I Need Answering

     

    Who Could I Use $_SERVER To Do The Above

     

     

    AnyHelp

    Thnx,

    Tarun

  7. Okay I Used To Use This In My header.php File

    $host = $_SERVER['HTTP_HOST'];
    include 'http://$host/settings.php';

     

    Change It Since My Web Host Disabled URL File Access

    But Which Is The Best Way Bearing In Mind That Lots Of Files Are In Different Directories

     

    Warning: include(): URL file-access is disabled in the server configuration in /home/www/***.***.com/header.php on line **

  8. Wrong Forum But I Have A JavaScript Method Aswell

     

    <script type="text/javascript">
    function getValue(varname)
    {
      var url = window.location.href;
      var qparts = url.split("?");
      if (qparts.length == 0)
      {
        return "";
      }
      var query = qparts[1];
      var vars = query.split("&");
      var value = "";
      for (i=0;i<vars.length;i++)
      {
        var parts = vars[i].split("=");
        if (parts[0] == varname)
        {
          value = parts[1];
          break;
        }
      }
      value = unescape(value);
      value.replace(/\+/g," ");
      return value;
    }
    </script>
    <script type="text/javascript">
    var dw3 = getValue("dw3");
    
    if(dw3 == "story"){
    document.write('Content Here')
    }
    if(dw3 == "artwork"){
    document.write('Content Here')
    }
    else
    document.write('Error')
    </script>

     

  9. Okay So This Is My Flat File:

    user1|pass1|admin
    user2|pass2|user
    user3|pass3|user

     

    Okay Do I Extract These Fields An Store Them In A Variable

    By The Way Its For A Login Script If That Helps...

     

     

    ALSO Any Other Help Appreciated

     

    Thnx,

    Tarun

  10. users.txt

    user1|||pass1
    user2|||pass2
    user3|||pass3

     

     

    login.php

    <?php
    $user  =  $_POST["u"];
    $pass  =  $_POST["p"];
    $db = file("users.txt");
    
    foreach($db as $key => $val) { $data[$key] = explode("|||", $val); }
    
    for($k = 0; $k < sizeof($db); $k++) { 
    $u = $data[$k][0];
    $p = $data[$k][1];
    
    if ( $u == "$user" ) {
    if ( $p == "$pass" ) { echo 'You Are Now Logged In As: '.$u.''; }
    else { echo 'Username And Password Do Not Match'; }
    }
    
    
    }
    ?>

     

    The If Statement Doesn't Work

    I Get The Error:

    "Username And Password Do Not Match"

    Even If The Username And Password Are Actually Right

     

     

     

    AnyHelp?

    Thnx,

    Tarun

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.