Jump to content

HDFilmMaker2112

Members
  • Posts

    547
  • Joined

  • Last visited

    Never

Posts posted by HDFilmMaker2112

  1. Yes you can dynamically add elements to a form via Ajax. Have you tried it?

     

    Thanks.

     

    Haven't tried it yet. Was going to bed when I posted this. Was looking to get an answer, so I would know if I had to start working on a work around or get straight to work on the next step, when I got up.

  2. I'm looking to know if I pull the middle portion of a HTML form via AJAX if the data entered in the form will actually submit? I'm pulling the middle portion based on a selection made via radio buttons at the top of the form. The middle portion contains the bulk of the form, which changes based on which user account type the user wants to register for.

     

    Here's the HTML Form:

     

    The <div id="signup_forms"> line is where the AJAX is inserted.

    <div class="register_wrapper">
    	<form action="">
    		<div class="register_account_type_position">
    		<p class="signup_title">Sign-Up for - Step One</p>
    		<p class="register_account_type_title">Account Type:</p>
    		<span class="register_account_type_personal_position"><input type="radio" value="personal" name="register_account_type" id="register_account_type_personal" class="register_account_type_personal" onclick="sendReq(\'personal\');" '; if((isset($_SESSION['account_type']) && $_SESSION['account_type']=="personal") || !isset($_SESSION['account_type'])){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_personal"><span class="register_radio_text">Personal</span></label></span>
    		<span class="register_account_type_music_position"><input type="radio" value="music" name="register_account_type" id="register_account_type_music" class="register_account_type_music" onclick="sendReq(\'music\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="music"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_music"><span class="register_radio_text">Band/Recording Artist</span></label></span>
    		<span class="register_account_type_film_position"><input type="radio" value="film" name="register_account_type" id="register_account_type_film" class="register_account_type_film" onclick="sendReq(\'film\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="film"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_film"><span class="register_radio_text">Filmmaker/Actor</span></label></span>
    		<span class="register_account_type_business_position"><input type="radio" value="business" name="register_account_type" id="register_account_type_business" class="register_account_type_business" onclick="sendReq(\'business\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="business"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_business"><span class="register_radio_text">Business</span></label></span>
    		<span class="register_account_type_other_position"><input type="radio" value="business" name="register_account_type" id="register_account_type_other" class="register_account_type_other" onclick="sendReq(\'other\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="other"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_other"><span class="register_radio_text">Other</span></label></span>
    		</div>
    	<div id="signup_forms">
    		<div class="register_form_wrapper">
    		<p class="register_form_position">
    		<label for="register_email"><span class="register_form_text">Email:</span></label> <input type="email" value="'.$_SESSION['register_email'].'" name="register_email" id="register_email" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_fname"><span class="register_form_text">First Name:</span></label> <input type="text" value="'.$_SESSION['register_fname'].'" name="register_fname" id="register_fname" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_lname"><span class="register_form_text">Last Name:</span></label> <input type="text" value="'.$_SESSION['register_lname'].'" name="register_lname" id="register_lname" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_check_email"><span class="register_form_text">Re-enter Email:</span></label> <input type="email" value="'.$_SESSION['register_check_email'].'" name="register_check_email" id="register_check_email" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_password"><span class="register_form_text">New Password:</span></label> <input type="password" value="'.$_SESSION['register_password'].'" name="register_password" id="register_password" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_check_password"><span class="register_form_text">Re-enter Password:</span></label> <input type="password" value="'.$_SESSION['register_check_password'].'" name="register_check_password" id="register_check_password" class="register_form" />
    		</p>
    		<p class="register_form_position_gender">
    		Gender:
    		<select name="gender" id="gender">
    		<option value=""></option>
    		<option value="Female">Female</option>
    		<option value="Male">Male</option>
    		</select>
    		</p>
    		<p class="register_form_position_birthday">
    		Birthday:
    		<select name="month" id="month" onchange="sndReq(year.value,this.value);">
    		<option value="">Month</option>
    		<option value="January">January</option>
    		<option value="February">February</option>
    		<option value="March">March</option>
    		<option value="April">April</option>
    		<option value="June">June</option>
    		<option value="July">July</option>
    		<option value="August">August</option>
    		<option value="September">September</option>
    		<option value="October">October</option>
    		<option value="November">November</option>
    		<option value="December">December</option>
    		</select>
    		<select name="day" id="day">
    		<option>Day</option>'."\n".
    		$day_menu
    		.'</select>
    		<select name="year" id="year" onchange="sndReq(this.value,month.value);">
    		<option>Year</option>'."\n".
    		$year_menu
    		.'</select>
    		</p>
    			<div class="register_membership_type_position">
    			<span class="register_membership_type_title">Membership Type:</span>
    			<span class="register_membership_type_basic_position"><input type="radio" value="basic" name="register_membership_type" id="register_membership_type_basic" class="register_membership_type_basic" '; if((isset($_SESSION['membership_type']) && $_SESSION['membership_type']=="basic") || !isset($_SESSION['membership_type'])){ $content.='checked="checked" '; } $content.='/> <label for="register_membership_type_basic"><span class="register_radio_text">Basic</span></label></span>
    			<span class="register_membership_type_premium_position"><input type="radio" value="premium" name="register_membership_type" id="register_membership_type_premium" class="register_membership_type_premium" '; if(isset($_SESSION['membership_type']) && $_SESSION['membership_type']=="premium"){ $content.='checked="checked" '; } $content.='/> <label for="register_membership_type_premium"><span class="register_radio_text">Premium</span></label></span>
    			<span class="register_membership_type_platinum_position"><input type="radio" value="platinum" name="register_membership_type" id="register_membership_type_platinum" class="register_membership_type_platinum" '; if(isset($_SESSION['membership_type']) && $_SESSION['membership_type']=="platinum"){ $content.='checked="checked" '; } $content.='/> <label for="register_membership_type_platinum"><span class="register_radio_text">Platinum</span></label></span>
    			</div>
    		</div>
    	</div>
    		<p class="register_form_position">
    		<input type="submit" value="Sign Up for Basic Membership" class="register_button_position" />
    		</p>
    	</form>
    </div>
    

     

    The current page pulled via AJAX:

     

    <?php
    require_once 'function.php';
    $form_type=$_GET['signup_type'];
    
    if($form_type=="music"){
    $content.='Test';
    }
    elseif($form_type=="film"){
    $content.='Test2';
    }
    elseif($form_type=="business"){
    $content.='Test3';
    }
    elseif($form_type=="other"){
    $content.='Test4';
    }
    else{
    $year_menu=generateBirthYearMenu(date("Y"));
    $day_menu=generateBirthDayMenu(null,null);
    $content.='<div class="register_form_wrapper">
    		<p class="register_form_position">
    		<label for="register_email"><span class="register_form_text">Email:</span></label> <input type="email" value="'.$_SESSION['register_email'].'" name="register_email" id="register_email" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_fname"><span class="register_form_text">First Name:</span></label> <input type="text" value="'.$_SESSION['register_fname'].'" name="register_fname" id="register_fname" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_lname"><span class="register_form_text">Last Name:</span></label> <input type="text" value="'.$_SESSION['register_lname'].'" name="register_lname" id="register_lname" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_check_email"><span class="register_form_text">Re-enter Email:</span></label> <input type="email" value="'.$_SESSION['register_check_email'].'" name="register_check_email" id="register_check_email" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_password"><span class="register_form_text">New Password:</span></label> <input type="password" value="'.$_SESSION['register_password'].'" name="register_password" id="register_password" class="register_form" />
    		</p>
    		<p class="register_form_position">
    		<label for="register_check_password"><span class="register_form_text">Re-enter Password:</span></label> <input type="password" value="'.$_SESSION['register_check_password'].'" name="register_check_password" id="register_check_password" class="register_form" />
    		</p>
    		<p class="register_form_position_gender">
    		Gender:
    		<select name="gender" id="gender">
    		<option value=""></option>
    		<option value="Female">Female</option>
    		<option value="Male">Male</option>
    		</select>
    		</p>
    		<p class="register_form_position_birthday">
    		Birthday:
    		<select name="month" id="month" onchange="sndReq(year.value,this.value);">
    		<option value="">Month</option>
    		<option value="January">January</option>
    		<option value="February">February</option>
    		<option value="March">March</option>
    		<option value="April">April</option>
    		<option value="June">June</option>
    		<option value="July">July</option>
    		<option value="August">August</option>
    		<option value="September">September</option>
    		<option value="October">October</option>
    		<option value="November">November</option>
    		<option value="December">December</option>
    		</select>
    		<select name="day" id="day">
    		<option>Day</option>'."\n".
    		$day_menu
    		.'</select>
    		<select name="year" id="year" onchange="sndReq(this.value,month.value);">
    		<option>Year</option>'."\n".
    		$year_menu
    		.'</select>
    		</p>
    			<div class="register_membership_type_position">
    			<span class="register_membership_type_title">Membership Type:</span>
    			<span class="register_membership_type_basic_position"><input type="radio" value="basic" name="register_membership_type" id="register_membership_type_basic" class="register_membership_type_basic" '; if((isset($_SESSION['membership_type']) && $_SESSION['membership_type']=="basic") || !isset($_SESSION['membership_type'])){ $content.='checked="checked" '; } $content.='/> <label for="register_membership_type_basic"><span class="register_radio_text">Basic</span></label></span>
    			<span class="register_membership_type_premium_position"><input type="radio" value="premium" name="register_membership_type" id="register_membership_type_premium" class="register_membership_type_premium" '; if(isset($_SESSION['membership_type']) && $_SESSION['membership_type']=="premium"){ $content.='checked="checked" '; } $content.='/> <label for="register_membership_type_premium"><span class="register_radio_text">Premium</span></label></span>
    			<span class="register_membership_type_platinum_position"><input type="radio" value="platinum" name="register_membership_type" id="register_membership_type_platinum" class="register_membership_type_platinum" '; if(isset($_SESSION['membership_type']) && $_SESSION['membership_type']=="platinum"){ $content.='checked="checked" '; } $content.='/> <label for="register_membership_type_platinum"><span class="register_radio_text">Platinum</span></label></span>
    			</div>
    		</div>';
    }
    
    echo $content;
    
    ?>
    

  3. Alright, I got it. I had a bunch of extra junk at the top of the Ajax.js page.

     

     

    Now, using the ajax functions, that weren't included in my last issue, I need a little help figuring out how to get the values from each of the Month select menu and the Year select menu into the Day function. So I can make it so if someone selects February and a leap year it place 29 into the array, and if it's February and not a leap year it keeps 29 out of the array.

     

    function requestObj() {
    var xmlhttp;
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    return xmlhttp;
    }
    
    
    var http = requestObj();
    
    function sndReq(year,month){
        http.open('get', 'day_menu.php?year='+year+'&month='+month, true);
        http.onreadystatechange = handleResponse;
        http.send(null);
    }
    
    function handleResponse(){
        if(http.readyState == 4){
            var response = http.responseText;
            document.getElementById("day").innerHTML = response;
        }
    }
    

     

    function generateBirthYearMenu($current_year){
    session_start();
    $earliest_year=$current_year-100;
    $cutoff_year=$current_year-12;
    $year="";
    while($cutoff_year >= $earliest_year){
    $year.='<option value="'.$cutoff_year.'"'; if(isset($_SESSION['birthday_year']) && $_SESSION['birthday_year']==$cutoff_year){ $year.=' selected="selected"'; } $year.='>'.$cutoff_year.'</option>'."\n";
    $cutoff_year--;
    }
    return $year;
    }
    
    function generateBirthDayMenu($month,$year){
    session_start();
    $day_array=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28);
    $month_array1=array("April", "June", "September", "November");
    $month_array2=array("January", "March", "May", "July", "August", "October", "December");
    
    if($month=="February" && ($year=="" || $year=null)){
    
    }
    
    elseif($month=="February" && ($year % 4) ==0 && (($year % 100) !=0 || ($year % 400) ==0)){
    array_push($day_array, "29");
    }
    
    else{
    array_push($day_array, "29", "30", "31");
    }
    
    foreach($month_array1 as $month_value){
    if($month==$month_value){
    array_push($day_array, "29", "30");
    }
    }
    
    foreach($month_array2 as $month_value){
    if($month==$month_value){
    array_push($day_array, "29", "30", "31");
    }
    }
    
    foreach($day_array as $day_item){
    $day.='<option value="'.$day_item.'"'; if(isset($_SESSION['birthday_day']) && $_SESSION['day']==$day_item){ $day.=' selected="selected"'; } $day.='>'.$day_item.'</option>'."\n";
    }
    
    return $day;
    }
    

     

     

    day_menu.php

    <?php
    require_once 'function.php';
    $month=$_GET['month'];
    $year=$_GET['year'];
    $form_day_menu=generateBirthDayMenu($month,$year);
    
    echo "<select name=\"day\">
    <option>Day</option>
    $form_day_menu
    </select>";
    ?>
    

  4. Alright, so just

     

    return xmlhttp;
    

     

    Inside the RequestObj function?

     

    Doesn't seem like it did anything.

     

     

    Here's the modified AJAX:

     

    function requestObj() {
    var xmlhttp;
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    return xmlhttp;
    }
    
    
    var http = requestObj();
    
    function sndReq(year,month) {
        http.open('get', 'day_menu.php?year='+year+'&month='+month, true);
        http.onreadystatechange = handleResponse;
        http.send(null);
    return false;
    }
    
    function handleResponse() {
        if(http.readyState == 4){
            var response = http.responseText;
            document.getElementById("day").innerHTML = response;
        }
    }
    
    
    
    var http2 = requestObj();
    
    function sendReq(signup_type) {
        http2.open('get', 'signup.php?signup_type='+signup_type, true);
        http2.onreadystatechange = handleRes;
        http2.send(null);
    }
    
    function handleRes() {
        if(http2.readyState == 4){
            var res = http2.responseText;
            document.getElementById("signup_forms").innerHTML = res;
        }
    }
    

  5. The below AJAX code is not working. It's not pulling the data from the page. I've written out the variable from HTML code (i.e; document.write(signup_type); ) which prints out the right data to send via the query string to the php page, but it doesn't seem to be sending the data to the php page or receiving the response.

     

     

    function requestObj() {
    var xmlhttp;
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
    
    var http = requestObj();
    
    function sndReq(year,month) {
        http.open('get', 'day_menu.php?year='+year+'&month='+month, true);
        http.onreadystatechange = handleResponse;
        http.send(null);
    }
    
    function handleResponse() {
        if(http.readyState == 4){
            var response = http.responseText;
            document.getElementById("day").innerHTML = response;
        }
    }
    
    
    
    var http2 = requestObj();
    
    function sendReq(signup_type) {
        http2.open('get', 'signup.php?signup_type='+signup_type, true);
        http2.onreadystatechange = handleRes;
        http2.send(null);
    }
    
    function handleRes() {
        if(http2.readyState == 4){
            var res = http2.responseText;
            document.getElementById("signup_forms").innerHTML = res;
        }
    }
    

     

    <div class="register_ad_wrapper">
    <div class="register_wrapper">
    <form action="">
    <div class="register_account_type_position">
    <p class="signup_title">Sign-Up for - Step One</p>
    <p class="register_account_type_title">Account Type:</p>
    <span class="register_account_type_personal_position"><input type="radio" value="personal" name="register_account_type" id="register_account_type_personal" class="register_account_type_personal" onclick="sendReq(\'personal\');" '; if((isset($_SESSION['account_type']) && $_SESSION['account_type']=="personal") || !isset($_SESSION['account_type'])){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_personal"><span class="register_radio_text">Personal</span></label></span>
    <span class="register_account_type_music_position"><input type="radio" value="music" name="register_account_type" id="register_account_type_music" class="register_account_type_music" onclick="sendReq(\'music\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="music"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_music"><span class="register_radio_text">Band/Recording Artist</span></label></span>
    <span class="register_account_type_film_position"><input type="radio" value="film" name="register_account_type" id="register_account_type_film" class="register_account_type_film" onclick="sendReq(\'film\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="film"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_film"><span class="register_radio_text">Filmmaker/Actor</span></label></span>
    <span class="register_account_type_business_position"><input type="radio" value="business" name="register_account_type" id="register_account_type_business" class="register_account_type_business" onclick="sendReq(\'business\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="business"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_business"><span class="register_radio_text">Business</span></label></span>
    <span class="register_account_type_other_position"><input type="radio" value="business" name="register_account_type" id="register_account_type_other" class="register_account_type_other" onclick="sendReq(\'other\');" '; if(isset($_SESSION['account_type']) && $_SESSION['account_type']=="other"){ $content.='checked="checked" '; } $content.='/> <label for="register_account_type_other"><span class="register_radio_text">Other</span></label></span>
    </div>
    <div id="signup_forms">
    <div class="register_form_wrapper">
    <p class="register_form_position">
    <label for="register_email"><span class="register_form_text">Email:</span></label> <input type="email" value="'.$_SESSION['register_email'].'" name="register_email" id="register_email" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_fname"><span class="register_form_text">First Name:</span></label> <input type="text" value="'.$_SESSION['register_fname'].'" name="register_fname" id="register_fname" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_lname"><span class="register_form_text">Last Name:</span></label> <input type="text" value="'.$_SESSION['register_lname'].'" name="register_lname" id="register_lname" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_check_email"><span class="register_form_text">Re-enter Email:</span></label> <input type="email" value="'.$_SESSION['register_check_email'].'" name="register_check_email" id="register_check_email" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_password"><span class="register_form_text">New Password:</span></label> <input type="password" value="'.$_SESSION['register_password'].'" name="register_password" id="register_password" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_check_password"><span class="register_form_text">Re-enter Password:</span></label> <input type="password" value="'.$_SESSION['register_check_password'].'" name="register_check_password" id="register_check_password" class="register_form" />
    </p>
    <p class="register_form_position_gender">
    Gender:
    <select name="month" id="month">
    <option value=""></option>
    <option value="Female">Female</option>
    <option value="Male">Male</option>
    </select>
    </p>
    <p class="register_form_position_birthday">
    Birthday:
    <select name="month" id="month">
    <option value="">Month</option>
    <option value="January">January</option>
    <option value="February">February</option>
    <option value="March">March</option>
    <option value="April">April</option>
    <option value="June">June</option>
    <option value="July">July</option>
    <option value="August">August</option>
    <option value="September">September</option>
    <option value="October">October</option>
    <option value="November">November</option>
    <option value="December">December</option>
    </select>
    <select name="day" id="day">
    <option>Day</option>'."\n".
    $day_menu
    .'</select>
    <select name="year" id="year">
    <option>Year</option>'."\n".
    $year_menu
    .'</select>
    </p>
    <p class="register_form_position">
    <input type="submit" value="Sign Up for Basic Membership" class="register_button_position" />
    </p>
    </div>
    </form>
    </div>
    </div>
    <div class="ad_wrapper">
    Ad
    </div>
    </div>
    

     

    <?php
    $form_type=$_GET['signup_type'];
    
    if($form_type=="music"){
    $content.='Test';
    }
    elseif($form_type=="film"){
    $content.='Test2';
    }
    elseif($form_type=="business"){
    $content.='Test3';
    }
    elseif($form_type=="other"){
    $content.='Test4';
    }
    else{
    $content.='
    <div class="register_form_wrapper">
    <p class="register_form_position">
    <label for="register_email"><span class="register_form_text">Email:</span></label> <input type="email" value="'.$_SESSION['register_email'].'" name="register_email" id="register_email" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_fname"><span class="register_form_text">First Name:</span></label> <input type="text" value="'.$_SESSION['register_fname'].'" name="register_fname" id="register_fname" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_lname"><span class="register_form_text">Last Name:</span></label> <input type="text" value="'.$_SESSION['register_lname'].'" name="register_lname" id="register_lname" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_check_email"><span class="register_form_text">Re-enter Email:</span></label> <input type="email" value="'.$_SESSION['register_check_email'].'" name="register_check_email" id="register_check_email" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_password"><span class="register_form_text">New Password:</span></label> <input type="password" value="'.$_SESSION['register_password'].'" name="register_password" id="register_password" class="register_form" />
    </p>
    <p class="register_form_position">
    <label for="register_check_password"><span class="register_form_text">Re-enter Password:</span></label> <input type="password" value="'.$_SESSION['register_check_password'].'" name="register_check_password" id="register_check_password" class="register_form" />
    </p>
    <p class="register_form_position_gender">
    Gender:
    <select name="month" id="month">
    <option value=""></option>
    <option value="Female">Female</option>
    <option value="Male">Male</option>
    </select>
    </p>
    <p class="register_form_position_birthday">
    Birthday:
    <select name="month" id="month">
    <option value="">Month</option>
    <option value="January">January</option>
    <option value="February">February</option>
    <option value="March">March</option>
    <option value="April">April</option>
    <option value="June">June</option>
    <option value="July">July</option>
    <option value="August">August</option>
    <option value="September">September</option>
    <option value="October">October</option>
    <option value="November">November</option>
    <option value="December">December</option>
    </select>
    <select name="day" id="day">
    <option>Day</option>'."\n".
    $day_menu
    .'</select>
    <select name="year" id="year">
    <option>Year</option>'."\n".
    $year_menu
    .'</select>
    </p>
    <p class="register_form_position">
    <input type="submit" value="Sign Up for Basic Membership" class="register_button_position" />
    </p>
    </div>';
    }
    
    echo $content;
    
    ?>
    

  6. Well I changed the div to an id and the div background color has disappeared and it's being treated as if the browser window is below 1000px all the time, even if I enlarge it across two monitors.

     

    http://area51entertainment.co/emoto/

     

    Nothing above this point has changed
    
    </head>
    <body>
    <div class="wrapper">
    <div id="header_float">
    <div class="header_wrapper">
    <div class="logo">
    Picture
    </div>
    <div class="links">
    Home | Settings | Notifications | Requests | Messages | Search Bar
    </div>
    <div class="links_right">
    Profile Link/Sign-Out 
    </div>
    </div>
    </div>
    <div class="content_wrapper">
    Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 T
    est2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2
    </div>
    </div>
    </body>
    </html>
    

     

     

  7. What should I do to make it work, because it's not.

     

    The element stays fixed and the javascript seems to have no effect.

     

     

    EDIT: Well I see the issue now, it's because the javascript is looking for an ID, but I'm using class in CSS. Anyway, to use a class in the javascript

     

    Something like:

     

    document.getElementByClass('header_float').style.position = 'absolute';
    

  8. Based on my last thread, I need to convert a positioning style from fixed to absolute based on screen size.

     

    Here's what I have; which is currently not changing to absolute when the browser is resized below 1000px.

     

    float.js

    if (screen.availWidth<=1000)
    document.getElementById('header_float').style.position = 'absolute';
    else
    document.getElementById('header_float').style.position = 'fixed';
    

     

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
    <base href="http://www.area51entertainment.co/" />
    <title>Emoto <?php echo "$section"; ?></title>
    <meta charset="UTF-8" /> 
    <meta name="verify-v1" content="" />
    <meta name="keywords" content=""  />
    <meta name="description" content="" />
    <meta name="author" content="Andrew McCarrick" />
    <meta name="robots" content="index, follow" />
    <style type="text/css">
    body,html {
    background: #FFFFFF; /* Old browsers */
    color: #000000; 
    font-family: Verdana; 
    margin-right:auto;
    margin-left:auto;
    max-width:1000px;
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    }
    </style>
    <link rel="stylesheet" href="emoto/style.css" media="screen" />
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <link rel="apple-touch-icon" href="http://www.area51entertainment.co/TouchIcon.png" />
    <link rel="apple-touch-icon-precomposed" href="http://www.area51entertainment.co/TouchIcon.png" /> 
    <link rel="image_src" href="./logo.png" /> 
    <script language="javascript" src="emoto/float.js"></script>
    
    </head>
    <body>
    <div class="wrapper">
    <div class="header_float">
    <div class="header_wrapper">
    <div class="logo">
    Picture
    </div>
    <div class="links">
    Home | Settings | Notifications | Requests | Messages | Search Bar
    </div>
    <div class="links_right">
    Profile Link/Sign-Out 
    </div>
    </div>
    </div>
    <div class="content_wrapper">
    Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 T
    est2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2
    </div>
    </div>
    </body>
    </html>
    

     

    style.css

    .header_float{
    width: 100%;
    min-width: 1000px;
    height: 35px;
    left:0;
    right:0;
    top:0;
    position: fixed;
    background: #49963A;
    z-index: 1000;
    }
    

  9. I see what you're saying now.  Facebook actually switches their header from position:fixed to position:absolute when your browser is too narrow.

     

    So they do. Completely missed that. Thanks. I'd still like to be fixed with the ability to scroll, but I guess if facebook doesn't even do it (and they use a crap load of javascript), it must be a PITA to do at best.

  10. I guess I haven't explained myself well enough.

     

    I'm basically looking to replicate the top bar on facebook.

     

    If you go to facebook.com and decrease the window size, you scroll the window bar at the bottom of the page and it will scroll the fixed bar at the top.

     

    http://www.area51entertainment.co/emoto/1.png

     

    then if you scroll to the right you get this:

     

    http://www.area51entertainment.co/emoto/2.png

     

     

    Right now facebook would look like this if it was using my code:

    http://www.area51entertainment.co/emoto/3.png

    (The page wouldn't scroll the fixed div tag at the top, even if the rest of the page was scrolled to the right.)

  11. Why would you need JS?  Wouldn't this simple CSS work?

     

    position: fixed;
    width: 100%;
    min-width: 1000px;
    overflow: auto;
    

     

    Nope. It seems with fixed elements they're permanently fixed at the pixel x & y points set by the width and height and position settings; regardless of the resizing of the window or using overflow.

  12. I have a fixed div tag on the page. What I need to happen is when a user resizes their window down below 1000px, to permit the fixed div to scroll horizontally. As of right now, it just gets chopped off. I found a jquery plug-in and am trying to use it, but I don't understand how to (or if it's even what I need to be using).

     

    http://www.area51entertainment.co/emoto

     

    Here's what I have right now:

     

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
    <base href="http://www.area51entertainment.co/" />
    <title>Emoto <?php echo "$section"; ?></title>
    <meta charset="UTF-8" /> 
    <meta name="verify-v1" content="" />
    <meta name="keywords" content=""  />
    <meta name="description" content="" />
    <meta name="author" content="Andrew McCarrick" />
    <?
    if(isset($_GET['investors'])){
    echo '<meta name="robots" content="noindex, nofollow" />';
    }
    else{
    echo '<meta name="robots" content="index, follow" />';
    }
    ?>
    <style type="text/css">
    body,html {
    background: #FFFFFF; /* Old browsers */
    color: #000000; 
    font-family: Verdana; 
    margin-right:auto;
    margin-left:auto;
    max-width:1000px;
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    }
    </style>
    <link rel="stylesheet" href="emoto/style.css" media="screen" />
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <link rel="apple-touch-icon" href="http://www.area51entertainment.co/TouchIcon.png" />
    <link rel="apple-touch-icon-precomposed" href="http://www.area51entertainment.co/TouchIcon.png" /> 
    <link rel="image_src" href="./logo.png" /> 
    <script language="javascript" src="emoto/jquery-1.7.2.js"></script>
    <script language="javascript" src="emoto/jquery.scrollstay.js"></script>
    
    </head>
    <body>
    <div class="wrapper">
    <div class="header_float">
    <div class="header_wrapper">
    <div class="logo">
    Picture
    </div>
    <div class="links">
    Home | Settings | Notifications | Requests | Messages | Search Bar
    </div>
    <div class="links_right">
    Profile Link/Sign-Out 
    </div>
    </div>
    </div>
    <div class="content_wrapper">
    Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 
    Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 T
    est2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2Test2Test2 Test2
    </div>
    </div>
    </body>
    </html>
    

     

    jquery

    /**
    * jquery.scrollstay.js
    * scrollFollow for minimalists.
    *
    * Derived from jquery.scrollFollow.js by R.A. Ray,
    * Copyright (c) 2008 Net Perspective (http://kitchen.net-perspective.com/)
    * Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php)
    * 
    * Removed all animation, delay, cookies and killSwitch.
    * 
    * @author Dylan McCall
    *
    * @projectDescription	jQuery plugin that quietly keeps an element visible as the user scrolls
    * 
    * @version 0.4.0
    * 
    * @requires jquery.js (tested with 1.2.6)
    * 
    * @param offset			int - Number of pixels box should remain from top of viewport
    * 								default: 0
    * @param container	string - ID of the containing div
    * 								default: box's immediate parent
    * @param relativeTo	string - Scroll animation can be relative to either the 'top' or 'bottom' of the viewport
    * 								default: 'top'
    */
    
    ( function( $ ) {
    
    $.scrollStay = function ( box, options ) {
    	// Convert box into a jQuery object
    	box = $( box );
    
    	// 'box' is the object to be animated
    	var position = box.css( 'header_float' );
    
    	function update() {
    		// A bunch of values we need to determine where to animate to
    		var viewportHeight = parseInt( $( window ).height() );
    		var pageScroll =  parseInt( $( document ).scrollTop() );
    		var parentTop =  parseInt( box.cont.offset().top );
    		var parentHeight = parseInt( box.cont.attr( 'offsetHeight' ) );
    		var boxHeight = parseInt( box.attr( 'offsetHeight' ) + ( parseInt( box.css( 'marginTop' ) ) || 0 ) + ( parseInt( box.css( 'marginBottom' ) ) || 0 ) );
    		var aniTop;
    
    		/* Make sure the user wants the animation to happen, and it
    		   will be helpful. (It isn't helpful if the user is trying
    		   to scroll within the box!) */
    		if ( viewportHeight > boxHeight ) {
    			// If the box should animate relative to the top of the window
    			if ( options.relativeTo == 'top' ) {
    				// Don't animate until the top of the window is close enough to the top of the box
    				if ( box.initialOffsetTop >= ( pageScroll + options.offset ) ) {
    					aniTop = box.initialTop;
    				} else {
    					aniTop = Math.min( ( Math.max( ( -parentTop ), ( pageScroll - box.initialOffsetTop + box.initialTop ) ) + options.offset ), ( parentHeight - boxHeight - box.paddingAdjustment ) );
    				}
    			}
    			// If the box should animate relative to the bottom of the window
    			else if ( options.relativeTo == 'bottom' ) {
    				// Don't animate until the bottom of the window is close enough to the bottom of the box
    				if ( ( box.initialOffsetTop + boxHeight ) >= ( pageScroll + options.offset + viewportHeight ) ) {
    					aniTop = box.initialTop;
    				} else {
    					aniTop = Math.min( ( pageScroll + viewportHeight - boxHeight - options.offset ), ( parentHeight - boxHeight ) );
    				}
    			}
    
    			box.css({ top: aniTop });
    		}
    	};
    
    	// If no parent ID was specified, and the immediate parent does not have an ID
    	// options.container will be undefined. So we need to figure out the parent element.
    	if ( options.container == '') {
    		box.cont = box.parent();
    	} else {
    		box.cont = $( '#' + options.container );
    	}
    
    	// Finds the default positioning of the box.
    	box.initialOffsetTop =  parseInt( box.offset().top );
    	box.initialTop = parseInt( box.css( 'top' ) ) || 0;
    
    	// Hack to fix different treatment of boxes positioned 'absolute' and 'relative'
    	if ( box.css( 'position' ) == 'relative' ) {
    		box.paddingAdjustment = parseInt( box.cont.css( 'paddingTop' ) ) + parseInt( box.cont.css( 'paddingBottom' ) );
    	} else {
    		box.paddingAdjustment = 0;
    	}
    
    	// Animate the box when the page is scrolled
    	$( window ).bind('scroll resize', function () {
    		update();
    	} );
    
    	// Run an initial animation on page load
    	update();
    };
    
    $.fn.scrollStay = function ( options ) {
    	options = options || {};
    	options.relativeTo = options.relativeTo || 'top';
    	options.offset = options.offset || 0;
    	options.container = options.container || this.parent().attr( 'id' );
    
    	this.each( function() {
    		new $.scrollStay( this, options );
    	} );
    
    	return this;
    };
    })( jQuery );
    

     

     

    a:link {color: #FFFFFF; text-decoration: none;}
    a:visited {color: #FFFFFF; text-decoration: none;}
    a:active {color: #FFFFFF; text-decoration: none;}
    a:hover {color: #3399FF; text-decoration: none;}
    
    .wrapper{
    min-height: 2000px;
    min-width: 1000px;
    }
    
    .header_float{
    width: 100%;
    min-width: 1000px;
    height: 35px;
    left:0;
    right:0;
    top:0;
    position: fixed;
    background: #49963A;
    z-index: 1000;
    }
    
    .header_wrapper{
    width: 1000px;
    height: 35px;
    margin-right:auto;
    margin-left:auto;
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    color: #FFFFFF;
    }
    
    .logo{
    float: left;
    width: 150px;
    height: 25px;
    font-size: 26px;
    position: relative;
    top: -1px;
    left: 8px;
    }
    
    .links{
    float: left;
    width: 670px;
    height: 25px;
    position: relative;
    top: 7px;
    }
    
    .links_right{
    float: right;
    width: 180px;
    height: 25px;
    position: relative;
    top: 7px;
    }
    
    .content_wrapper{
    position: relative;
    top: 35px;
    width: 995px;
    min-height: 450px;
    }
    
    img{
    border: 0px;
    }
    

  13. Here's my current ajax code. It's not loading anything... I need the tabs to come up as a default when the main page loads.

     

    
    function load(){
    if(type==undefined){
    type="000001";
    }
    sndReq(type);
    changeClr(type);
    }
    
    function requestObj() {
    var xmlhttp;
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
    
    var http = requestObj();
    
    function sndReq(type) {
        http.open('get', 'tab_viewer.php?film_id='+type, true);
        http.onreadystatechange = handleResponse;
        http.send(null);
    }
    
    function handleResponse() {
        if(http.readyState == 4){
            var response = http.responseText;
            document.getElementById("tabs").innerHTML = response;
        }
    }
    
    

     

    Here is where it's being called:

    <?php
    $num_projects=15;
    $scroller_projects="";
    
    require_once 'db_select.php';
    $project_query_num="SELECT COUNT(*) FROM $tbl_name";
    $project_result_num=mysql_query($project_query_num);
    $project_row_num=mysql_fetch_row($project_result_num);
    $project_row_num=$project_row_num[0];
    
    if($project_row_num <= $num_projects){
    $project_query="SELECT * FROM $tbl_name";
    $project_result=mysql_query($project_query);
    }
    else{
    $project_query="SELECT * FROM $tbl_name WHERE project_release_date BETWEEN $start_date AND $end_date LIMIT 0,$num_projects";
    $project_result=mysql_query($project_query);
    }
    $i=1;
    while($project_row=mysql_fetch_array($project_result)){
    extract($project_row);
    $scroller_projects.='<div class="project_entry" tabindex="'.$i.'" onclick="sndReq(\''.$project_id.'\');">Test</div>';
    $i++;
    }
    if($project_row_num==""){
    $project_row_num=$num_projects;
    }
    $scroller_width=$project_row_num*114;
    $content='
    <div class="video_scroller_wrapper">
    <div class="video" id="tabs">
    
    </div>
    
    
    <div class="recentfilms_wrapper">
    <div class="left_arrow"><img src="arrow_left.png" alt="Left" title=""  class="arrow_left" onclick="jumpLeft(\'recentfilms\')" onmouseover="startScrollLeft(\'recentfilms\')" onmouseout="stopScroll()" /></div> 
    <div id="recentfilms">
    <div id="scroller" style="width: '.$scroller_width.'px;">
    '.$scroller_projects.'
    </div>
    </div>
    <div class="right_arrow"><img src="arrow_right.png" alt="Left" title="" class="arrow_right" onclick="jumpRight(\'recentfilms\')" onmouseover="startScrollRight(\'recentfilms\')" onmouseout="stopScroll()" /></div>
    </div>
    </div>
    <div class="news_wrapper">
    <div class="news">
    <div class="news_title"><span class="category_title_text">Latest News</span></div>
    <div class="news_text">
    <iframe src="http://www.indiegogo.com/project/widget/75876?a=9030" style="width: 224px; height: 429px; position: relative; left: 3px; top: 15px; border: 0px; overflow: hidden;"></iframe>
    </div>
    </div>
    </div>
    ';
    ?>
    

  14. mysql_fetch_assoc() returns an associative array. $project_result_num should be an int though ...

     

    Right, that's what I figured; but I've tried mysql_fetch_array (which is clearly an array), and mysql_fetch_row which also returns an array. What should I be using here?

  15. The below is outputting:

     

    Array

    Fatal error: Unsupported operand types in /home/zyquo/public_html/area51entertainment.co/maintenance/home.php on line 28

     

    So clearly $project_row_num is coming out as an array, and the multiplication is failing because its got a string not a number. I just don't see why it's getting an array out of $project_row_num.

     

    <?php
    $num_projects=15;
    $scroller_projects="";
    
    require_once 'db_select.php';
    $project_query_num="SELECT COUNT(*) FROM $tbl_name";
    $project_result_num=mysql_query($project_query_num);
    $project_row_num=mysql_fetch_assoc($project_result_num);
    
    echo $project_row_num;	
    //if($project_row_num <= $num_projects){
    $project_query="SELECT * FROM $tbl_name";
    $project_result=mysql_query($project_query);
    /*}
    else{
    $project_query="SELECT * FROM $tbl_name WHERE project_release_date BETWEEN $start_date AND $end_date LIMIT 0,$num_projects";
    $project_result=mysql_query($project_query);
    }*/
    $i=1;
    while($project_row=mysql_fetch_array($project_result)){
    extract($project_row);
    $scroller_projects.='<div class="project_entry" tabindex="'.$i.'" onclick="sndReq(\''.$project_id.'\');">Test</div>';
    $i++;
    }
    if($project_row_num==""){
    $films_row_num=$num_projects;
    }
    $scroller_width=$project_row_num*114;
    $content='
    <div class="video_scroller_wrapper">
    <div class="video" id="tabs">
    
    </div>
    
    
    <div class="recentfilms_wrapper">
    <div class="left_arrow"><img src="arrow_left.png" alt="Left" title=""  class="arrow_left" onclick="jumpLeft(\'recentfilms\')" onmouseover="startScrollLeft(\'recentfilms\')" onmouseout="stopScroll()" /></div> 
    <div id="recentfilms">
    <div id="scroller" style="width: '.$scroller_width.'px;">
    '.$scroller_projects.'
    </div>
    </div>
    <div class="right_arrow"><img src="arrow_right.png" alt="Left" title="" class="arrow_right" onclick="jumpRight(\'recentfilms\')" onmouseover="startScrollRight(\'recentfilms\')" onmouseout="stopScroll()" /></div>
    </div>
    </div>
    <div class="news_wrapper">
    <div class="news">
    <div class="news_title"><span class="category_title_text">Latest News</span></div>
    <div class="news_text">
    <iframe src="http://www.indiegogo.com/project/widget/75876?a=9030" style="width: 224px; height: 429px; position: relative; left: 3px; top: 15px; border: 0px; overflow: hidden;"></iframe>
    </div>
    </div>
    </div>
    ';
    ?>
    

  16. I just want to see if I'm going in the right direction with this.

     

    The below has tabs, and then a window above it (loaded via AJAX).

     

    tabs_viewer.php

    <?php
    if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
      header("Content-type: application/xhtml+xml");
    }
    else {
      header("Content-type: text/html");
    }
    ?>
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
    <link rel="stylesheet" href="style.css" media="screen" />
    </head>
    <body>
    <div id="viewer">
    
    </div>
    
    <div class="tabs_video_wrapper">
    <div class="tabs_video"><span class="tabs_video_text" onclick="">View Trailer</span></div>
    <div class="tabs_video"><span class="tabs_video_text" onclick="">Project Details</span></div>
    <div class="tabs_video"><span class="tabs_video_text" onclick="">Offical Site</span></div>
    <div class="tabs_video"><span class="tabs_video_text" onclick="">Buy Tickets</span></div>
    <div class="tabs_video"><span class="tabs_video_text">Twitter</span></div>
    </div>
    
    </body>
    </html>
    

     

     

    project_viewer.php

    This is the page that contains what goes in the "viewer" div via AJAX.

    <?php
    if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
      header("Content-type: application/xhtml+xml");
    }
    else {
      header("Content-type: text/html");
    }
    
    if($view=="trailer"){
    $content='<div href="video/Area51EntertainmentCommercialLow.mp4" id="player"> 
    </div>
    <script>
    flowplayer("player", "./flowplayer-3.2.7-0.swf");
    </script>';
    }
    elseif($view="details"){
    
    }
    elseif($view="tickets"){
    
    }
    ?>
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
    <script type="text/javascript" src="flowplayer-3.2.6.min.js"></script>
    <link rel="stylesheet" href="style.css" media="screen" />
    </head>
    <body>
    <?
    echo $content;
    ?>
    </body>
    </html>
    

     

     

    Now if you view this page: http://www.area51entertainment.co/maintenance/

     

    The blank area above the scroller, with the white boxes, is where both of those pages will go via AJAX. Now the white boxes in the scroller will contain images/poster for films. Each of those will trigger an AJAX call (when clicked) to the tabs_viewer.php sending along the films id number, and in turn tabs_viewer.php will control the display of the content, by calling project_viewer.php.

     

     

    So, am I going the right way here, or is there a way to simplify this?

  17. Can't use session_register... register_globals is turned off on my server.

     

    And according to php.net

     

    Caution

     

    If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered.

  18. The below is constantly loading the password page no matter what is enter in the password input on the form (on another page). I have checked the $login variable by echoing it and it is carrying the value from the field.

     

    <?php
    $off="yes";
    $login=$_POST['login'];
    if($off=="yes" && (!isset($_SESSION['login']) || $_SESSION['login']!="pass")){
        if($login=="" || $_SESSION['login']!="pass"){
        header('Location: ./index2.html');
        exit();
        }
        elseif(!isset($_SESSION['login'])){
        session_start();
        $_SESSION['login']=$login;
        header('Location: ./index.php');
        exit();
        }
    }
    elseif($off=="no" || $_SESSION['login']=="pass"){
    content goes here.
    }
    ?> 
    

  19. I have a div with a background color set, that I want to have slightly transparent. Inside that div, is essentially my entire website. Now if I apply the opacity to the main outer div, all the divs inside inherit that transparency. Any ways to get around this?

     

    The outer Div with the transparency is the "content_wrapper" div. It excludes the header and footer. So the only issue is correcting everything wrapped inside the "content_wrapper" and "content" div. I tried setting the "content" div to opacity: 1; but it had no effect whatsoever.

     

    http://www.area51entertainment.co/index.php?about

  20. Pretty much got everything done. Just need help with the last piece.

     

    I need the mouseover timeout to reset every time someone clicks the scroll left or scroll right control. Right now, it waits 2 seconds then starts moving.

     

    http://www.area51entertainment.co/index.php

     

    Here's the code:

     

    scroll.js

    function loadNew() {
    var myCont = document.getElementById ("recentfilms");
    myCont.scrollLeft = 2*140;
    }
    
    scrollJump=140
    
    timerLeft="";
    timerRight="";
    
    function jumpLeft(id){
      document.getElementById(id).scrollLeft+=scrollJump;
      clearTimeout(timerLeft);
      timerLeft=setTimeout("scrollLeft('"+id+"')",2000);
    }
    
    function jumpRight(id){
      document.getElementById(id).scrollLeft-=scrollJump;
      clearTimeout(timerRight);
      timerRight=setTimeout("scrollRight('"+id+"')",2000);
    }
    
    scrollStep=2
    
    function scrollLeft(id){
      clearTimeout(timerRight);
      document.getElementById(id).scrollLeft+=scrollStep;
      timerRight=setTimeout("scrollLeft('"+id+"')",;
    }
    
    function startScrollLeft(id){
    clearTimeout(timerRight);
    timerRight=setTimeout("scrollLeft('"+id+"')",2000);
    }
    
    function scrollRight(id){
      clearTimeout(timerLeft);
      document.getElementById(id).scrollLeft-=scrollStep;
      timerLeft=setTimeout("scrollRight('"+id+"')",;
    }
    
    function startScrollRight(id){
    clearTimeout(timerLeft);
    timerLeft=setTimeout("scrollRight('"+id+"')",2000);
    }
    
    function stopScroll(){
      clearTimeout(timerRight);
      clearTimeout(timerLeft);
    }
    

     

    <?php
    require_once 'func.php';
    
    if(isset($_GET['contact'])){
    
    }
    else{
    $javascript='<script type="text/javascript" src="scroll.js"></script>'."\n";
    }
    if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
      header("Content-type: application/xhtml+xml");
    }
    else {
      header("Content-type: text/html");
    }
    ?>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
    <base href="http://www.area51entertainment.co/" />
    <title>Area 51 Entertainment <?php echo "$section"; ?></title>
    <meta charset="UTF-8" /> 
    <meta name="verify-v1" content="" />
    <meta name="keywords" content=""  />
    <meta name="description" content="" />
    <meta name="author" content="Andrew McCarrick" />
    <meta name="robots" content="index, follow" />
    <style type="text/css">
    body,html {
    background: #000000; /* Old browsers */
    /* IE9 SVG, needs conditional override of 'filter' to 'none' */
    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQwMDQwMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
    background: -moz-linear-gradient(top, #400400 0%, #000000 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#400400), color-stop(100%,#000000)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #300300 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #300300 0%,#000000 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #300300 0%,#000000 100%); /* IE10+ */
    background: linear-gradient(top, #300300 0%,#000000 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#300300', endColorstr='#000000',GradientType=0 ); /* IE6-8 */
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #FFFFFF; 
    font-family: Verdana; 
    margin-right:auto;
    margin-left:auto;
    max-width:1000px;
    }
    </style>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <?php
    echo $javascript;
    ?>
    </head>
    <body onload="loadNew();">
    <div class="wrapper">
    
    <div class="head_wrapper">
    <div class="logo"></div>
    <div class="links">
    Home | Films | Television | DVD/Blu-Ray | Web | Music | About | Contact | Investors
    </div>
    </div>
    
    <div class="content_wrapper">
    <div class="video"></div>
    
    <div class="recentfilms_wrapper">
    <div class="left_arrow" onclick="jumpLeft('recentfilms')" onmouseover="startScrollLeft('recentfilms')" onmouseout="stopScroll()">scroll left</div> 
    <div id="recentfilms">
    <div id="scroller">
    <div class="film_entry" tabindex="1">Test</div>
    <div class="film_entry" tabindex="2">Test2</div>
    <div class="film_entry" tabindex="3">Test3</div>
    <div class="film_entry" tabindex="4">Test4</div>
    <div class="film_entry" tabindex="5">Test5</div>
    <div class="film_entry" tabindex="6">Test6</div>
    <div class="film_entry_last" tabindex="7">Test7</div>
    </div>
    </div>
    <div class="right_arrow" onclick="jumpRight('recentfilms')" onmouseover="startScrollRight('recentfilms')" onmouseout="stopScroll()">scroll right</div>
    </div>
    
    <div class="news"></div>
    </div>
    
    <div class="footer_wrapper">
    <div class="copyright"><? echo copyyear('2012'); ?> Area 51 Entertainment, Inc.</div>
    </div>
    
    </div>
    </body>
    </html>
    

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