Jump to content

tomindo

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Posts posted by tomindo

  1. i have tried on chrome and firefox , not working for even 2 items. Basically, i have a php script on the site which will take like 1 minute to finish loading so during this time when i try to browse other links on the same browser they won't load at all until the 1 minute script done. There must be something to do with php session :shrug:

  2. Hi guys

    I got an issue that when a link on the site is loading, the other links does not load until the previous is complete but it will work if i try on 2 different browsers. How can i browse multiple links silmultanously?

    Thanks

  3. This is the html plus js script. It actually submits the form but with the empty field value

    <form id=my_form name=Form size=30 action=/search.php method=post>

    <div id="suggest"><br />

    <input id=country maxlength=30 type=text name=key value="" onkeyup="suggest(this.value);" onblur="fill();" class="">

    <div class="suggestionsBox" id="suggestions" style="display: none;">

            <div class="suggestionList" id="suggestionsList">   </div>

          </div>

      </div>

    <input type=submit value='Search'>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>

    <script type="text/javascript" language="JavaScript">

    function suggest(inputString){

                    if(inputString.length == 0) {

                            $('#suggestions').fadeOut();

                    } else {

                    $('#country').addClass('load');

                            $.post("autosuggest.php", {queryString: ""+inputString+""}, function(data){

                                    if(data.length >0) {

                                            $('#suggestions').fadeIn();

                                            $('#suggestionsList').html(data);

                                            $('#country').removeClass('load');

                                    }

                            });

                    }

            }

     

            function fill(thisValue) {

                    $('#country').val(thisValue);

                  setTimeout("$('#suggestions').fadeOut();",100);

                    $('#my_form').submit();

     

            }

     

    </script>

  4.  

    I been working on search auto suggestion box which has one of function below. The function will fill the suggested result to search form field and submit the search but it will never submit the search. It really scratch my head on this issue, please help

           

    function fill(thisValue) {

                    $('#country').val(thisValue);

                  setTimeout("$('#suggestions').fadeOut();",100);

                  $('#my_form').submit();

            }

     

     

  5. Hi guys

    I got the js script below which loops through all form inputs , then check if the field value changes to other value rather than the default but for some reasons the if condition does not work, no error showed. Really need someone to shed a light on it. Maybe give me some other solutions to fulfil this task

     

    $(document).ready(function() {

            $("select").change(function(){

                    $("form").find("input").each(function(i) {

                            if (this.value != this.defaulValue) {

                            alert(this.value);

                            }

                            else {

                                    alert("no update");   

                            }

                    });

        });

     

  6.       function fill(thisValue) {

                    $('#country').val(thisValue);

                    setTimeout("$('#suggestions').fadeOut();", 600);

                $("#my_form").trigger('submit');

            }

    the above function is supposed to fill the search string from the suggestion box and trigger the automatic search but it does not work. If I comment the "my_form" line , the field is filled in just fine but of couse it does not trigger the search.  So what I m trying to achieve here is fill in the field and trigger the search right away like google search.

     

  7. [syntax=php]function chk_view() {
        var theForm = document.myform;
    for (i=0; i<theForm.elements.length; i++) {
            if ((theForm.elements[i].value==4) && (theForm.elements[i].checked ==1)){
                theForm.elements[i].value==1;
                theForm.elements[i].checked = true;
    		}
    
    }
    }[/syntax]
    

    Basically, I want when check box with value =4 is checked , the check box with value =1 will be checked too. But the above code does not work

     

  8. could someone help me with this code? It works fine without ip2long function? weird

    <form method="post" action="test.php"> 
    <textarea name="new" cols="40" rows="10"> 
    samplehost-1,127.0.0.1
    samplehost-2,127.0.0.2
    </textarea><br>
    <input type="submit" value="Add Servers"> 
    </form>
    if(isset($_POST['new'])) {
    $array= explode("\n",$_POST['new']);
    foreach ($array as $ni) {
    			$array=explode(',', $ni);
    			echo ip2long($array[1]);	
    }
    }
    

×
×
  • 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.