User Profile

Collapse

Profile Sidebar

Collapse
wesley1970
wesley1970
Last Activity: Jul 10 '24, 12:38 PM
Joined: Nov 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • wesley1970
    started a topic How to Create Range in Firefox

    How to Create Range in Firefox

    [HTML]<div name="wenben" id="wenben">Hig hLight me and Click Button</div>
    <input onClick="makeit big()" type="button" value="make it big">
    <script>
    function makeitbig(){

    if (navigator.appN ame=='Netscape' )
    {document.getSe lection().execC ommand("FontSiz e",false,29) ;}

    else {document.selec tion.createRang e().execCommand ("FontSize",fal se,29);}...
    See more | Go to post

  • wesley1970
    replied to Question about array
    Thanks very much, i will check that in details.
    See more | Go to post

    Leave a comment:


  • wesley1970
    started a topic Question about array

    Question about array

    In php, we have array_intersect to check if 2 arrays have intersected. Is there anythings like that in Javascript??
    See more | Go to post

  • wesley1970
    replied to How to refresh the page?
    Yes, ... thanks to you
    See more | Go to post

    Leave a comment:


  • wesley1970
    started a topic How to refresh the page?

    How to refresh the page?

    [HTML]<script>


    function refreshing() {
    action = new XMLHttpRequest( );
    action.open("GE T", "test.txt" , true);
    action.onreadys tatechange = function () {
    var response = action.response Text;
    document.getEle mentById('kk'). innerHTML=respo nse;};
    action.send(nul l); }

    setInterval('re freshing()',300 0);


    </script> ...
    See more | Go to post

  • wesley1970
    started a topic need help about urlrewrite

    need help about urlrewrite

    In apache, i set override all,
    open rewrite mode..
    I have installed wordpress into it. It can rewrite url. That means my setting is correct.
    Look at wordpress htaccess, something like this

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILEN AME} !-f
    RewriteCond %{REQUEST_FILEN AME} !-d
    RewriteRule . /wordpress/index.php [L]...
    See more | Go to post

  • wesley1970
    started a topic question about match or replace

    question about match or replace

    in php we have

    [PHP]
    <?php>
    $pattern[0]='/a/i';
    $pattern[1]='/b/i';
    $replacement[0]='';
    $replacement[1]='';
    $var = 'Watbe';
    echo preg_replace($p attern, $replacement, $var);
    ?>[/PHP]

    using pattern array to replace two match at the same time.


    Under is what i know in javascript
    [HTML]<script>
    var str="aacc";...
    See more | Go to post

  • I know the reason......... ... Time Zone........... ... i guess i have to rewrite the program........ .. thankssssss...
    See more | Go to post

    Leave a comment:


  • Same script, but work in some server and doesn't work in some server.

    [PHP]<?php

    $range = split(',', '2008-11-1>2008-11-30=123,2008-12-1>2008-12-31=222,');
    for ($y=0; $y<(count($rang e)-1); $y++){
    $equalto = explode('=',$ra nge[$y]);
    $splitagain = split('>',$equa lto[0]);
    for ($s=strtotime($ splitagain[0]); $s<(strtotime($ splitagain[1])+10); $s=$s+(60*60*24 ))
    {
    $money[$s]=$equalto[1];

    }

    }

    $kk = $money[1225497600];...
    See more | Go to post

  • [PHP]<?php
    $a = array(1,2,3,4,5 );
    $b = array(1,2,3,4,5 ,6,7,8);
    echo count(array_int ersect($a, $b));
    ?>[/PHP]
    Thanks I understand...
    See more | Go to post

    Leave a comment:


  • Showing the number of matches returned by array_intersect

    [PHP]<?php
    $a = array(1,2,3,4,5 );
    $b = array(1,2,3,4,5 ,6,7,8);
    echo array_intersect ($a, $b);
    ?> [/PHP]

    array_intersect should return the numbers of items intersect in 2 arrays. In this case, it should be 5. However it return "Array".... Does anyone know why?
    See more | Go to post
    Last edited by Atli; Apr 18 '08, 09:39 PM. Reason: Changed thread title to better describe it's contents.

  • wesley1970
    replied to need help about php variable
    in PHP
    Thanks very much, actually, not because of it..

    by using strcmp we don't need to trim the string, but i don't know why if i use ==, i have to trim it, by using the below, it works

    [PHP]<?php
    if (trim($check!)! ==trim($_SESSIO N["validate"])){echo 'Validation is not ok';}
    else { echo 'OK';}
    ?>[/PHP]
    See more | Go to post

    Leave a comment:


  • wesley1970
    started a topic need help about php variable
    in PHP

    need help about php variable

    [PHP]<?php
    if ($check!==$_SES SION["validate"]){echo 'Validation is not ok';}
    else { echo 'OK';}
    ?>[/PHP]
    the above doesn't work

    but the below work
    [PHP]<?php
    if ($check==$_SESS ION["validate"]){echo 'ok';}
    else { echo 'validadation is not OK';}
    ?>[/PHP]


    How the variables work logically with 'if' in PHP??? strange
    ...
    See more | Go to post

  • wesley1970
    started a topic has anybody done any travel & tourism site before?
    in PHP

    has anybody done any travel & tourism site before?

    although this question doesn't soud like programming,

    however, i really want to know where can we get "airlines realtime informations"

    like class, from where to where, reservation, price........su ch kind of things....

    is there any central database where we can pay to use it?
    See more | Go to post

  • wesley1970
    started a topic a very simple questions about array
    in PHP

    a very simple questions about array

    for example, we can make an array simply by the below method
    [code=php]
    <?php
    $var1 = a;
    $var2 = b;
    $var3 = c;
    $variables = array($var1,$va r2,$var3);
    ?>
    [/code]

    Below, we can use "for loop" to echo out 0,1,2,3,4....20 ,
    However, how can we use the "echo-out(0,1,2,3,4.. ..)" to make an array
    like the above one???
    [code=php]
    <?php
    ...
    See more | Go to post
    Last edited by ak1dnar; Nov 7 '07, 04:41 PM. Reason: Fixed [CODE=php] Tags
No activity results to display
Show More
Working...