Jump to content

sstangle73

Members
  • Posts

    288
  • Joined

  • Last visited

Posts posted by sstangle73

  1. I may just not be understanding the file reader api, but

     

    When I try to run:

     

       

        for (var i = 0, f1, f2; f1 = files[sorted_index[i]], f2 = files[sorted_index[i+1]]; i=i+2) {
    	var file_one;
    	var file_two;
    
    	if(f1.size < f2.size){
    		file_one = f1;
    		file_two = f2;
    	} else {
    		file_one = f2;
    		file_two = f1;
    	}
          
    	var file_one_contents;
    	var file_two_contents;
    
    
          var reader = new FileReader();
          reader.readAsText(file_one);
      reader.onload = readSuccess;
      
      function readSuccess(evt){
    	file_one_contents = evt.target.result;
      }
      var reader = new FileReader();
    	reader.readAsText(file_two);
    	reader.onload = readSuccess2;
      
      function readSuccess2(evt2){
    	file_two_contents = evt2.target.result;
      }
    
    	console.log(file_one_contents);
    	console.log(file_two_contents);

     

    The console log only contains *undefined* in it.

    The goal of the script it two read in two CSVs and take the data from the pair of files and do some computations.

     

    Thanks!

  2. Hi, onClick on a select element, I am trying to hide or show two different table rows. It does not seem to be working on internet explorer

     

    Thanks for any help!

     

    	function showMe (a, box) { 
      document.getElementById(a).style.display = "table-row";
      document.getElementById(a+"2").style.display = "table-row";
    }
    function hideMe (a, box) { 
      document.getElementById(a).style.display = "none";
      document.getElementById(a+"2").style.display = "none";
    } 	

    <tr><td><b>Account Type:</b><br><small>(If you are both a club and college coach, please select college coach)</small>:</td><td><SELECT NAME="type" size="3"><OPTION VALUE="coach" onClick="hideMe('hide', this)" >Coach/Manager</OPTION><OPTION VALUE="college_coach" onClick="showMe('hide', this)">College Coach</OPTION>
    							</SELECT></div>
    							</td></tr>
    							<tr id="hide" style="display:none;"><td><b>College:</b></td><td colspan="2"><input type="text" name="college" value=""></td></tr>
    							<tr id="hide2" style="display:none;"><td><b>Title:</b></td>
    							<td><select name="gender" size="1">
    						<option VALUE="men" >Men's</option><option VALUE="women" >Women's</option><option VALUE="both" >Men's and Women's</option>
    							</select></div>
    						</td>
    						<td><select name="title" size="1"><OPTION VALUE="head" >Head Coach</OPTION><OPTION VALUE="assistant" >Assistant Coach</OPTION>
    							</select></div>
    						</td></tr>

    here is the live demo if you would like to see it:

    http://new.maddogmania.com/application/register.php

  3. What would the headers have to be? this is what im using:

     

    		$to = $email;
    	$subject = "Mad Dog Mania Email Validation";
    	$message = "Test";
    	$from = "Mad Dog Mania <validation@maddogmania.com>";
    	$reply = "Steven Stangle <sstangle@maddogmania.com>";
    	$headers = 'From: '  . $from . "\r\n";
    	$headers .= 'Reply-to: '  . $reply . "\r\n";
    
    	$headers .= 'MIME-Version: 1.0' . "\r\n";
    	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    
    	@mail($email,$subject,$message,$headers);
    

     

    and i get these headers on gmail:

     

    from: Mad Dog Mania validation@maddogmania.com via ****.inmotionhosting.com

    sender-time: Sent at 1:13 PM (GMT-05:00). Current time there: 1:19 PM. ✆

    reply-to: Steven Stangle <sstangle@maddogmania.com>

    to: sstangle@maddogmania.com

    date: Sat, Dec 31, 2011 at 1:13 PM

    subject: Mad Dog Mania Email Validation

    mailed-by: ****.inmotionhosting.com

  4. I would like to do it through my site though. Many of the emails are just going to be registration conformation, but there are also emails to all the active registered people.

  5. What is the best way for sending email from PHP pages? I have two different cases, the first of single emails and then I also send bulk emails to many people at once, say 100.  Obviously need to hide the email addresses from the other people. Looking for the best way to get it passed spam filters and delivered with headers that dont cause red flags. Also efficient is always preferred :]

  6. What is the best way for sending email from PHP pages? I have two different cases, the first of single emails and then I also send bulk emails to many people at once, say 100.  Obviously need to hide the email addresses from the other people. Looking for the best way to get it passed spam filters and delivered with headers that dont cause red flags. Also efficient is always preferred :]

  7. hey all,

    When running this page there is no output (and no errors) not sure what is happening. any help is appreciated

     

    <?php
    $bigquery = "SELECT * FROM `" . $table . "` WHERE  `age_group` LIKE '" . $_GET[id] . "' AND `status` LIKE 'Accepted%' ORDER BY print_name ASC";
    $bigresult=mysql_query($bigquery) or die(mysql_error()); 
    while($bigarray=mysql_fetch_assoc($bigresult)){
    	$id = $bigarray['id'];
    
    	$result = mysql_query("SELECT * FROM `" . $roster_table . "` WHERE `id` = '" . $id . "'");
    	$array = mysql_fetch_array($result);
    	$team_name = $array['team_name'];
    	$organization = $array['organization'];
    	$team_color = $array['team_color'];
    	$website = $array['website'];
    	$coach1_name = $array['coach1_name'];
    	$coach1_phone = $array['coach1_phone'];
    	$coach1_email = $array['coach1_email'];
    	$coach2_name = $array['coach2_name'];
    	$coach2_phone = $array['coach2_phone'];
    	$coach2_email = $array['coach2_email'];
    	for($i=1; $i<=$roster_max; $i++){
    	${"player" . $i . "_number"} = $array['player' . $i . '_number'];
    	${"player" . $i . "_name"} = $array['player' . $i . '_name'];
    	${"player" . $i . "_grade"} = $array['player' . $i . '_grade'];
    	${"player" . $i . "_phone"} = $array['player' . $i . '_phone'];
    	${"player" . $i . "_email"} = $array['player' . $i . '_email'];
    	${"player" . $i . "_parents"} = $array['player' . $i . '_parents'];
    	}
    ?>
    				<table width="850px">
    				<tr><td class="title" style="width:50%;"><big><b>Team Name:</b></big></td><td class="dark"><big><? echo $team_name; ?></big></td></tr>
    				<tr><td class="title"><big><b>Organization:</b></big></td><td class="light"><big><? echo $organization; ?></big></td></tr>
    				<tr><td class="title"><big><b>Team Color:</b></big></td><td class="dark"><big><? echo $team_color; ?></big></td></tr>
    				<tr><td class="title"><big><b>Club or Team Website:</b></big></td><td class="dark"><big><? echo $website; ?></big></td></tr>
    				<tr><td colspan="2"><hr></td></tr>
    				</table>
    				<table width="850px">
    				<tr><td class="title"><b>Coach's Name</b></td><td class="title"><b>Phone Number</b></td><td class="title"><b>Email Address</b></td></tr>
    				<tr><td class="light"><? echo $coach1_name; ?></td><td class="light"><? echo $coach1_phone; ?></td><td class="light"><? echo $coach1_email; ?></td></tr>
    				<tr><td class="dark"><? echo $coach2_name; ?></td><td class="dark"><? echo $coach2_phone; ?></td><td class="dark"><? echo $coach2_email; ?></td></tr>
    				<tr><td colspan="3"><hr></td></tr>
    				</table>
    				<table width="850px">
    				<tr><td class="title"><b>#</b></td><td class="title"><b>Player's Name</b></td><td class="title"><b>Graduation<br>Year</b></td><td class="title"><b>Phone<br>Number</b></td><td class="title"><b>Email Address        </b></td><td class="title"><b>Parents' Names</b></td></tr>
    				<?php
    				for($i=1; $i<=$roster_max; $i++){
    				if ($i%2==0){
    				echo "<tr><td class=\"light\">" . ${"player" . $i . "_number"} . "</td><td class=\"light\">" . ${"player" . $i . "_name"} . "</td><td class=\"light\">" . ${"player" . $i . "_grade"} . "</td><td class=\"light\">" . ${"player" . $i . "_phone"} . "</td><td class=\"light\">" . ${"player" . $i . "_email"} . "</td><td class=\"light\">" . ${"player" . $i . "_parents"} . "</td></tr>";
    				} else {
    				echo "<tr><td class=\"dark\">" . ${"player" . $i . "_number"} . "</td><td class=\"dark\">" . ${"player" . $i . "_name"} . "</td><td class=\"dark\">" . ${"player" . $i . "_grade"} . "</td><td class=\"dark\">" . ${"player" . $i . "_phone"} . "</td><td class=\"dark\">" . ${"player" . $i . "_email"} . "</td><td class=\"dark\">" . ${"player" . $i . "_parents"} . "</td></tr>";
    				}
    				}
    				?>
    				</table>
    <?php
    	echo "<br><br>";
    	//$mpdf->AddPage();
    	}
    ?>
    

     

    Note: When the line "//$mpdf->AddPage();" is uncommented, the script will run through the big array once before throwing the error to a call to an undefined function (because $mpdf is undefined ;P)

     

    Thanks!

  8. Hey,

    I have a system set up where it selects from a database and sends an email to everyone. But the problem I am having is that it sends every email twice. I am not quite sure why it does that. Also, it takes the page FOREVER to load. Could someone help me to fix/optimize this code?

    Thanks!

     

    edit:

    Sometimes the browser comes back with this instead of a success message:

    No data received

    Unable to load the webpage because the server sent no data.

    Here are some suggestions:

    ·        Reload this web page later.

    Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

    $query="SELECT * FROM `" . $table . "` WHERE status LIKE 'Accepted%'"; 
    $result=mysql_query($query); 
    while($array=mysql_fetch_assoc($result)){
    $coach_email = $array['coach_email'];
    $contact_email = $array['contact_email'];
    $to = $coach_email . ", " . $contact_email;
    $subject = $_POST["subject"];
    $message = $_POST["message"];
    $message = stripslashes($message);
    $from = "Mad Dog Mania Showcase Tournament <nstangle@maddogmania.com>";
    $reply = "nstangle@maddogmania.com";
    $headers = 'From: '  . $from . "\r\n";
    $headers .= 'Reply-to: '  . $reply . "\r\n";
    $headers .= 'BCC: blast@maddogmania.com' . "\r\n";
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    mail($to,$subject,$message,$headers);	
    }
    $success=true;

  9. Yeah I know it is a mess. That will have to be a project for the next rainy day. It would help if i had ever learned CSS (haha only kinda kidding)

    Thanks for the help!

  10. the html fails on the facebook connect and alt values on images

    the css fails on link colors neither would effect this problem

    im looking at chrome, ff, safari all on win7

     

    for some reason the copyright seems to want to beunder the box on the right so how ever low that box goes is where the navigation is. how do i get it to switch to the lowest point

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