help with function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nma
    New Member
    • Aug 2007
    • 93

    help with function

    Hi
    Could anyone help me in the writing the line of codes in the function call?
    What should I write in if (genre = ????)
    Thanks

    nma

    [HTML]

    function selectMovies()
    {
    document.locati on='/moviebrowser/MB2mainscreen.p hp?director='+d ocument.categor ies.director.va lue+'&genre='+d ocument.categor ies.genre.value ;
    if (genre = ????)
    {
    logMainscreen(' genre droplist');
    }
    else
    {
    logMainscreen(' director droplist');
    }

    }
    ......
    .......

    function logMainscreen(_ action) {
    $.get("/moviebrowser/logMainscreen.p hp", {
    page: "MB2mainscreen" ,
    action: _action,
    userID: "<?php echo $_SESSION['user']->userID?>",
    type: "drop list"
    });
    }

    [/HTML]

    [PHP]

    <td width="100" align="left"><s elect onchange="selec tMovies()" name="genre" >
    <option value="all">ALL </option>
    <?php
    foreach($genres as $genre){
    $selected = ($_GET['genre'] == $genre->genreID)?'sele cted="true"':'' ;
    echo '<option value="' . $genre->genreID . '" ' . $selected . '>' . $genre->genreName . '</option>';
    }
    ?>
    </select>
    </td>
    ......
    <td width="100" align="left">
    <select onChange="selec tMovies()" name="director" ;>

    <option value="all">ALL </option>
    <?php

    foreach($direct ors as $director){
    $selected = ($_GET['director'] == $director->directorID)?'s elected="true"' :'';

    echo '<option value="' . $director->directorID . '" ' . $selected . '>' . $director->directorName . '</option>';
    }

    ?>
    </select>
    </td>
    [/PHP]
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Please remember to provide a meaningful Title for any threads started (see the FAQ entry Use a Good Thread Title).

    This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.

    MODERATOR
    Last edited by ronverdonk; Mar 10 '08, 02:32 PM. Reason: warning title and split thread

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      I have no idea what you're asking here..
      Explain more?

      Comment

      Working...