Jump to content

adam84

Members
  • Posts

    289
  • Joined

  • Last visited

Posts posted by adam84

  1. All i want to do it put an anchor tag at the top of the top and after i call and run my ajax code. I want to have the page goto the top anchor tag so if a long page of data is loaded by the ajax, the user will be at the top of the screen

  2. Does this work??

     

    <INPUT TYPE=BUTTON NAME=btn1 ID=btn1 VALUE='Click Me' ONCLICK="javascript:sendRequest('getResults.php?animal=Cow&name=Larry#topOfPage','resultsDIV');">
    

     

    Is it possible to add the anchor name at the end of your ajax call and after the data gets loaded into the span or div tag, then page will go to the anchor????

  3. I am trying to add the FULLTEXT constraint on a column in my table, but i keep getting an error? Any ideas?

     

    ALTER TABLE products FULLTEXT(productDescription);
    

     

    Error Message: Can't find FULLTEXT index matching the column list

  4. Does anyone know if there is a maximum amount of data that can be sent through a form at one time. CauseI have a textarea where the user can input whatever they want and if they enter in a very large amount of data the page gets an error. If the user just enters in something that isnt to big, the page works correctly. I dont understand whats going on.

  5. That was one of the articles which I read. The article used the settimeout function which will pause the sequence of the code for x amount of time. What I want to do is see how long it take to get from part A (beginning of the function) to part b (end of the function). I dont want to pause the code from running but time the function

  6. I want to see how much time has elapse from the beginnning of the function to the end of the function. But I have having trouble. Every time I use the alert to display the sTime (start time) and eTime (end time) they are the same. I have even tried to put a for loop of a million to see if any time has elapsed but the two value still eqwual the same. Any ideas???

     

    function timeElapsed(){
             var tDate = new Date();
             var sTime = tDate.getTime();
    
             ~~~ Code
    
             var eTime = tDate.getTime();
             alert(sTIme + '  ' + eTime);
    }
    

  7. When i go to my site, i get this error

    <META NAME="KEYWORDS" CONTENT="
    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /home/ace84/public_html/index.php on line 16
    I cannot connect to the database because: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
    

     

    1 min the page we working good, then i refreshed it and this error have been popping up. Has anyone overcome this error before?

  8. <select>

    <option VALUE=1>Hotmail</option>

    <option VALUE=2>Gmail</option>

    <option VALUE=3>Yahoo</option>

    </select>

     

    user enters 3 and i want to combo box to select Yahoo

  9. This can be two different ways:

     

    1. PHP - Reloading

    The first way is once the user select an option from the 1st combo box, you can resubmit the page with the selected value (probably the id of the selected item). Once the page is submitted and it is loading you can check to see if the GET/POST variable isset. If yes then run the SQL command to populate the 2nd combo box. If its not set then either the variable was never sent or an error occurred.

     

    2. Ajax - No page refresh

    This method is a little my in depth. It starts off the same except that this method involves JavaScript where the first method doesn’t. Create the 1st combo box. Then instead of creating the 2nd combo box, use either a <DIV> or <SPAN> tag. When the user selects an item from the 1st combo box, use the ONCHANGE event in the <SELECT> tag to call a JavaScript function with the 1st combo box value. The JavaScript function will use Ajax to call a php file, which you will send in the users selected value and load the results into the <DIV>/<SPAN> you create.

     

    In the php file, retrieve the variable, create and run the SQL command and to create the results (echo "<SELECT> (loop through the results) </SELECT>").

    - More difficult, i can explain a little more clearly if this is what you wanted

     

  10. Hi,

     

    About six months ago, i create a site that dealt with adult material. After a few months, i become bored with it and wanted to start a new site. My problem is that when i try and access the site with a content blocker (web sense), it keeps being filtered b/c of the category 'sex', 'adult', etc. What would i need to do to change that, so it is more friendly? Would the 'sex' category be attached to the url or the html files? Any ideas?

  11. I am attempting to create a site using only ajax. When I came to the setting of a cookie, I read that you need to set the cookie before the <HTML>, but since I am using AJAX, my <HTML> is already there. Is it possible?

  12. This is my code for setting a cookie, but for some reason it is not getting set. Any questions?

     

       function login($userID, $userNameVal, $remember){
          $this->userid = $_SESSION['userid'] = $userID;
          $this->userName = $_SESSION['userName'] = $userNameVal;
    $this->logged_in = $_SESSION['logged_in'] = true;
    $t = time()+(60*60*24*100);
    
          if($remember){
             setcookie("cookname", $userNameVal, $t ,"/");
             setcookie("cookid",   $userID, $t, "/");
          }
       }
    

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