Search the Community
Showing results for tags 'javascript'.
-
I am currently working off of a Wordpress template from Gavick. Here is the website: earthcharterfest.com/wordpress Within the homepage of the site, there is a widget that displays five circular containers under the header "Venues". The containers hold images that move one by one from the right to the left every few seconds or so. The content within the containers is determined by Wordpress "posts" within the Widget. So for every post I create, a new container is also created. What I would like to do is, instead of having the containers move left to right one by one, to make them move five containers at a time. This way I can have images all related to a single venue, and have other sets of images for various venues. I was told that in order to do this that these files must be edited: /wp-content/themes/Fest/gavern/widget.speakers.php is the file that generates content, /wp-content/themes/Fest/js/widgets/speakers.js is a jQuery file that creates animation. However, I have very little experience with both Javascript and PHP. Can anyone be of assistance? Below are the two files that deal with the Circular Container Widget. Gavick calls this widget the Speakers Widget. Website: earthcharterfest.com/wordpress /wp-content/themes/Fest/js/widgets/speakers.js: // // GK Speakers Widget // jQuery(window).load(function(){ jQuery(document).find('.widget_gk_speakers').each(function(i, widget) { new GK_Speakers(jQuery(widget)); }); }); function GK_Speakers(widget) { this.$G = null; this.current_offset = 0; this.anim_interval = 0; this.current = 0; this.total = 0; this.items = []; this.availableItems = null; this.hover = false; this.$G = { 'animation_speed': 500, 'animation_interval': 5000, }; this.current_offset = 0; this.anim_interval = this.$G['animation_interval']; this.current = 4; this.total = widget.find('.gkw-rest-speakers .gkw-speaker').length; // if there is more than 5 slides if(this.total > 5) { // prepare handlers this.items[0] = widget.find('.gkw-speakers-small-left .gkw-speaker-small').first(); this.items[1] = widget.find('.gkw-speakers-small-left .gkw-speaker-small').first().next(); this.items[2] = widget.find('.gkw-speakers .gkw-speaker-big').first(); this.items[3] = widget.find('.gkw-speakers-small-right .gkw-speaker-small').first(); this.items[4] = widget.find('.gkw-speakers-small-right .gkw-speaker-small').first().next(); // this.availableItems = widget.find('.gkw-rest-speakers .gkw-speaker'); // var $this = this; // jQuery(this.items).each(function(i, el) { jQuery(el).removeClass('speaker-hide'); }); // run the animation setTimeout(function() { $this.gkChangeSpeakers(); }, this.anim_interval + 400); jQuery(this.items).each(function(i, el) { jQuery(el).mouseenter(function() { $this.hover = true; }); jQuery(el).mouseleave(function() { $this.hover = false; }); }); } } GK_Speakers.prototype.gkChangeSpeakers = function() { // var $this = this; // if(!this.hover) { // hide speakers jQuery(this.items).each(function(i, el) { jQuery(el).addClass('speaker-hide'); }); if(this.current < this.total - 1) { this.current += 1; } else { this.current = 0; } setTimeout(function() { var IDs = [0, 0, 0, 0, 0]; IDs[4] = $this.current; totalOffset = $this.total; IDs[3] = ($this.current - 1 < 0) ? --totalOffset : $this.current - 1; IDs[2] = ($this.current - 2 < 0) ? --totalOffset : $this.current - 2; IDs[1] = ($this.current - 3 < 0) ? --totalOffset : $this.current - 3; IDs[0] = ($this.current - 4 < 0) ? --totalOffset : $this.current - 4; jQuery($this.items[0]).html(jQuery($this.availableItems[IDs[0]]).html()); jQuery($this.items[1]).html(jQuery($this.availableItems[IDs[1]]).html()); jQuery($this.items[2]).html(jQuery($this.availableItems[IDs[2]]).html()); jQuery($this.items[3]).html(jQuery($this.availableItems[IDs[3]]).html()); jQuery($this.items[4]).html(jQuery($this.availableItems[IDs[4]]).html()); }, 600); // show speakers setTimeout(function() { jQuery($this.items).each(function(i, el) { jQuery(el).removeClass('speaker-hide'); }); }, 750); } // setTimeout(function() { $this.gkChangeSpeakers(); }, this.anim_interval + 800); }; /wp-content/themes/Fest/gavern/widget.speakers.php: <?php /** * * GK Speakers Widget class * **/ class GK_Speakers_Widget extends WP_Widget { /** * * Constructor * * @return void * **/ function GK_Speakers_Widget() { $this->WP_Widget( 'widget_gk_speakers', __( 'GK Speakers', GKTPLNAME ), array( 'classname' => 'widget_gk_speakers', 'description' => __( 'Use this widget to show rotator with speakers', GKTPLNAME) ) ); $this->alt_option_name = 'widget_gk_speakers'; add_action( 'save_post', array(&$this, 'refresh_cache' ) ); add_action( 'delete_post', array(&$this, 'refresh_cache' ) ); add_action('wp_enqueue_scripts', array('GK_Speakers_Widget', 'add_scripts')); } static function add_scripts() { wp_register_script( 'gk-speakers', get_template_directory_uri() . '/js/widgets/speakers.js', array('jquery')); wp_enqueue_script('gk-speakers'); } /** * * Outputs the HTML code of this widget. * * @param array An array of standard parameters for widgets in this theme * @param array An array of settings for this widget instance * @return void * **/ function widget($args, $instance) { $cache = get_transient(md5($this->id)); // the part with the title and widget wrappers cannot be cached! // in order to avoid problems with the calculating columns // extract($args, EXTR_SKIP); $title = apply_filters('widget_title', empty($instance['title']) ? __( 'Speakers', GKTPLNAME ) : $instance['title'], $instance, $this->id_base); echo $before_widget; echo $before_title; echo $title; echo $after_title; if($cache) { echo $cache; echo $after_widget; return; } ob_start(); // $category = empty($instance['category']) ? '' : $instance['category']; $anim_speed = empty($instance['anim_speed']) ? 500 : $instance['anim_speed']; $anim_interval = empty($instance['anim_interval']) ? 5000 : $instance['anim_interval']; // $gk_loop = new WP_Query( 'category_name=' . $category . '&post_type=gavern_speakers'); $speakers = array(); while($gk_loop->have_posts()) { $gk_loop->the_post(); array_push($speakers, array( 'title' => get_the_title(), 'img' => wp_get_attachment_url( get_post_thumbnail_id(get_the_ID()) ), 'url' => get_permalink() )); } wp_reset_postdata(); if (count($speakers)) { if(count($speakers) >= 5) { echo '<div class="gkw-speakers"> <div class="gkw-speaker-big speaker-hide"> <div> <a href="'.$speakers[2]['url'].'"> <img src="'.$speakers[2]['img'].'" alt="'.$speakers[2]['title'].'" /> </a> </div> <h4> <a href="'.$speakers[2]['url'].'" title="'.$speakers[2]['title'].'">'.$speakers[2]['title'].'</a> </h4> </div> <div class="gkw-speakers-small-left"> <div class="gkw-speaker-small speaker-hide"> <div> <a href="'.$speakers[0]['url'].'"> <img src="'.$speakers[0]['img'].'" alt="'.$speakers[0]['title'].'" /> </a> </div> <h4> <a href="'.$speakers[0]['url'].'" title="'.$speakers[0]['title'].'">'.$speakers[0]['title'].'</a> </h4> </div> <div class="gkw-speaker-small speaker-hide"> <div> <a href="'.$speakers[1]['url'].'"> <img src="'.$speakers[1]['img'].'" alt="'.$speakers[1]['title'].'" /> </a> </div> <h4> <a href="'.$speakers[1]['url'].'" title="'.$speakers[1]['title'].'">'.$speakers[1]['title'].'</a> </h4> </div> </div> <div class="gkw-speakers-small-right"> <div class="gkw-speaker-small speaker-hide"> <div> <a href="'.$speakers[3]['url'].'"> <img src="'.$speakers[3]['img'].'" alt="'.$speakers[3]['title'].'" /> </a> </div> <h4> <a href="'.$speakers[3]['url'].'" title="'.$speakers[3]['title'].'">'.$speakers[3]['title'].'</a> </h4> </div> <div class="gkw-speaker-small speaker-hide"> <div> <a href="'.$speakers[4]['url'].'"> <img src="'.$speakers[4]['img'].'" alt="'.$speakers[4]['title'].'" /> </a> </div> <h4> <a href="'.$speakers[4]['url'].'" title="'.$speakers[4]['title'].'">'.$speakers[4]['title'].'</a> </h4> </div> </div> </div> <div class="gkw-rest-speakers">'; for($i = 0; $i < count($speakers); $i++) { echo '<div class="gkw-speaker"> <div> <a href="'.$speakers[$i]['url'].'"> <img src="'.$speakers[$i]['img'].'" alt="'.$speakers[$i]['title'].'" /> </a> </div> <h4> <a href="'.$speakers[$i]['url'].'" title="'.$speakers[$i]['title'].'">'.$speakers[$i]['title'].'</a> </h4> </div>'; } echo '</div>'; } } // save the cache results $cache_output = ob_get_flush(); set_transient(md5($this->id) , $cache_output, 3 * 60 * 60); // echo $after_widget; } /** * * Used in the back-end to update the module options * * @param array new instance of the widget settings * @param array old instance of the widget settings * @return updated instance of the widget settings * **/ function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['category'] = strip_tags( $new_instance['category'] ); $instance['anim_speed'] = strip_tags( $new_instance['anim_speed'] ); $instance['anim_interval'] = strip_tags( $new_instance['anim_interval'] ); $this->refresh_cache(); $alloptions = wp_cache_get('alloptions', 'options'); if(isset($alloptions['widget_gk_speakers'])) { delete_option( 'widget_gk_speakers' ); } return $instance; } /** * * Refreshes the widget cache data * * @return void * **/ function refresh_cache() { delete_transient(md5($this->id)); } /** * * Limits the comment text to specified words amount * * @param string input text * @param int amount of words * @return string the cutted text * **/ function comment_text($input, $amount = 20) { $output = ''; $input = strip_tags($input); $input = explode(' ', $input); for($i = 0; $i < $amount; $i++) { $output .= $input[$i] . ' '; } return $output; } /** * * Outputs the HTML code of the widget in the back-end * * @param array instance of the widget settings * @return void - HTML output * **/ function form($instance) { $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; $category = isset($instance['category']) ? esc_attr($instance['category']) : ''; $anim_speed = isset($instance['anim_speed']) ? esc_attr($instance['anim_speed']) : ''; $anim_interval = isset($instance['anim_interval']) ? esc_attr($instance['anim_interval']) : ''; ?> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', GKTPLNAME ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> </p> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'category' ) ); ?>"><?php _e( 'Category slug:', GKTPLNAME ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'category' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'category' ) ); ?>" type="text" value="<?php echo esc_attr( $category ); ?>" /> </p> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'anim_speed' ) ); ?>"><?php _e( 'Animation speed (in ms):', GKTPLNAME ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'anim_speed' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'anim_speed' ) ); ?>" type="text" value="<?php echo esc_attr( $anim_speed ); ?>" /> </p> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'anim_interval' ) ); ?>"><?php _e( 'Animation interval (in ms):', GKTPLNAME ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'anim_interval' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'anim_interval' ) ); ?>" type="text" value="<?php echo esc_attr( $anim_interval ); ?>" /> </p> <?php } } // EOF
- 1 reply
-
- php
- javascript
-
(and 3 more)
Tagged with:
-
Hi, I'm trying to make some kind of validation for my form but I've tried everything from Javascript to PHP and I can't seem to get it to work? I'll put my javascript code below but I would much rather use PHP as the validator as I don't like using alert boxes. The problem is that it's validating at all and any method that I try it just skips it and carrys on with the registration. For example I put "dd" as my username, email and password and it accepted it. Help would be much appreciated, thanks. The Javascript: <script type="text/javascript"> function validateForm(formElement) { if(formElement.username.length < 5) { alert('Username must be more than 5 characters.'); return false; } if(formElement.email.length < 5) { alert('Email must be more than 5 characters.'); return false; } if(formElement.password.length < { alert('Password should be more than 8 characters.'); return false; } } </script> The Form: <div id="register-section-wrapper"> <div id="inner-register-container"> <form action="" method="post" name="register_form" id="register_form" onsubmit="return validateForm(this);"> <table border="0" id="table-register"> <th colspan="2"> <h1>Register</h1> </th> <tr> <td> <p>Username:</p> </td> <td> <input type="text" name="username" id="username" class="frm-style" required /> </td> </tr> <tr> <td> <p>Email:</p> </td> <td> <input type="text" name="email" id="email" class="frm-style" required /> </td> </tr> <tr> <td> <p>Password:</p> </td> <td> <input type="password" name="password"id="password" class="frm-style" required /> </td> </tr> <tr> <td> <p>Retype Password:</p> </td> <td> <input type="password" name="cpassword" class="frm-style" required /> </td> </tr> <tr> <th colspan="2"> <input class="frm-submit-register" name="register" type="submit" value="Submit" onclick="return validateForm(this.form);" /> <th> </tr> </table> </form> The OLD PHP Validation: <?php $error_msg = ""; if(isset($_POST['register'])) { if(empty($_POST['username'])) { $error_msg = "Please enter your username."; } else { return true; } if($_POST['username'] < 5) { $error_msg = "Username must be more than 5 characters."; } else { return true; } } ?>
- 7 replies
-
- validation
- form
-
(and 2 more)
Tagged with:
-
I'm trying to get to grips with javascript, while conjuring up a form with suggestions built in; the form has two parts that autofill, the second part (var availableTags) of the script works fine, but the first part (var availableCust) doesn't, can anyone point out where I may have gone wrong? Thanks code: <script> /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// $(function() { var availableCust = [ <?php $sql = "SELECT * FROM `companyuser`.`customerDetails` ORDER BY `customerDetails`.`Account_Name` ASC "; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { $value2 = $row['Address1']; $value1 = $row['Account_Name']; echo "'$value1 - $value2',\n"; } echo "'other'\n"; ?> ]; $( '#recipient' ).autocomplete({ source: availableCust }); }); /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// $(function() { var availableTags = [ <?php $sql = "SELECT * FROM `fullstocklist`"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { $value4 = $row['Part_Name']; $value3 = $row['company_PartNo']; echo "'$value3 - $value4',\n"; } echo "'other'\n"; ?> ]; $( '#tags1' ).autocomplete({ source: availableTags }); $( '#tags2' ).autocomplete({ source: availableTags }); $( '#tags3' ).autocomplete({ source: availableTags }); $( '#tags4' ).autocomplete({ source: availableTags }); $( '#tags5' ).autocomplete({ source: availableTags }); $( '#tags6' ).autocomplete({ source: availableTags }); $( '#tags7' ).autocomplete({ source: availableTags }); $( '#tags8' ).autocomplete({ source: availableTags }); $( '#tags9' ).autocomplete({ source: availableTags }); $( '#tags10' ).autocomplete({ source: availableTags }); $( '#tags11' ).autocomplete({ source: availableTags }); $( '#tags12' ).autocomplete({ source: availableTags }); }); /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// </script>
-
Hello, I have working on a PHP application which would print journals. The user will type in the content (rich editor with formatting) and select the recipients. Upon submit, my code would need to fetch the address details of the selected recipients from database & use the content typed by the user to print a separate hard copy for each of the selected recipients. Till now, I had been working on static printing using JavaScript. This is new to me. Any idea to design the code in order to get the iterative print is highly appreciated. Many Thanks
-
Hello, I am working in PHP, on a page, I am requesting user to enter name, number, email address. After submit, the table must vanish and a message must be displayed on the same web page. <table> <tr> <td>Name</td> <td><input type="text" size="65" name="fname"></td> </tr> <tr> <td>Name</td> <td><input type="text" size="65" name="fname"></td> </tr> <tr> <td>Name</td> <td><input type="text" size="65" name="fname"></td> </tr> </table> I have written the table that I am using to display on the page. I want to display message "Your data has been submitted" after the user click submit button. Table must vanish and only the message must be there on the same page......
- 4 replies
-
- html
- javascript
-
(and 2 more)
Tagged with:
-
I am trying to show each checked item in a new row in an html (php) table. Currently, it is working when one selection has been made via a checkbox, but when a new selection is made, the first one is overwritten. I call my Checkboxes like this: echo "<input type=\"checkbox\" rel=\"textbx1\" name=\"$item_no\">$item_no $ihddescr_1</input><br />"; Which gives me a list of items from a selected vendor. I then use this table below, as I will need to show cost, price, etc in a table. echo "<table border ='0' width='100%'><tr><td align='center'><strong><font size='4'><font color='#008301'>Quote Items</font></strong></td></tr></table>"; echo "<table border ='1' width='100%'>"; echo "<th>Item ID</th>"; echo "<th>Description</th>"; echo "<th>QTY</th>"; echo "<th>Sell Price</th>"; echo "<th>Cost</th>"; echo "<th>Prft%</th>"; echo "<th>Prft$</th></tr>"; $quoted = "<td><text id=\"textbx1\"></text></td><td></td><td> </td><td> </td><td> </td><td><input type='text' name='profit' size='6'> </td><td> </td></tr>"; { $cscode=odbc_result($rs,"cscode"); $csname=odbc_result($rs,"csname"); $item_no=odbc_result($rs,"item_no"); $order_date=odbc_result($rs,"order_date"); $order_date2 = date( "m-d-Y", strtotime( $order_date ) );*/ $getQuote=array("$item_no \"\n\""); foreach ($getQuote as $item) $item = "$quoted"; { echo $quoted; } odbc_close($conn); echo "</table>"; I should also add that I am using Javascript to populate the rows. <script type="text/javascript"> $(window).load(function(){ $(document).ready(function() { $("input[type=checkbox]").click(function() { if ($(this).is(':checked')) $('#textbx1').html($('#textbx1').val() + $(this).attr('name') + "\n"); else { var text = $('#textbx1').val(); text = text.replace($(this).attr('name') + "\n" ,""); $('#textbx1').html(text); } }); }) }); </script> Any help what-so-ever would be appreciated. Thanks.
-
I am trying to accomplish a table to be filled with selections from a database using php and javascript. My javascript code is: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.js'></script> <script type="text/javascript"> $(window).load(function(){ $(document).ready(function() { $("input[type=checkbox]").click(function() { if ($(this).is(':checked')) $('#textbx1').html($('#textbx1').val() + $(this).attr('name') + "\n"); else { var text = $('#textbx1').val(); text = text.replace($(this).attr('name') + "\n" ,""); $('#textbx1').html(text); } }); }) }); </script> and my table code is: echo "<input type=\"checkbox\" rel=\"textbox\" name=\"$item_no\">$item_no</input><br />"; } echo "<br />"; echo ""; echo "</table>"; echo "</table>"; echo "<table border ='0' width='100%'><tr><td align='center'><strong><font size='4'><font color='#008301'>Quoted Items</font></strong></td></tr></table>"; echo "<table border ='1' width='100%'>"; echo "<th>Item ID</th>"; echo "<th>Description</th>"; echo "<th>QTY</th>"; echo "<th>Sell Price</th>"; echo "<th>Cost</th>"; echo "<th>Prft%</th>"; echo "<th>Prft$</th></tr>"; /* while (odbc_fetch_row($rs)) { $cscode=odbc_result($rs,"cscode"); $csname=odbc_result($rs,"csname"); $item_no=odbc_result($rs,"item_no"); $order_date=odbc_result($rs,"order_date"); $order_date2 = date( "m-d-Y", strtotime( $order_date ) );*/ echo "<tr><td><text id=\"textbx1\" \"r\"\"n\"></text></td>"; echo"<td>$ </td>"; echo "<td> </td>"; echo "<td> </td>"; echo "<td> </td>"; echo "<td> </td>"; echo "<td> </td></tr>"; //} // odbc_close($conn); echo "</table>"; This Javascript is populating in one cell of the table, but will not show new (or next) item in a new cell. It overwrites the first cell. Any ideas? Thank you for looking.
-
Hey all, I have a two column webpage. I would like to make my left column equal the height of the right column. The left column contains my navigation and future advertisements. My right column is my content. I would like to learn how to match the column height of the left column to that of the right column so I can add some Jquery and make the navigation/ad scroll with the user. How can this be achieved? The page is: http://cronanpilotcar.byethost33.com/page/states
-
Having just barely got to grips with PHP, I have made a PHP app that can be used to fill out out forms, at the moment it is a step by step process, loading a different function from a PHP file full of functions, loaded one at a time; when filling in an address, it is possible to load an address previously used, this is simply done by reloading the same PHP function with a MySQL lookup, it works great as is, but to make the app work more dynamically, I'd need to allow the user to fill in the whole form in one go. However, to write the whole form in one go I'd need to load this address into a possibly half completed form... As far as I can tell this isn't something suited to PHP, I believe JavaScript is the way to go; however I have never worked with JavaScript before, I was hoping someone could point me toward some tutorials and some relevant sample code for me to read through. Thanks!
- 1 reply
-
- php
- javascript
-
(and 3 more)
Tagged with:
-
I am new to php and I've downloaded a free source code for image gallery. It has admin account and you can upload image on it. Now when I upload image it generates random image title like numbers '4849404'. I want it to assign a specific title per image or just simply fetch the file name of the uploaded image and assign it as the title. How can I do that? here is the code.... $RandomNumber = rand(0, 9999999999); // We need same random name for both files. // some information about image we need later. $ImageName = strtolower($_FILES['ImageFile']['name']); $ImageSize = $_FILES['ImageFile']['size']; $TempSrc = $_FILES['ImageFile']['tmp_name']; $ImageType = $_FILES['ImageFile']['type']; $process = true; //Validate file + create image from uploaded file. switch(strtolower($ImageType)) { case 'image/png': $CreatedImage = imagecreatefrompng($_FILES['ImageFile']['tmp_name']); break; case 'image/gif': $CreatedImage = imagecreatefromgif($_FILES['ImageFile']['tmp_name']); break; case 'image/jpeg': $CreatedImage = imagecreatefromjpeg($_FILES['ImageFile']['tmp_name']); break; default: die('Unsupported File!'); //output error } //get Image Size list($CurWidth,$CurHeight)=getimagesize($TempSrc); //get file extension, this will be added after random name $ImageExt = substr($ImageName, strrpos($ImageName, '.')); $ImageExt = str_replace('.','',$ImageExt); $BigImageMaxWidth = $CurWidth; $BigImageMaxHeight = $CurHeight; //Set the Destination Image path with Random Name $thumb_DestRandImageName = $Thumb.$RandomNumber.'.'.$ImageExt; //Thumb name $DestRandImageName = $DestinationDirectory.$RandomNumber.'.'.$ImageExt; //Name for Big Image //Resize image to our Specified Size by calling our resizeImage function. if(resizeImage($CurWidth,$CurHeight,$BigImageMaxWidth,$BigImageMaxHeight,$DestRandImageName,$CreatedImage)) { //Create Thumbnail for the Image resizeImage($CurWidth,$CurHeight,$ThumbMaxWidth,$ThumbMaxHeight,$thumb_DestRandImageName,$CreatedImage); //respond with our images echo '<table width="100%" border="0" cellpadding="4" cellspacing="0"> <tr><td align="center"><img src="gallery/'.$RandomNumber.'.'.$ImageExt.'" alt="Resized Image"></td></tr></table>'; }else{ die('Resize Error'); //output error }
-
hi guys, im new with google map, i need some help. i have ajax call, here: $('#checkbtn').click(function(e) { e.preventDefault(); var lo=$("#long").val(); var la=$('#lat').val(); $.ajax({ url:BASEURL+'register/checklocation', type:'POST', data:{log:lo,lat:la}, success:function(data) { $('#view_checkmap').html(data); } }); }); here is my view to view the map: <script> function initialize() { var myLatlng = new google.maps.LatLng(<?php echo $lat; ?>,<?php echo $long; ?>); var mapOptions = { zoom: 15, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('mymap'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'my location' }); } google.maps.event.addDomListener(window, 'load', initialize); </script> <div id="mymap" style="width:500px; height:300px;"></div> when i access to the URL, it displays, but when i access over ajax, nothing display. is my code worng or something else? thanks in advance.
-
- google map
- ajax
-
(and 1 more)
Tagged with:
-
I have a form that has a drop down list that gets company details from mysql database when the company name is selected. When the form is completed it will not submit??? If I remove the script that gets the data from the database i can submit the form? I'm not the best at javascript, so could do with pointing in the right direction!! Cheers Chris <script> function showCompany(str) { if (str=="") { document.getElementById("customerDetails").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("customerDetails").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getcustomer.php?customer_id="+str,true); xmlhttp.send(); } </script>
-
Hey guys! I am trying to achieve the following functionality; Use javascript to display page content that is stored on one page by showing the requested content through the navigation, i.e. clicking the Home link, and making the previous page content invisible. I have been playing around with altering the CSS styling off the div's. I have 3 div's each name; Home, Portfolio and Enquire. Here is the CSS for them; #home { display: block; } #portfolio { display: none; } #enquire { display: none; } So from this the home div is the first that is seen when the page loads. Now using the navigation I have I am calling a function; <nav class="row"> <ul> <li class="above-border"> </li> <li class="nav-smallfont">about</li> <li><a href="javascript:toggle_visibility('portfolio');" alt="Portfolio" target="_self">PORTFOLIO</a></li> <li class="above-border"> </li> <li class="nav-smallfont">back</li> <li><a href="javascript:toggle_visibility('home');" alt="Homepage" target="_self">HOME</a></li> <li class="above-border"> </li> <li class="nav-smallfont">furniture</li> <li><a href="#" onclick="toggle_visibility('enquire');" alt="Enquire" target="_self">ENQUIRE</a></li> <li class="above-border"> </li> </ul> </nav> I was playing around with the difference between onclick and javascript: - I didnt really see any major difference. Now my Javascript is this; <script type="text/javascript"> function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block'){ e.style.display = 'none'; } else{ e.style.display = 'block'; } } </script> Now whenever I click on the home navigation it will show/hide the content and when I click on say, the portfolio link it will show this content as well as the home. Im pretty sure you understand what I am hoping to achieve; A navigation style functionality so that when the portfolio link is click, it hides the other content and show only that and visa versa for the other links. Thanks for your help! Sam
- 3 replies
-
- javascript
- help
-
(and 3 more)
Tagged with:
-
Ok so I've watch a ton of tutorials, read a few books asked a whole bunch of questions and still can't find a solution. Here is my problem, I have this form here : http://jemtechnv.com/beta/finish_ticket.php if you play with the form you will see that entering input in the Qty, and Price boxes will populate the Ext box along with sales tax and material cost and Material boxes, and input in the rate and hours box will populate the subtotal and labor boxes now here is my problem. I need to auto populate the total hours box by from the sum of the hours column and I also need to sum up the material and labor boxes and populate that total in the grand total box, sounds easy huh? you would think but here is my code that I use to calculate my sales tax : function tax(){ var materialcost = document.getElementById( 'materialcost' ).value; var shipping = document.getElementById( 'shipping' ).value; var salestax = Math.round(((materialcost / 100) * 8.1)*100)/100; var materialtotal = (materialcost * 1) + (salestax * 1) + (shipping * 1); document.getElementById( 'materialcost' ).value = materialcost; document.getElementById( 'salestax' ).value = salestax; document.getElementById( 'shipping' ).value = shipping; document.getElementById( 'materialtotal' ).value = materialtotal; } this works fine but when I try to use the materialtotal in another function to total up the materialtotal and labortotals for the grand total it causes the browser to lock up. Can someone tell me how I can get my grand total without making the script too complicated? Thanks!
-
Does anyone know how to make link? let's say one clicks on on a pin and an info window pops up. I would like the the title in the window to become a link to the listing itself. In other words to <a href="apt.php?=<? echo "" . $row['id'] . "";>echo "" . $row['title'] . ""</a> This is what I have: The XML file: <?php require("../config.php"); function parseToXML($htmlStr) { $xmlStr=str_replace('<','<',$htmlStr); $xmlStr=str_replace('>','>',$xmlStr); $xmlStr=str_replace('"','"',$xmlStr); $xmlStr=str_replace("'",''',$xmlStr); $xmlStr=str_replace("&",'&',$xmlStr); return $xmlStr; } // Opens a connection to a mySQL server $connection=mysql_connect (DB_HOST, DB_USER, DB_PASSWORD); if (!$connection) { die('Not connected : ' . mysql_error()); } // Set the active mySQL database $db_selected = mysql_select_db(DB_NAME, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); } // Select all the rows in the markers table $query = "SELECT * FROM places WHERE unit='Residential' AND county='New Jersey'"; $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } header("Content-type: text/xml"); // Start XML file, echo parent node echo '<markers>'; // Iterate through the rows, printing XML nodes for each while ($row = @mysql_fetch_assoc($result)){ // ADD TO XML DOCUMENT NODE echo '<marker '; echo 'title="' . $row['title'] . '" '; echo 'id="' . $row['id'] . '" '; echo 'lat="' . $row['lat'] . '" '; echo 'lng="' . $row['lng'] . '" '; echo 'space="' . $row['space'] . '" '; echo 'amount="$' . $row['amount'] . '" '; echo '/>'; } // End XML file echo '</markers>'; ?> The Map: <script type="text/javascript"> //<![CDATA[ var customIcons = { "House": { icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' }, }; function load() { var map = new google.maps.Map(document.getElementById("map2"), { center: new google.maps.LatLng(40.9167, -74.1722), zoom: 11, mapTypeId: 'roadmap' }); var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP file downloadUrl("commphpsqlajax_genxml.php", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("title"); var address = markers[i].getAttribute("amount"); var type = markers[i].getAttribute("space"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "<b>" + name + "</b> <br/>" + address; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon, shadow: icon.shadow }); bindInfoWindow(marker, map, infoWindow, html); } }); } function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); } function downloadUrl(url, callback) { var request = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest; request.onreadystatechange = function() { if (request.readyState == 4) { request.onreadystatechange = doNothing; callback(request, request.status); } }; request.open('GET', url, true); request.send(null); } function doNothing() {} //]]> </script>
-
I have this dependent radio and dropdown box, it works fine. Now I am trying to validate and its failing to validate. When i click on a radio button it should display "select a make" and If i dont select anything it should prompt me to select something rather than just submit. Also when i try to reset, what ever ive selected does not clear away. Any help will be great. Thanks in advance. Original code is from http://forums.phpfreaks.com/topic/145947-radio-button-to-change-drop-down-fields/ <html> <head> </head> <body> <form id="formname" name="formname" method="post" action="#" onsubmit="return validate()"> Make:<br> <input type="radio" name="make" value="Chrysler" onclick="changeMake(this.value);"> Chrysler<br /> <input type="radio" name="make" value="Ford" onclick="changeMake(this.value);"> Ford<br /> <input type="radio" name="make" value="GMC" onclick="changeMake(this.value);"> GMC<br /> <br> Model: <select name="model" id="model" onchange="changeModel(this.value);" disabled="disabled"> <option> -- Select a Make -- </option> </select> <br><br> Output: <span id="output"></span> <input type="reset"> <input type="submit"> </form> </body> <script type="text/javascript"> var models = new Array(); models['Chrysler'] = ['Pacifica', 'PT Cruiser', 'Sebring']; models['Ford'] = ['Ranger', 'Taurus', 'Mustang']; models['GMC'] = ['Acadia', 'Sierra', 'Yukon']; function changeMake(make) { var modelList = models[make]; changeSelect('model', modelList, modelList); document.getElementById('model').disabled = false; document.getElementById('model').onchange(); } function changeModel(modelValue) { document.getElementById('output').innerHTML = modelValue; return; } function changeSelect(fieldID, newValues, newOptions) { selectField = document.getElementById(fieldID); selectField.options.length = 0; if (newValues && newOptions) { for (i=0; i<newValues.length; i++) { selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]); } } } </script> </html>
-
- javascript
- java
-
(and 3 more)
Tagged with:
-
Hey there, I've been dabbling with some Javascript and I've been okay adding code in where I wanted until I came to the last part of this executing script. Basically what happens here is the Button Play Flash Game Click Here will pop open a hidden Div that shows places that they can vote at to play the game... Then what I need to happen is after the Vote Click a count down timer pops up to force a 10-15 second wait before the ShowDiv appears. I found that the script immeditately runs once the page is loaded and I have it at a 10second wait, so if I wait 10 second before clicking on anything I'll find that the Div Will Already be shown but if I quickly move through the vote it will take the 10 seconds to appear. So again what I need is for it to start the count down AFTER the vote has been cast. I'm totally newbish when it comes to Javascript I'm just good at creating frankeinsteined code by researching snippits. So please make sure you take it slow with me on this, anything outside the box of copy and paste and it might confuse the hell out of me unless you can explain a tiny bit of whats going on! I appreciate it - here's the code I'm currently using: <script type="text/javascript"> function toggle(obj){ var obj=document.getElementById(obj); if (obj.style.display == "block") obj.style.display = "none"; else obj.style.display = "block"; } </script> <br> <a href="javascript: void(0);" onClick="toggle('q1')"><center>Play Flash Game Click Here:</center></a> <div id="q1" style="display:none;"><center> <a href="javascript:ShowDiv()" onclick=window.open('http://site1.com')>Vote Site #1</a> <a href="javascript:ShowDiv()" onClick=window.open('http://site2.com')>Vote Site #2</a></div> <div id="HiddenDiv" style="display:none;"><div id="my_div"></div> <script type="text/javascript"> (function (){ var element_id = 'my_div' ; var link_text = '<center>(FLASH GAME CODE EMBEDDED HERE)</center>'; //link code var time = 10; setTimeout(function(){document.getElementById(element_id).innerHTML = link_text;},time*1000); })(); </script></div> <script language="javascript"> function ShowDiv() { document.getElementById("HiddenDiv").style.display = ''; } </script>
-
- javascript
- pause
-
(and 2 more)
Tagged with:
-
Hello All I am having a problem trying to transfer variables from PHP to Javascript. My demonstration program: // PHP Demonstration Functions function test { $test = "HELLO WORLD"; process($test); } function process($test) { echo " <script> var jsvar; jsvar = '<?php echo $test;?>' alert(jsvar) </script> "; } The code above does not show the words HELLO WORLD instead the result is: <?php echo HELLO WORLD; ?> If I remove the single quotes it generates a javascript error. This problem has been driving me nuts for the last few hours. I appreciate any help offered. Many thanks Nikki
-
I have a few fields in which I just want the user to input numbers. I thought I wrote the srcipt correctly but it seems not be working. Can anyone please tell me what I am doing wrong. I very new to this. Thanks <script Language="JavaScript"> <!-- function Number_Validator() { var valid = true; if(isNaN(refine_table.min_sq.value)) { alert("Only numbers are allowed in the Square Footage fields."); refine_table.min_sq.focus(); return (false); } if (!valid) alert(msg); if(isNaN(refine_table.max_sq.value)) { alert("Only numbers are allowed in the Square Footage fields."); refine_table.max_sq.focus(); return (false); } if (!valid) alert(msg); if(isNaN(refine_table.min_price.value)) { alert("Only numbers are allowed in the Amount fields."); refine_table.min_price.focus(); return (false); } if (!valid) alert(msg); if(isNaN(refine_table.max_price.value)) { alert("Only numbers are allowed in the Amount fields."); refine_table.max_price.focus(); return (false); } if (!valid) alert(msg); return valid; } --> </script>
-
hey guys, im trying to create a website similar to craigslist and ebay except i dont know much about php, so far i have created a basic website using mostly only css and html and a little bit of javascript. but im having a hard time figuring out how to work with php is there anybody on here that would be interested in working together to build a website with me that could have the potential to make money if it is build right ?
-
Hi, I have a php page where I get records from Mysql database and show them in a table. Now I want to add a functionality whereby if the user clicks on one particular column in the row, the whole row should be greyed out (becomes uneditable / readonly) and when the same same column is again clicked (acts as toggle field), the row becomes active again. Now when the user submits the form all the greyed out records will not be considered for further processing of the data. I am fairly new to php and would appreciate any help / pointers in the right direction to achieve this. Thanks,
-
Hey guys! First time post here and I am only a begginer in programming. Anyway I have a few questions as I am stuck and have been for quite a while. I know this is a long post but it will cover the whole entire process of what I am doing at the moment. I really appreciate the time anyone can give me and will be happy to paypal someone over some $ for any help they can give me. Firstly, I am working with a bit of javascript and PHP. I am using a javascript method to update content from my table data in mysql without reloading the page. It works very well but I want to simplify the way i do things with the javascript so I am not left with repetative lines of code. Here is my javascript: $(document).ready(function() { //Edit link action (1) $('.edit_link').click(function(){$('.text_wrapper').hide(); var data=$('.text_wrapper').html(); $('.edit').show();$('.editbox').html(data);$('.editbox').focus();}); //Edit link action (2) $('.edit_link2').click(function(){$('.text_wrapper2').hide(); var data=$('.text_wrapper2').html();$('.edit2').show(); $('.editbox2').html(data);$('.editbox2').focus();}); //Mouseup textarea false (1) $(".editbox").mouseup(function(){return false}); //Mouseup textarea false (2) $(".editbox2").mouseup(function(){return false}); //Textarea content editing (1) $(".editbox").change(function(){$('.edit').hide();var boxval = $(".editbox").val(); var dataString = 'data='+ boxval;$.ajax({type: "POST",url: "update.php",data: dataString,cache: false,success: function(html){$('.text_wrapper').html(boxval);$('.text_wrapper').show();}});}); //Textarea content editing (2) $(".editbox2").change(function(){$('.edit2').hide(); var boxval = $(".editbox2").val();var dataString = 'data2='+ boxval;$.ajax({type: "POST",url: "update.php",data: dataString,cache: false,success: function(html){$('.text_wrapper2').html(boxval);$('.text_wrapper2').show();}});}); //Textarea without editing (1) $(document).mouseup(function(){$('.edit').hide();$('.text_wrapper').show();}); //Textarea without editing (2) $(document).mouseup(function(){$('.edit2').hide();$('.text_wrapper2').show();}); }); As you can see I am having to repeat the functions and all I do is change the name. Instead of repeating the script like I am over and over again to recognise different textareas is there a way I can array it or something like this so I don't have endless lines of the same code over and over again? I have allot more then just 2 textareas but of course shortened it for this post. Here is how I UPDATE the data in MySQL. I am looking into moving this over to PDO as I have be learning that PDO is the more safe and finctional option. My question here would be is there a simple way to UPDATE the rows instead of the way I doing this by repeating this process over and over again? I know I can use the: if (isset()); but I am troubled to work out how I would define the "id" of the data I am changing? <?php include("connection.php"); if($_POST['data']) { $data=$_POST['data']; $data = mysql_escape_String($data); $sql = "update slider set content='$data' where id='1'"; mysql_query( $sql); } if($_POST['data2']) { $data2=$_POST['data2']; $data2 = mysql_escape_String($data2); $sql = "update slider set content='$data2' where id='2'"; mysql_query( $sql); } ?> The HTML is quite simple. The form is wrapped in a div and the "edit" link is defined by class which again I repeat by just copy and past, the select is done via "id" which I need to define in the UPDATE section: <a href="#" class="edit_link" title="Edit">Edit</a> <? $sql=mysql_query("select content from slider where id='1'"); $row=mysql_fetch_array($sql); $profile=$row['content']; ?> <div class="text_wrapper" style=""><?php echo $profile; ?></div> <div class="edit" style="display:none"> <textarea class="editbox" cols="23" rows="3" name="profile_box"></textarea> </div> <a href="#" class="edit_link2" title="Edit">Edit</a> <? $sql=mysql_query("select content from slider where id='2'"); $row=mysql_fetch_array($sql); $profile=$row['content']; ?> <div class="text_wrapper2" style=""><?php echo $profile; ?></div> <div class="edit2" style="display:none"> <textarea class="editbox2" cols="23" rows="3" name="profile_box"></textarea> </div> I hate asking for help but I really need some guidence here as myself and Javascript are not good friends and myself and PHP are just starting a relationship, if you know what I mean. Any examples of how to achieve this? I do beleive if anyone could put me in the right direction it would be a great script to share around as it is very functional. I apologize for such a large post, however I really am stuck and have gone this far. I have researched google but find i just keep getting stuck. Idealy I just want to simplify the whole script, make it more functional and save myself the repetative task of going over the same thing again and again.
-
I want to show and hide all of them at once no matter which button I click on. I'm sure there is an easy way, but I don't know javascript. <script type="text/javascript"> function showDiv() { document.getElementById('welcomeDiv').style.display = "block"; } function showDiv2() { document.getElementById('welcomeDiv2').style.display = "none"; } </script> <div id="welcomeDiv" style="display:none;" class="answer_list" > WELCOME</div> <div id="welcomeDiv2" style="display:block;" class="answer_list" > <input type="button" name="answer" value="Show Div" onclick="showDiv();showDiv2();" /></div> <div id="welcomeDiv" style="display:none;" class="answer_list" > WELCOME2</div> <div id="welcomeDiv2" style="display:block;" class="answer_list" > <input type="button" name="answer" value="Show Div" onclick="showDiv();showDiv2();" /></div> <div id="welcomeDiv" style="display:none;" class="answer_list" > WELCOME3</div> <div id="welcomeDiv2" style="display:block;" class="answer_list" > <input type="button" name="answer" value="Show Div" onclick="showDiv();showDiv2();" /></div>
-
This opens a new window and opens the url in parent page. I just want to refresh parent, and open new window at the same time. <a href="redirect.php?=34344" onclick="window.location.reload(); window.open(this.href,'popupwindow');" >
-
Hey guys, I am probably about to ask too much but I really do not know where to start so I am asking for help. I have a javascript code that stores an array of 366 quotes. One per day(including leap year so the code does not fail on the 366th day). I currently switched to a host that allows PHP. I would like to somehow convert the code from JS to PHP. Could anyone help? I really do not know where to start. Date.prototype.getDOY = function() {var onejan = new Date(this.getFullYear(),0,1); return Math.ceil((this - onejan) / 86400000);} var today = new Date(); var DOY = today.getDOY(); var Quote=new Array() Quote[0]='Quote goes here'; Quote[1]='Quote goes here'; Quote[2]='Quote goes here'; Quote[3]='Quote goes here'; Quote[4]='Quote goes here'; Quote[5]='Quote goes here'; Quote[6]='Quote goes here'; Quote[7]='Quote goes here'; Quote[8]='Quote goes here'; Quote[9]='Quote goes here'; Quote[10]='Quote goes here'; Quote[11]='Quote goes here'; Quote[12]='Quote goes here'; Quote[13]='Quote goes here'; Quote[14]='Quote goes here'; Quote[15]='Quote goes here'; Quote[16]='Quote goes here'; Quote[17]='Quote goes here'; Quote[18]='Quote goes here'; Quote[19]='Quote goes here'; Quote[20]='Quote goes here'; Quote[21]='Quote goes here'; Quote[22]='Quote goes here'; Quote[23]='Quote goes here'; Quote[24]='Quote goes here'; Quote[25]='Quote goes here'; Quote[26]='Quote goes here'; Quote[27]='Quote goes here'; Quote[28]='Quote goes here'; Quote[29]='Quote goes here'; Quote[30]='Quote goes here'; Quote[31]='Quote goes here'; Quote[32]='Quote goes here'; Quote[33]='Quote goes here'; Quote[34]='Quote goes here'; Quote[35]='Quote goes here'; Quote[36]='Quote goes here'; Quote[37]='Quote goes here'; Quote[38]='Quote goes here'; Quote[39]='Quote goes here'; Quote[40]='Quote goes here'; Quote[41]='Quote goes here'; Quote[42]='Quote goes here'; Quote[43]='Quote goes here'; Quote[44]='Quote goes here'; Quote[45]='Quote goes here'; Quote[46]='Quote goes here'; Quote[47]='Quote goes here'; Quote[48]='Quote goes here'; Quote[49]='Quote goes here'; Quote[50]='Quote goes here'; Quote[51]='Quote goes here'; Quote[52]='Quote goes here'; Quote[53]='Quote goes here'; Quote[54]='Quote goes here'; Quote[55]='Quote goes here'; Quote[56]='Quote goes here'; Quote[57]='Quote goes here'; Quote[58]='Quote goes here'; Quote[59]='Quote goes here'; Quote[60]='Quote goes here'; Quote[61]='Quote goes here'; Quote[62]='Quote goes here'; Quote[63]='Quote goes here'; Quote[64]='Quote goes here'; Quote[65]='Quote goes here'; Quote[66]='Quote goes here'; Quote[67]='Quote goes here'; Quote[68]='Quote goes here'; Quote[69]='Quote goes here'; Quote[70]='Quote goes here'; Quote[71]='Quote goes here'; Quote[72]='Quote goes here'; Quote[73]='Quote goes here'; Quote[74]='Quote goes here'; Quote[75]='Quote goes here'; Quote[76]='Quote goes here'; Quote[77]='Quote goes here'; Quote[78]='Quote goes here'; Quote[79]='Quote goes here'; Quote[80]='Quote goes here'; Quote[81]='Quote goes here'; Quote[82]='Quote goes here'; Quote[83]='Quote goes here'; Quote[84]='Quote goes here'; Quote[85]='Quote goes here'; Quote[86]='Quote goes here'; Quote[87]='Quote goes here'; Quote[88]='Quote goes here'; Quote[89]='Quote goes here'; Quote[90]='Quote goes here'; Quote[91]='Quote goes here'; Quote[92]='Quote goes here'; Quote[93]='Quote goes here'; Quote[94]='Quote goes here'; Quote[95]='Quote goes here'; Quote[96]='Quote goes here'; Quote[97]='Quote goes here'; Quote[98]='Quote goes here'; Quote[99]='Quote goes here'; Quote[100]='Quote goes here'; Quote[101]='Quote goes here' Quote[102]='Quote goes here' Quote[103]='Quote goes here'; Quote[104]='Quote goes here'; Quote[105]='Quote goes here'; Quote[106]='Quote goes here'; Quote[107]='Quote goes here'; Quote[108]='Quote goes here'; Quote[109]='Quote goes here'; Quote[110]='Quote goes here'; Quote[111]='Quote goes here'; Quote[112]='Quote goes here'; Quote[113]='"People shouldn\'t be afraid of their government. Governments should be afraid of their people." - Alan Moore, V for Vendetta'; Quote[114]='"The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart." - Helen Keller'; Quote[115]='"It is during our darkest moments that we must focus to see the light." - Aristotle Onassis'; Quote[116]='“The beautiful thing about learning is that no one can take it away from you.” - B. B. King'; Quote[117]='“Luck is what happens when preparation meets opportunity.” - Seneca'; Quote[118]='“Courage is not the absence of fear, but rather the judgement that something else is more important than fear.” - James Neil Hollingworth'; Quote[119]='“Those who wish to sing, always find a song.” - Swedish Proverb'; Quote[120]='“The most powerful weapon on earth is the human soul on fire.” - Ferdinand Foch'; Quote[121]='“He who is devoid of the power to forgive, is devoid of the power to love. ” - Martin Luther King Jr.'; Quote[122]='“Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.” - Josh Billings'; Quote[123]='“Whoever said anybody has a right to give up? ” - Marian Wright Edelman'; Quote[124]='“Enthusiasm is the mother of effort, and without it nothing great was ever achieved.” - Ralph Waldo Emerson'; Quote[125]='“There are no traffic jams along the extra mile.” - Roger Staubach'; Quote[126]='“The difference between try and triumph is a little umph. ” - Anonymous'; Quote[127]='“Men exist for the sake of one another. Teach them then or bear with them.” - Marcus Aurelius Antoninus'; Quote[128]='“It is in the shelter of each other that the people live.” - Irish Proverb'; Quote[129]='“We\'re here for a reason. I believe a bit of the reason is to throw little torches out to lead people through the dark.” - Whoopi Goldberg'; Quote[130]='“Who, being loved, is poor?” - Oscar Wilde'; Quote[131]='“Love makes your soul crawl out from its hiding place.” - Zora Neale Hurst'; Quote[132]='“Start with what is right rather than what is acceptable. ” - Peter F. Drucker'; Quote[133]='“The last of the human freedoms is to choose one\'s attitudes.” - Viktor Frankl'; Quote[134]='“I will offer a choice, not an echo.” - Barry M. Goldwater'; Quote[135]='“Look at what you\'ve got and make the best of it. It is better to light a candle than to curse the darkness.” - Proverb'; Quote[136]='“Adopt the pace of nature: her secret is patience.” - Ralph Waldo Emerson'; Quote[137]='"He who destroys a good book, kills reason itself" - John Milton'; Quote[138]='“The greatest power is often simple patience.” - E. Joseph Cossman'; Quote[139]='“Perhaps the most important thing we can undertake toward the reduction of fear is to make it easier for people to accept themselves, to like themselves.” - Bonaro W. Overstreet'; Quote[140]='“Few things can help an individual more than to place responsibility on him, and to let him know that you trust him. ” - Booker T. Washington'; Quote[141]='“Those who mind don\'t matter, and those who matter don\'t mind.” - Bernard M. Baruch'; Quote[142]='"Life itself is only a vision, a dream. Nothing exists. Just empty space and you. And you, are but a thought." - Satan'; Quote[143]='“Action springs not from thought, but from a readiness for responsibility.” - Dietrich Bonhoeffer'; Quote[144]='“Put your ear down close to your soul and listen hard.” - Anne Sexton'; Quote[145]='"Quoth the raven, nevermore." - Edgar Allen Poe'; Quote[146]='“Man is so made that when anything fires his soul, impossibilities vanish.” - Jean de La Fontaine'; Quote[147]='“The heart may be broken, and the soul remain unshaken.” - Napoleon Bonaparte'; Quote[148]='"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - Stephen Roberts'; Quote[149]='“There are souls in this world which have the gift of finding joy everywhere and of leaving it behind them when they go.” - Fredrick Faber'; Quote[150]='“It is common sense to take a method and try it. If it fails, admit it frankly and try another. But above all, try something.” - Franklin D. Roosevelt'; Quote[151]='“If you think you are too small to be effective, you have never been in the dark with a mosquito.” - Unknown'; Quote[152]='“Just go out there and do what you\'ve got to do.” - Martina Navrátilová'; Quote[153]='“Nothing is at last sacred but the integrity of your own mind.” - Ralph Waldo Emerson'; Quote[154]='"Freedom is not a gift from Heaven. One must fight for it every day." - Simon Wiesenthal'; Quote[155]='“Wisdom is knowing what to do next; virtue is doing it.” - David Star Jordan'; Quote[156]='“No amount of ability is of the slightest avail without honor.” - Andrew Carnegie'; Quote[157]='“Better keep yourself clean and bright. You are the window through which you must see the world.” - George Bernard Shaw'; Quote[158]='“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.” - Charles Swindoll'; Quote[159]='“Good actions give strength to ourselves and inspire good actions in others.” - Plato'; Quote[160]='“Just don\'t give up trying to do what you really want to do. Where there\'s love and inspiration, I don\'t think you can go wrong.” - Ella Jane Fitzgerald'; Quote[161]='“If you tell a big enough lie and tell it frequently enough, it will be believed.” - Adolf Hitler'; Quote[162]='“Nothing is so strong as gentleness. Nothing is so gentle as real strength.” - Saint Francis de Sales'; Quote[163]='“The real man smiles in trouble, gathers strength from distress, and grows brave by reflection.” - Thomas Paine'; Quote[164]='“We either make ourselves miserable or we make ourselves strong. The amount of work is the same.” - Carlos Casteneda'; Quote[165]='“Were it not for hope the heart would break.” - Scottish Proverb'; Quote[166]='“No winter lasts forever; no spring skips it\'s turn.” - Hal borland'; Quote[167]='“Do not compare yourself to others. If you do so, you are insulting yourself.” - Adolf Hitler'; Quote[168]='“Once you choose hope, anything\'s possible.” - Christopher Reeve'; Quote[169]='“We must accept finite disappointment, but we must never lose infinite hope.” - Martin Luther King Jr.'; Quote[170]='“Strive to be first: first to nod, first to smile, first to compliment, and first to forgive.” - Anonymous'; Quote[171]='“Work is either fun or drudgery. It depends on your attitude. I like fun.” - Colleen C. Barrett'; Quote[172]='"A fool learns by his mistakes, a wise man learns from the mistakes of others." - The Librarian'; Quote[173]='“ \'Stay\' is a charming word in a friend\'s vocabulary.” - Louisa May Alcott'; Quote[174]='“We are all in the same boat in a stormy sea, and we owe each other a terrible loyalty.” - G. K. Chesterton'; Quote[175]='“The best things in life are never rationed. Friendship, loyalty, love, do not require coupons.” - George T. Hewitt'; Quote[176]='“It is better to be faithful than famous.” - Theodore Roosevelt'; Quote[177]='“The test of courage comes when we are in the minority. The test of tolerance comes when we are in the majority.” - Ralph W. Sockman'; Quote[178]='“Trust thyself: every heart vibrates to that iron string.” - Ralph Waldo Emerson'; Quote[179]='“Life has meaning only if one barters it day by day for something other than itself.” - Antoine de Sainte-Exupery'; Quote[180]='“No one is more cherished in this world than someone who lightens the burden of another.” - Unknown'; Quote[181]='“I can live for two months on a good compliment.” - Mark Twain'; Quote[182]='“No one\'s head aches when he is comforting another.” - Indian Proverb'; Quote[183]='“Appreciation...acknowledges the presence of good wherever you shine the light of your thankful thoughts.” - Alan Cohen'; Quote[184]='“The best way to find yourself is to lose yourself in the service of others.” - Mohandas Karamchand Gandhi'; Quote[185]='“Be a good listener. Your ears will never get you in trouble.” - Frank Tyger'; Quote[186]='“Dreams come in a size too big so that we may grow into them.” - Josie Bisset'; Quote[187]='“And the day came when the risk to remain tight in a bud was more painful than the risk it took to blossom.” - Anais Nin'; Quote[188]='“Gracefulness has been defined to be the outward expression of the inward harmony of the soul.” - William Hazlitt'; Quote[189]='“What ever beauty may be, it has for its basis order, and for its essence unity.” - Father Andre'; Quote[190]='“Example has more followers than reason.” - Christian Nestell Bovee'; Quote[191]='“A mind is a fire to be kindled, not a vessel to be filled.” - Plutarch'; Quote[192]='“To be good is noble, but to teach others how to be good is nobler--and less trouble.” - Mark Twain'; Quote[193]='“When there is no enemy within, the enemies outside cannot hurt you.” - African Proverb'; Quote[194]='“We learn more by looking for the answer to a question and not finding it than we do from learning the answer itself.” - Lloyd Alexander'; Quote[195]='“When spider webs unite they can tie up a lion.” - African Proverb'; Quote[196]='“I am a part of all that I have met.” - Alfred Tennyson, 1st Baron Tennyson'; Quote[197]='“Only a life lived for others is worth living.” - Albert Einstein'; Quote[198]='“The wise man belongs to all countries, for the home of a great soul is the whole world.” - Democritus'; Quote[199]='“Diversity is the one true thing we all have in common. Celebrate it every day.” - Unknown'; Quote[200]='“As man draws nearer to the stars, why should he not also draw nearer to his neighbor?” - Lyndon B. Johnson'; Quote[201]='“All doors open to courtesy. ” - Dr. Thomas Fuller'; Quote[202]='“Character is the total of thousands of small daily strivings to live up to the best that is in us.” - A. G. Trudeau'; Quote[203]='“With courage you will dare to take risks, have the strength to be compassionate, and the wisdom to be humble. Courage is the foundation of integrity.” - Keshavan Nair'; Quote[204]='“No steam or gas drives anything until it is confined. No life ever grows great until it is focused, dedicated, disciplined.” - Harry Emerson Fosdick'; Quote[205]='“Love yourself, accept yourself, forgive yourself, and be good to yourself, because without you the rest of us are without a source of many wonderful things.” - Dr. Leo Buscaglia'; Quote[206]='“To love means loving the unlovable. To forgive means pardoning the unpardonable. Faith means believing the unbelievable. Hope means hoping when everything seems hopeless.” - G. K. Chesterton'; Quote[207]='“When work, commitment, and pleasure all become one and you reach that deep well where passion lives, nothing is impossible.” - Nancy Coey'; Quote[208]='“It was character that got us out of bed, commitment that moved us into action, and discipline that enabled us to follow through.” - Zig Ziglar'; Quote[209]='“Reach high, for stars lie hidden in your soul. Dream deep, for every dream precedes the goal.” - Pamela Vaull Starr'; Quote[210]='“The road of life twists and turns and no two directions are ever the same. Yet our lessons come from the journey, not the destination.” - Don Williams Jr.'; Quote[211]='“Humility leads to strength and not to weakness. It is the highest form of self-respect to admit mistakes and to make amends for them.” - John J. McCloy'; Quote[212]='“Sense shines with a double luster when it is set in humility. An able and yet humble man is a jewel worth a kingdom.” - William Penn'; Quote[213]='“Dream your dream. Follow your heart. Imagine. Listen to the wind. Drink sunsets. Be free. Let the wonder never cease. Believe. Wish on EVERY star. Create adventure. Be Kind.” - Debbie Coulter'; Quote[214]='Quote goes here'; Quote[215]='Quote goes here'; Quote[216]='Quote goes here'; Quote[217]='Quote goes here'; Quote[218]='Quote goes here'; Quote[219]='Quote goes here'; Quote[220]='Quote goes here'; Quote[221]='Quote goes here'; Quote[222]='Quote goes here'; Quote[223]='Quote goes here'; Quote[224]='Quote goes here'; Quote[225]='Quote goes here'; Quote[226]='Quote goes here'; Quote[227]='Quote goes here'; Quote[228]='Quote goes here'; Quote[229]='Quote goes here'; Quote[230]='Quote goes here'; Quote[231]='Quote goes here'; Quote[232]='Quote goes here'; Quote[233]='Quote goes here'; Quote[234]='Quote goes here'; Quote[235]='Quote goes here'; Quote[236]='Quote goes here'; Quote[237]='Quote goes here'; Quote[238]='Quote goes here'; Quote[239]='Quote goes here'; Quote[240]='Quote goes here'; Quote[241]='Quote goes here'; Quote[242]='Quote goes here'; Quote[243]='Quote goes here'; Quote[244]='Quote goes here'; Quote[245]='Quote goes here'; Quote[246]='Quote goes here'; Quote[247]='Quote goes here'; Quote[248]='Quote goes here'; Quote[249]='Quote goes here'; Quote[250]='Quote goes here'; Quote[251]='Quote goes here'; Quote[252]='Quote goes here'; Quote[253]='Quote goes here'; Quote[254]='Quote goes here'; Quote[255]='Quote goes here'; Quote[256]='Quote goes here'; Quote[257]='Quote goes here'; Quote[258]='Quote goes here'; Quote[259]='Quote goes here'; Quote[260]='Quote goes here'; Quote[261]='Quote goes here'; Quote[262]='Quote goes here'; Quote[263]='Quote goes here'; Quote[264]='Quote goes here'; Quote[265]='Quote goes here'; Quote[266]='Quote goes here'; Quote[267]='Quote goes here'; Quote[268]='Quote goes here'; Quote[269]='Quote goes here'; Quote[270]='Quote goes here'; Quote[271]='Quote goes here'; Quote[272]='Quote goes here'; Quote[273]='Quote goes here'; Quote[274]='Quote goes here'; Quote[275]='Quote goes here'; Quote[276]='Quote goes here'; Quote[277]='Quote goes here'; Quote[278]='Quote goes here'; Quote[279]='Quote goes here'; Quote[280]='Quote goes here'; Quote[281]='Quote goes here'; Quote[282]='Quote goes here'; Quote[283]='Quote goes here'; Quote[284]='Quote goes here'; Quote[285]='Quote goes here'; Quote[286]='Quote goes here'; Quote[287]='Quote goes here'; Quote[288]='Quote goes here'; Quote[289]='Quote goes here'; Quote[290]='Quote goes here'; Quote[291]='Quote goes here'; Quote[292]='Quote goes here'; Quote[293]='Quote goes here'; Quote[294]='Quote goes here'; Quote[295]='Quote goes here'; Quote[296]='Quote goes here'; Quote[297]='Quote goes here'; Quote[298]='Quote goes here'; Quote[299]='Quote goes here'; Quote[300]='Quote goes here'; Quote[301]='Quote goes here' Quote[302]='Quote goes here' Quote[303]='Quote goes here'; Quote[304]='Quote goes here'; Quote[305]='Quote goes here'; Quote[306]='Quote goes here'; Quote[307]='Quote goes here'; Quote[308]='Quote goes here'; Quote[309]='Quote goes here'; Quote[310]='Quote goes here'; Quote[311]='Quote goes here'; Quote[312]='Quote goes here'; Quote[313]='Quote goes here'; Quote[314]='Quote goes here'; Quote[315]='Quote goes here'; Quote[316]='Quote goes here'; Quote[317]='Quote goes here'; Quote[318]='Quote goes here'; Quote[319]='Quote goes here'; Quote[320]='Quote goes here'; Quote[321]='Quote goes here'; Quote[322]='Quote goes here'; Quote[323]='Quote goes here'; Quote[324]='Quote goes here'; Quote[325]='Quote goes here'; Quote[326]='Quote goes here'; Quote[327]='Quote goes here'; Quote[328]='Quote goes here'; Quote[329]='Quote goes here'; Quote[330]='Quote goes here'; Quote[331]='Quote goes here'; Quote[332]='Quote goes here'; Quote[333]='Quote goes here'; Quote[334]='Quote goes here'; Quote[335]='Quote goes here'; Quote[336]='Quote goes here'; Quote[337]='Quote goes here'; Quote[338]='Quote goes here'; Quote[339]='Quote goes here'; Quote[340]='Quote goes here'; Quote[341]='Quote goes here'; Quote[342]='Quote goes here'; Quote[343]='Quote goes here'; Quote[344]='Quote goes here'; Quote[345]='Quote goes here'; Quote[346]='Quote goes here'; Quote[347]='Quote goes here'; Quote[348]='Quote goes here'; Quote[349]='Quote goes here'; Quote[350]='Quote goes here'; Quote[351]='Quote goes here'; Quote[352]='Quote goes here'; Quote[353]='Quote goes here'; Quote[354]='Quote goes here'; Quote[355]='Quote goes here'; Quote[356]='Quote goes here'; Quote[357]='Quote goes here'; Quote[358]='Quote goes here'; Quote[359]='Quote goes here'; Quote[360]='Quote goes here'; Quote[361]='Quote goes here'; Quote[362]='Quote goes here'; Quote[363]='Quote goes here'; Quote[364]='Quote goes here'; Quote[365]='Quote goes here'; function writeQuote() { document.getElementById("dayQuote").innerHTML = '<b>Quote Of The Day #'+DOY+'</b><br>'; document.getElementById("dayQuote").innerHTML += Quote[DOY]; }
- 3 replies
-
- javascript
- php
-
(and 1 more)
Tagged with: