Search Results

Search found 6 results on 1 pages for 'jartaud'.

Page 1/1 | 1 

  • Execute JavaScript function on a dynamic element (AJAX).

    - by jartaud
    Hello i have this following function: ... var model = $("#carModel"); .... model.change(validModel); function validModel(){ if(model.val() == undefined){ model.addClass("errorJS"); return false; }else{ model.removeClass("errorJS"); return true; } } I am getting carmodel id from a select box generated after an AJAX call. I can get its value in the Firebug console, but the function doest not execute. Even tough i use model.livequery(validModel); // The errorJS class put a red border in a element, if the function returns false

    Read the article

  • Should we use require_once instead header location?

    - by jartaud
    Hello commnunity, i have somthing like this: (if this page needs the user to be logged) if(!isset($_SESSION['usr_id'])){ //if not a logged user $_SESSION['redir']=curPageURL();//Saving the current page for the redirection header('Location: ../Session/loginFrm.php'); } and in loginFrm.php, we do: {...after validation} if(isset($_SESSION['redir'])){ header('Location: '.$_SESSION['redir']); }else{...} in this page, they say we should use something like this instead: ... require_once '../Session/loginFrm.php'; exit(); This doesn't work for me, the session variable now contains the included page, and not the current page. What do you think about?

    Read the article

  • How to Ignore query string in a URL?

    - by jartaud
    Hello I have something like this: if(isset($_POST['btnProm'])){ $idads = mysql_real_escape_string($_POST['idAds']); require_once("adPromFrm.php"); } When a button is pressed, a form will appear.... When i refresh the page, the form doesn't disappear, but when i click a link with a query string (thisPage.php?lang=fr...), the form disappears. I know i m asking the form only if the button is pressed, but how can i ignore the query string.

    Read the article

  • Help with MySQL date operation

    - by jartaud
    Hello i have two columns: duration (int) and dateCol (date) in a table. How should i proceed if i want to know when CURDATE() - dateCol will iqual to duration. ie: CURDATE() - dateCol (2010-05-08) = duration (14 days), and then send an e-amil?

    Read the article

  • Someone please can see why the following prepared statment returns nothing?

    - by jartaud
    $stmt = mysqli_prepare($link,"SELECT *FROM ads INNER JOIN dept ON dept.id_dept = ads.in_dpt INNER JOIN members ON members.idMem = ads.from_Mem INNER JOIN sub_cat_ad ON id_sub_cat = ads.ads_in_Cat INNER JOIN cat_ad ON idCat_ad = sub_cat_ad.from_cat_ad WHERE ads_in_Cat = ? "); if(isset($_GET['fromSCat'])){ $fromSCat = mysqli_real_escape_string($link,$_GET['fromSCat']);} mysqli_stmt_bind_param($stmt,'i',$fromSCat); mysqli_stmt_execute($stmt); mysqli_stmt_fetch($stmt); $tot=mysqli_stmt_num_rows($stmt); //Ouput: 0

    Read the article

1