Jump to content
Larry Ullman's Book Forums

selyah1@yahoo.com

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About selyah1@yahoo.com

  • Rank
    Newbie
  1. I have a javascript that generates random images when a page loads. It works fine, only the issue that I am having is that I have not figured out how to get it to display the name if each image as it is displayed on the screen. below is the script: Thanks <SCRIPT LANGUAGE="Javascript"> <!-- Begin var interval = 2.5; // delay between rotating images (in seconds) var random_display = 1; // 0 = no, 1 = yes interval *= 1000; var image_index = 0; image_list = new Array(); image_list[image_index++] = new imageItem("images/3channelorbal.jpg"); ... var number_of_image = image_list.length; function imageItem(image_location) { this.image_item = new Image(); this.image_item.src = image_location; } function get_ImageItemLocation(imageObj) { return(imageObj.image_item.src) } function generate(x, y) { var range = y - x + 1; return Math.floor(Math.random() * range) + x; } function getNextImage() { if (random_display) { image_index = generate(0, number_of_image-1); } else { image_index = (image_index+1) % number_of_image; } var new_image = get_ImageItemLocation(image_list[image_index]); return(new_image); } function rotateImage(place) { var new_image = getNextImage(); document[place].src = new_image; var recur_call = "rotateImage('"+place+"')"; setTimeout(recur_call, interval); } // End --> </script>
  2. Hello: I have being using the same file template on a number of sites and they have all worked, except for this one. I created a contactus.html pages with a form and a handle_form.php page to hadle the form. When i click on the "Send Message" button from the contactus page, I get a blank screen. I have went through the code and still not able to find where I am going wrong, Or if I am missing a code, etc. I am supplying the code and appologize if this is too long. (did not see an attachment link) thanks ian **********************contactus.html code******************************* <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Segma Engineering Group - Contact US</title> <meta http-equiv="content-type" content ="text/html; charset=encoding" /> <link rel="stylesheet" type="text/css" href="../css/style.css" charset="utf-8" /> </head> <body> <div id="main_container"> <br><br> <div id="contact_header" style="padding-top:25px" align="center"> <div id="header_txt">SEGMA ENGINEERING GROUP, LLC</div> <br /><br /> <br /> <br /><br /> <br /><br /> <div align="center"><a href="../index.html">Home</a> <!--<span style="padding-left:20px"><a href="../assets/staff.html">Staff</a></span> <span style="padding-left:20px"><a href="../assets/associates.html">Management</a></span>--> <span style="padding-left:20px"><a href="../assets/projects.html">Projects</a></span> <span style="padding-left:20px"><a href="../assets/gallery.html">Gallery</a></span> <!--<span style="padding-left:20px"><a href="../assets/affiliate.htmnl" target="_blank">Affiliate</a></span>--> <!--<span style="padding-left:20px"><a href="http://www.segmaengi...eringgroup.com" target="_blank">Affiliate</a></span>--> <span style="padding-left:20px"><a href="../assets/partners.html">Partners</a></span> <span style="padding-left:20px"><a href="contactus.html">Contact Us</a></span> <br /> </div> <br /> </div> <!--main body---> <div id="contact_main"> <h1 align="left"><i>General Inquiry</i></h1> <div align="left"> <p><font style="font-family:kunstler script; font-size=300%;">T</font>hank you for visiting Segma Group LLC. Please provide the following information and a member of our staff will contact you in response to your questions, and provide you with more information that you may require. Please be adivsed that we will not share any information that you provide in regards to this inquiry that can be used to identify you, unless we have your consent.</p><br /><br /> </div> <form action="handle_form.php" method="post" onsubmit="MM_validateForm('email','','NisEmail');MM_validateForm('fname','','R','lname','','R','email','','R');return document.MM_returnValue"> <div align="left"> <table width="900"> <tr align="left"> <td>First Name*:</td><td> </td><td><input type="text" name="fname" size="35" maxlength="35"></td></tr> <tr align="left"> <td>Last Name*:</td><td> </td><td><input type="text" name="lname" size="35" maxlength="35" ></td></tr> <tr align="left"> <td>Company Name*:</td><td> </td><td><input type="text" name="cname" size="35" maxlength="35" ></td></tr> <tr> <td>Address:</td><td> </td><td><input type="text" name="address" size="35" maxlength="35" ></td></tr> <tr> <td>State :</td><td> </td><td> <select name="state" size="1" id="state" preparse="preparse"> <option selected="selected" value="California">California </option> <option value="AL">Alabama </option> <option value="AK">Alaska </option> <option value="AZ">Arizona </option> <option value="AR">Arkansas </option> <option value="CA">California </option> <option value="CO">Colorado </option> <option value="CT">Connecticut </option> <option value="DE">Delaware </option> <option value="DC">District of Columbia </option> <option value="FL">Florida </option> <option value="GA">Georgia </option> <option value="HI">Hawaii </option> <option value="ID">Idaho </option> <option value="IL">Illinois </option> <option value="IN">Indiana </option> <option value="IA">Iowa </option> <option value="KS">Kansas </option> <option value="KY">Kentucky </option> <option value="LA">Louisiana </option> <option value="ME">Maine </option> <option value="MD">Maryland </option> <option value="MA">Massachusetts </option> <option value="MI">Michigan </option> <option value="MN">Minnesota </option> <option value="MS">Mississppi </option> <option value="MO">Missouri </option> <option value="MT">Montana </option> <option value="NE">Nebraska </option> <option value="NV">Nevada </option> <option value="NH">New Hampshire </option> <option value="NJ">New Jersey </option> <option value="NM">New Mexico </option> <option value="NY">New York </option> <option value="NC">North Carolina </option> <option value="ND">North Dakota </option> <option value="OH">Ohio </option> <option value="OK">Oklahoma </option> <option value="OR">Oregon </option> <option value="PA">Pennsylvania </option> <option value="RI">Rhode Island </option> <option value="SC">South Carolina </option> <option value="SD">South Dakota </option> <option value="TN">Tennessee </option> <option value="TX">Texas </option> <option value="UT">Utah </option> <option value="VT">Vermont </option> <option value="VA">Virginia </option> <option value="WA">Washington </option> <option value="WV">West Virginia </option> <option value="WI">Wisconsin </option> <option value="WY">Wyoming </option> <option value="AP">Armed Forces Pacific </option> <option value="AE">Armed Forces Europe </option> <option value="AA">Armed Forces America </option> <option value="---">-------------------- </option> <option value="AB">Alberta </option> <option value="BC">British Columbia </option> <option value="MB">Manitoba </option> <option value="NB">New Brunswick </option> <option value="NF">Newfoundland </option> <option value="NT">Northwest Territories </option> <option value="NS">Nova Scotia </option> <option value="ON">Ontario </option> <option value="PE">Prince Edward Island </option> <option value="PQ">Quebec </option> <option value="SK">Saskatchewan </option> <option value="YT">Yukon Territory</option> </select></td> <tr> <tr> <td>City:</td><td> </td><td><input type="text" name="city" size="35" maxlength="25" ></td> </tr> <tr> <td>Zipcode:</td><td> </td><td><input type="text" name="zipcode" size="10" maxlength="9" ></td></tr> <tr> <td>Country:</td><td> </td><td><select name="country" size="1" id="country" preparse="preparse"> <option selected="selected" value="---"></option> <option>AR Argentina</option> <option>AT Austria</option> <option>AU Australia</option> <option>AW Aruba</option> <option>BB Barbados</option> <option>BE Belgium</option> <option>BM Bermuda</option> <option>BR Brazil</option> <option>BS Bahamas</option> <option>CA Canada</option> <option>KY Cayman Islands</option> <option>CL Chile</option> <option>CN China</option> <option>CR Costa Rica</option> <option>CY Cyprus</option> <option>DK Denmark</option> <option>EG Egypt</option> <option>FI Finland</option> <option>FR France</option> <option>FX France, Metropolitan</option> <option>DE Germany</option> <option>GR Greece</option> <option>GU Guam</option> <option>GT Guatemala</option> <option>HK Hong Kong</option> <option>IS Iceland</option> <option>IE Ireland</option> <option>IL Israel</option> <option>IT Italy</option> <option>JM Jamaica</option> <option>JP Japan</option> <option>KR Korea, Republic of</option> <option>KW Kuwait</option> <option>LU Luxembourg</option> <option>MW Malawi</option> <option>MX Mexico</option> <option>MC Monaco</option> <option>NL Netherlands</option> <option>AN Netherlands Antilles</option> <option>NZ New Zealand</option> <option>NO Norway</option> <option>PA Panama</option> <option>PE Peru</option> <option>PH Philippines</option> <option>PL Poland</option> <option>PR Puerto Rico</option> <option>PT Portugal</option> <option>SA Saudi Arabia</option> <option>SG Singapore</option> <option>ZA South Africa</option> <option>ES Spain</option> <option>SE Sweden</option> <option>CH Switzerland</option> <option>TW Taiwan</option> <option>TH Thailand</option> <option>TR Turkey</option> <option>TT Trinidad and Tobago</option> <option>AE United Arab Emirates</option> <option>GB United Kingdom</option> <option selected="selected">US United States</option> <option>UM US Minor Outlying Islands</option> <option>VI Virgin Islands (U.S.)</option> </select></span></td> </tr> <tr> <td>Email Address*:</td><td> </td><td><input type="text" name="email" size="35" ></td></tr> <tr> <td>Telephone*:</td><td> </td><td><input type="text" name="phone1" size="3" maxlength="3" > <input type="text" name="phone2" size="3" maxlength="3"> - <input type="text" name="phone3" size="5" maxlength="4"></td></tr> <!--</table> <table>--> <tr> <td> </td></tr> <tr> <td> </td><td> </td><td><legend align="top"><i><font color="white"><b>Message*</b></font></i></legend> <textarea name="message" cols="70" rows="8"></textarea></td> </tr> <tr> <td> </td><td> </td><td><input type="submit" name="submit" value="Send Message" /> <input type="reset" name="reset2" value="Reset" /> <input type="hidden" name="submitted" value="TRUE" /><td> </td><td> </td><td> </td><td> </td> <input type="hidden" name="reset" value="TRUE" /> </td> </tr> </table> </div> </form> <br /> </div> <!--end inner window--> <div id="contact_footer" align="center"> <br> <hr width="50%" color="#000000"> <a href="../index.html"><font color="#000000">Home</font></a> ◊ <!--<a href="../assets/staff.html">Staff</a><td> </td>•<td> </td><a href="../assets/associates.html">Associates</a><td> </td>•<td> </td>--> <a href="../assets/projects.html"><font color="#000000">Projects</font></a> ◊ <a href="../assets/gallery.html"><font color="#000000">Gallery</font></a> ◊ <!--<a href="../assets/affiliate.html" target="_blank">Management</a><td> </td>•<td> </td>--> <a href="../assets/partners.html"><font color="#000000">Partners</font></a> ◊ <a href="contactus.html"><font color="#000000">Contact Us</font></a> <font color="#000000"> <h4 align="center">SEGMA ENGINEERING GROUP, LLC<br />• • • </h4><br /> Location: 225 30th Street, Suite 310, Scaramento, CA 95816 Telephone: (916) 475-1233<br /><br /> &copy 2011 Segma Engineering Group, LLC. All Rights Reserved. </font> <br /><br /><br /><br /> </div> <br /><br /><br /><br /><br /><br /> </div><!--end main body--> </body> </html> *******************************************handle_form code****************************** <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Thank You - Segma Engineering Group, LLC</title> <link rel="stylesheet" type="text/css" href="../css/style.css" charset="utf-8" /> </head> <body> <div id="main_container"> <br /> <div id="contact_header" style="padding-top:25px" align="center"> <div id="header_txt">SEGMA ENGINEERING GROUP, LLC</div> <br /><br /> <br /> <br /><br /> <br /><br /> <div align="center"><a href="../index.html">Home</a> <!--<span style="padding-left:20px"><a href="../assets/staff.html">Management</a></span> <span style="padding-left:20px"><a href="../assets/associates.html">Associates</a></span>--> <span style="padding-left:20px"><a href="../assets/projects.html">Projects</a></span> <span style="padding-left:20px"><a href="../assets/gallery.html">Gallery</a></span> <span style="padding-left:20px"><a href="../assets/partners.html">Partners</a></span> <!--<span style="padding-left:20px"><a href="../assets/affiliate.html" target="_blank">Affiliate</a></span>--> <span style="padding-left:20px"><a href="contactus.html">Contact Us</a></span> <br /><br /> </div> </div> <!--main body---> <div id="contact_main"> <?php if (isset($_POST['submitted'])) { $errors=array(); if(!empty($_POST['fname'])) { $first_name=$_POST['fname']; } else { $first_name=NULL; $errors[]='Your first name'; } if(!empty($_POST['lname'])) { $last_name=$_POST['lname']; } else { $last_name=NULL; $errors[]='Your last name'; } if(!empty($_POST['cname'])) { $cname=$_POST['cname']; } else { $cname=NULL; $errors[]='Company Name'; } if(!empty($_POST['address'])) { $address=$_POST['address']; } else { $address=NULL; //$errors[]='Your Address'; } if(!empty($_POST['state'])) { $state=$_POST['state']; } else { $state='California'; } if(!empty($_POST['city'])) { $city=$_POST['city']; } else { $city=NULL; $errors[]='Your city'; } if(!empty($POST['zipcode'])) { $zipcode=$_POST['zipcode']; } else { $zipcode=NULL; } if(!empty($_POST['country'])){ $country=$_POST['country']; } else { $country='United States'; } if(!empty($_POST['email'])){ $email=$_POST['email']; } else { $email=NULL; $errors[]='Your Email Address'; } if ((!empty($_POST['phone1'])) && (!empty($_POST['phone2'])) && (!empty($_POST['phone3']))) { $phone1=$_POST['phone1']; $phone2=$_POST['phone2']; $phone3=$_POST['phone3']; } else { $phone1=NULL; $phone2=NULL; $phone3=NULL; $errors[]='Your phone Number'; } //enter the info on the address here if (!empty($_POST['message'])) { $message=$_POST['message']; } else { $message=NULL; $errors[]='Please include a message for Segma Emgineering Group'; } } if(empty($errors)) { echo '<p align="left"><font color="000000">Hello <b>'.$first_name.' '.$last_name.'</b><br />Thank you for visiting <b>Segma Engineering Group, LLC\'s website</b>.<br />We have recieved your message. One of our representative will contact you using the contact information that you provided.<br /><br />Sincerely<br /><i>Segma Engineering Group, LLC</i>.</font></p><p><br /></p>'; $to = 'curtisdumas@ymail.com'; $subject = 'On Line Message'; $message = 'Prespective\'s Name :'.$first_name.' '.$last_name.' E_mail Address :'.$email.' Telephone Number :'.(.''.$phone1.''.).' '.$phone2.' '.$phone3.' '.$message.'; $headers = 'From: '.$email. "\r\n" . 'Reply-To: .$email' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); //exit(); } else { if (!empty($errors)) { echo '<h1><font color="red">Error!</font></h1> <p align="left"><font color="#000000">The following fields are missing:</font><br>'; foreach($errors as $msg) { //print each error echo "<font color='#000000'>---> $msg<br /></font><br />"; } echo '<p align="left"><font color="#000000">Please go <a href="contactus.html"><font color="#ffffff">«back</font></a> and correct the missing information; </font> </p><p><br /></p>'; } } ?> <script type="text/Javascript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' invalid e-mail address formatt.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } //--> </script> </div> <!--end inner window--> <div id="contact_footer" align="center" > <hr width="50%" color="black"> <a href="../index.html"><font color="#0000">Home</font></a> ◊ <!--<a href="../assets/staff.html">Management</a> ◊ <a href="../assets/associates.html">Associates</a> ◊ --> <a href="../assets/projects.html"><font color="#000000">Projects</font></a> ◊ <a href="../assets/gallery.html"><font color="#000000">Gallery</font></a> ◊ <!--<a href="../assets/affiliate.html" target="_blank">Affiliate</a> ◊ --> <a href="../assets/partners.html"><font color="#000000">Partners</font></a> ◊ <a href="contactus.html"><font color="#000000">Contact Us</font></a> <font color="#000000"> <h4 align="center">SEGMA ENGINEERING GROUP, LLC<br>• • • </h4><br /> Location: 225 30th Street, Suite 310, Scaramento, CA 95816 Telephone: (916) 475-1233<br /><br /> &copy 2011 Segma Group, LLC. All Rights Reserved. </font> <br /><br /><br /><br /> </div> <br /><br /><br /><br /><br /><br /> </div> </body> </html>
×
×
  • Create New...