Jump to content

lional

Members
  • Posts

    271
  • Joined

  • Last visited

Everything posted by lional

  1. Hi, thanks, did some rough calculations and that should work, thanks a million
  2. Hi I am busy with a word press and I need to add leading zeros to a number in javascript so that for example 9 becomes 0.00009, and 30 becomes 0.00030 and 560 becomes 0.00560. I am very new to Javascript. I have been looking at the pad left functions. Is this the correct function or is there another one. Any help will be much appreciated
  3. Thanks for your input, I made some alterations since my post, still not working but I think I am closer. I moved my functions to the functions.php in my theme. Here are my two functions function getTierBLOne() { global $wpdb; $maincats = $wpdb->get_results( "SELECT * FROM nova_tp_forex_main_cats ORDER BY forex_name ASC" ); //$result_query = mysqli_query($conn,"SELECT * FROM nova_tp_forex_main_cats ORDER BY forex_name ASC"); //while ($tier = mysqli_fetch_array($result_query)) foreach($maincats as $maincat) { echo '<option value="' . $maincat->forex_id .'">'.$maincat->forex_name.'</option>'; } } if (isset($_GET['func'])&& $_GET['func'] == 'drop_bl' ) { drop_bl($_GET['drop_var']); } function drop_bl($drop_var) { global $wpdb; $subcats = $wpdb->get_results( "SELECT * FROM nova_tp_forex_main_subcats WHERE forex_main_cat = '$drop_var' ORDER BY forex_subcat_name"); echo '<select name="drop_2" id="drop_2"> <option value=" " disabled="disabled" selected="selected">Choose one</option>'; foreach($subcats as $subcat) { echo '<option value="'.$subcat->forex_subcat_id.'">'.$subcat->forex_subcat_name.'</option>'; } echo '</select> '; } Here is the latest version of my js file jQuery(document).ready(function() { jQuery('#wait_bl').hide(); jQuery('#drop_bl').change(function(){ alert( "Handler for .change() called." ); jQuery('#wait_bl').show(); jQuery('#result_bl').hide(); jQuery.post( nova_ajax_script.ajax_url, { action: "drop_bl", drop_var: jQuery('#drop_bl').val() }, function(response) { $('#result_bl').fadeOut(); setTimeout("finishAjax('result_bl', '"+escape(response)+"')", 400); }, )} ); }); function finishAjax(id, response) { jQuery('#wait_bl').hide(); jQuery('#'+id).html(unescape(response)); jQuery('#'+id).fadeIn(); } And here is my final plugin file <?php function js_enqueue_scripts() { wp_register_script('nova_ajax_script', plugins_url('js/nova-ajax.js', __FILE__), array('jquery'), null, true); wp_localize_script( 'nova-script', 'nova_ajax_script', array( 'ajax_url' => admin_url('admin-ajax.php')) ); } add_action( 'wp_enqueue_scripts', 'js_enqueue_scripts' ); function nova_options_page() { // Add top level admin menu add_menu_page('Nova Trade Signal', 'Nova Trade Signal', 'manage_options', 'nova', 'add_nova_trade_signal_html', plugins_url('Nova-Trade-Signals/images/icon_admin.jpg')); add_submenu_page('nova', 'Add Trade Signal', 'Add Trade Signal', 'manage_options', 'add_nova_trade_signal', 'add_nova_trade_signal_html'); add_submenu_page('nova', 'Update Trade Signal', 'Update Trade Signal', 'manage_options', 'update_nova_trade_signal', 'update_nova_trade_signal_html'); } /** * register our tv_options_page to the admin_menu action hook */ add_action('admin_menu', 'nova_options_page'); /** *function page for output of adding trade signal */ function add_nova_trade_signal_html() { ?> <select name="drop_bl" id="drop_bl" style="margin-top:0px;margin-left:35px"> <option value="" selected="selected" disabled="disabled">Select a Province</option> <?php getTierBLOne(); ?> </select> <span id="wait_bl" style="display: none;"> </span> <span id="result_bl" style="display: none;"></span> <?php } add_action('wp_ajax_drop_bl', 'drop_2'); add_action('wp_ajax_no_priv_drop_bl', 'drop_2'); ?>
  4. Sorry, I have another function page <?php //************************************** // Page load dropdown results // //************************************** function getTierBLOne() { include 'includes/conn_db.php'; $result_query = mysqli_query($conn,"SELECT * FROM nova_tp_forex_main_cats ORDER BY forex_name ASC"); while ($tier = mysqli_fetch_array($result_query)) { echo '<option value="'.$tier['forex_id'].'">'.$tier['forex_name'].'</option>'; } } //************************************** // First selection results // //************************************** if (isset($_GET['func'])&& $_GET['func'] == 'drop_bl' ) { drop_1($_GET['drop_var']); } function drop_1($drop_var) { include_once('includes/conn_db.php'); $result_query = mysqli_query($conn,"SELECT * FROM nova_tp_forex_main_cats WHERE forex_main_cat = '$drop_var' ORDER BY forex_subcat_name"); echo '<select name="drop_2" id="drop_2"> <option value=" " disabled="disabled" selected="selected">Choose one</option>'; while($drop_2 = mysqli_fetch_array($result_query)) { echo '<option value="'.$drop_2['forex_subcat_id'].'">'.$drop_2['forex_subcat_name'].'</option>'; } echo '</select> '; } ?> So what effectively happens (or suppose to happen) is the plugin page goes to this page to pull initial drop down data, then on change the ajax calls the next function to populate the second drop down
  5. Hi All I am trying to write chained selects for a WordPress plugin I am busy with. I have been struggling with it for a few days because my ajax is very weak. This is my file plugin file: <?php function js_enqueue_scripts() { wp_enqueue_script ("nova-ajax-handle", get_stylesheet_directory_uri() . "js/nova-ajax.js", array('jquery')); //the_ajax_script will use to print admin-ajaxurl in custom ajax.js wp_localize_script('nova-ajax-handle', 'nova_ajax_script', array('ajaxurl' =>admin_url('admin-ajax.php'))); } add_action("wp_enqueue_scripts", "js_enqueue_scripts"); ?> <select name="drop_bl" id="drop_bl" style="margin-top:0px;margin-left:35px"> <option value="" selected="selected" disabled="disabled">Select a Province</option> <?php getTierBLOne(); ?> </select> <span id="wait_bl" style="display: none;"> </span> <span id="result_bl" style="display: none;"></span> My Javascript file looks like this: $(document).ready(function() { $('#wait_bl').hide(); $('#drop_bl').change(function(){ $('#wait_bl').show(); $('#result_bl').hide(); $.ajax({ url: nova_ajax_script,ajax_url, type: get, func: "drop_bl", drop_var: $('#drop_bl').val() }), function(response) { $('#result_bl').fadeOut(); setTimeout("finishAjax('result_bl', '"+escape(response)+"')", 400); } return false; }); }); function finishAjax(id, response) { $('#wait_bl').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } When I select my first dropdown, it does not fire up the second one. This is my very first attempt at WordPress development, so I might be making many errors Thank you
  6. Hi All I am trying to create a modal popup but I would like it to do the following 1. Load when the user enters the site, but only once not every time they navigate to a new page. 2. when they leave the site. again only when they leave the site not when they move from page to page. I am still busy on number 1 so I haven't started working on nr 2. I have got the popup part right but it loads every time the page is refreshed. I have been trying to play with cookies but then it doesn't load at all <script> if (once_per_session==0) $(document).ready(function() { if ($.cookie('20080521') != '1') { $('#myModal').modal('show'); $.cookie('20080521', '1', { domain: '', path: '' }); } }); </script> <div class="modal fade" id="myModal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Modal Header</h4> </div> <div class="modal-body"> <p>Some text in the modal.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <style> .modal{ position:fixed; top:0; right:0; bottom:0; left:0; z-index:1050; display:none; overflow:hidden; -webkit-overflow-scrolling:touch; outline:0 } .modal.fade .modal-dialog{ -webkit-transition:-webkit-transform .3s ease-out; -o-transition:-o-transform .3s ease-out; transition:transform .3s ease-out; -webkit-transform:translate(0,-25%); -ms-transform:translate(0,-25%); -o-transform:translate(0,-25%); transform:translate(0,-25%) } .modal.in .modal-dialog{ -webkit-transform:translate(0,0); -ms-transform:translate(0,0); -o-transform:translate(0,0); transform:translate(0,0) } .modal-open .modal{ overflow-x:hidden; overflow-y:auto } .modal-dialog{ position:relative; width:auto; margin:10px } .modal-content{ position:relative; background-color:#fff; -webkit-background-clip:padding-box; background-clip:padding-box; border:1px solid #999; border:1px solid rgba(0,0,0,.2); border-radius:6px; outline:0; -webkit-box-shadow:0 3px 9px rgba(0,0,0,.5); box-shadow:0 3px 9px rgba(0,0,0,.5) } .modal-backdrop{ position:fixed; top:0; right:0; bottom:0; left:0; z-index:1040; background-color:#000 } .modal-backdrop.fade{ filter:alpha(opacity=0); opacity:0}.modal-backdrop.in{ filter:alpha(opacity=50); opacity:.5 } .modal-header{ padding:15px; border-bottom:1px solid #e5e5e5} .modal-header .close{ margin-top:-2px } .modal-title{ margin:0; line-height:1.42857143 } .modal-body{ position:relative; padding:15px } .modal-footer{ padding:15px; text-align:right; border-top:1px solid #e5e5e5 } .modal-footer .btn+.btn{ margin-bottom:0; margin-left:5px } .modal-footer .btn-group .btn+.btn{ ; top:-9999px; width:50px; height:50px; overflow:scroll}@media (min-width:768px){ .modal-dialog{ width:600px; margin: 30px auto } .modal-content{ -webkit-box-shadow:0 5px 15px rgba(0,0,0,.5); box-shadow:0 5px 15px rgba(0,0,0,.5) }.modal-sm{width:300px}}@media (min-width:992px){ .modal-lg{ width:900px } } </style> Thank you in advance
  7. Hi I am trying to keep a tooltip on the page even when the user scrolls What I had in mind is keeping the the tooltip in a static position on the screen so as the user scrolls the position would stay teh same but for this to happen the margins would need to dynamically change. Here is my CSS so far /* Tooltip container */ .tooltip { /* border-bottom: 0px dotted black; If you want dots under the hoverable text */ } /* Tooltip text */ .tooltip .tooltiptext { border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); font-family:Arial, Helvetica, sans-serif; font-size:16px; position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 350px; width: 450px; margin-top:25px; visibility:hidden; background-color: rgba(0, 75, 133, 0.5); opacity:0.6; padding-left:15px;padding-bottom:15px;padding-right:15px } /* Tooltip arrow */ .tooltip .tooltiptext::after { content: ""; position: absolute; top: 100%; left: 50%; ; border-width: 5px; border-style: solid; border-color: #555 transparent transparent transparent; } /* Show the tooltip text when you mouse over the tooltip container */ .tooltip:hover .tooltiptext { visibility: visible; opacity: 0.8; } My html line is repeated for each category which I have 17 categories <a data-image-id="1" class="navigation <ul> <li> <a data-image-id="1" class="navigation tooltip" href="#"><h2 style="text-align:center;margin-top:5px">Category1</h2><span class="tooltiptext">Tooltip Text</span></a> </li> <li> <a data-image-id="2" class="navigation tooltip" href="#"><h2 style="text-align:center;margin-top:5px">Category2</h2><span class="tooltiptext">Tooltip Text</span></a> </li> --> </li> and I have javascript to handle images changing <script type="text/javascript"> //<![CDATA[ window.onload=function(){ (function() { var images = { "1": "images/hygiene1.png", "2": "images/hygiene1.png", "3": "images/change_room.png", "4": "images/foam.png", "5": "images/drains.png", "6": "images/factory.png", "7": "images/cleaning.png", "8": "images/consumable.png", "9": "images/lifting.png", "10": "images/deboning.png", "11": "images/smoking.png", "12": "images/deboning.png", "13": "images/water.png", "14": "images/a_z.png", "15": "images/csk.png", "16": "images/boyens.png", "17": "images/galactic.png" }; var navTv = document.getElementById('nav-tv'); var arr = document.getElementsByClassName('navigation'); for(var i=0; i<arr.length; i++) { arr[i].onmouseover = function(e) { var a = e.target; var imgId = a.getAttribute('data-image-id'); var imgSrc = images[imgId]; var style = ['background-image: url(', imgSrc, ');'].join(''); navTv.setAttribute('style', style); } } })(); }//]]> </script> Any help pointing me in the right direction so that I can code it will be appreciated
  8. Hi I am trying to write a script that changes the background based on a navigation hover and I have got that part right. What I would like to further do is when I move off the navigation bar it remembers the last image, if this makes sense. Here is my code so far <nav> <ul> <li> <a href="#">Home</a> <img src="pic2.jpg" alt=""> </li> <li> <a href="#">About</a> <img src="pic3.jpg" alt=""> </li> <li> <a href="#">Clients</a> <img src="pic4.jpg" alt=""> </li> <li> <a href="#">Work</a> <img src="pic5.jpg" alt=""> </li> <li> <a href="#">Contact</a> <img src="pic6.jpg" alt=""> </li> </ul> </nav> <img src="pic1.jpg" alt=""> </div> and the css .container { position: relative; overflow: hidden; margin: 100px auto; width: 800px; height: 500px; -webkit-box-shadow: 10px 10px 10px rgba(0,0,0,0.3); box-shadow: 10px 10px 10px rgba(0,0,0,0.3); } .container img { position: absolute; top: 0; left: 0; z-index: -60; } .container li img { position: absolute; top: 0; left: 800px; z-index: -50; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; -ms-transition: all 1s ease; transition: all 1s ease; } nav { width: 170px; height: 500px; background: #fff; } nav h1 { padding: 20px; color: #ccc; text-align: right; font: 25px Georgia, Times, serif; } ul { width: 800px; height: 500px; list-style: none; } li a { z-index: 1; display: block; padding-left: 20px; width: 150px; height: 30px; background: white; color: #444; text-decoration: none; font: 14px/30px Helvetica, Verdana, sans-serif; } li:nth-child(1) { padding-top: 50px; } li a:hover { background: #eee; } li a:hover + img { left: 0px; } I think I would need javascript in here somehow. I am a newbie at javascript so if someone can point me in teh right direction it would be much appreciated.
  9. Hi I am trying to do a foreach loop withing a mysqli query I had it working with mysql but am struggling doing it with mysqli here is my code so far $query = mysqli_query($conn,'SELECT * FROM cooking_classes WHERE class_id IN (' . foreach ($_SESSION['cart'] as $key => $value) { $query .= $key . ','; } $query = substr ($query, 0, -1) . ')'; $result = mysqli_query($query) or die(mysqli_error()); Thanks in advance Lional
  10. No, I am using PHP mailer to send the mail. If I print the variable to screen before PHPmailer assigns the array it is correct, it is just when the array is done it only takes the last name
  11. Morning, At the top of the message I want to say Good Morning, John for example If the table field does not have a value in it then it should just say Good Morning However what is happening is it is attaching the last name in the Database to all the emails, so if Brian is the last name in the database table all the mails will day Good Morning, Brian instead of that persons individual name Thanks Lional
  12. Hi I am trying to write a script where each mail body has the clients name after the greeting $result_first = mysqli_query($conn,"SELECT * from clients WHERE profmed = '1' AND email != ''"); while ($row_first = mysqli_fetch_assoc($result_first)){ $surname_out = $row_first['surname']; $email_out = $row_first['email']; $firstname_out = $row_first['firstname']; $known_as_out = $row_first['known_as']; /*print $known_as_out;*/ $complete_name = $firstname_out . ' ' . $surname_out; $final_msg = $greeting_in_out . ' ' . $known_as_out . '<br /><br />' . $textToStore; $mail->Subject = $subject_out; $mail->IsHTML(true); $mail->Body = " <html> <head> <title></title> </head> <body> <table><tr><td> $final_msg $mail_sig</table></body></html>"; A quick explanation. The client sends through the greeting that he requires to send which is the variable $greeting_in_out, the persons name $known_as_out and the message ($textToStore) is appended to it. But $mail->Body only takes the last name pulled from the database. How can each mail have the persons name on the message Thank you Lional
  13. Thank you, I thought of that approach but the only issue I have with that is how would the client access the page outside of the site. would it be something like this: www.somedomain.com/buspage.php?usrid=(then the client id)
  14. Hi All I have a a directory website but numereous listings don't have their own website so they are requesting a single page to show a summary of their business and products. I know how to do most of it the part I am unsure of is: I have a form where they upload text, images, etc to a database and upload the images. what I would like to do is to save it as a file under a subdirectory. Is it possible to save a file php file using php Thank you in advance Lional
  15. Hi I am trying to write a nave bar where the sub menu and sub sub menu is pulled from mysql tables. It works but only pulls the first sub menu and does not roll to the second Here is my code $query4 = "SELECT * from categories WHERE active = '1'"; // display the products in each subcat $result4 = mysql_query($query4, $conn); while ($row4 = mysql_fetch_assoc($result4)){ $cat_id_out = $row4["cat_id"]; $category_out = $row4["category"]; echo '<li><a href=""><span>' . $category_out . '</span></a><ul>'; $query4 = "SELECT * from subcats WHERE cat_id = '$cat_id_out' AND active = '1'"; // display the products in each subcat $result4 = mysql_query($query4, $conn); while ($row4 = mysql_fetch_assoc($result4)){ $subcat_id_out = $row4["subcat_id"]; $subcategory_out = $row4["subcat"]; echo '<li><a href="products.php?subcat=' . $subcat_id_out . '"><span>' . $subcategory_out . '</span></a></li>'; } echo '</ul></li></ul></li>'; } Thanks in advance
  16. Hi This is for a two tier chained select and I need a three tier. I do not know how to make the changes
  17. Hi here is my code for a two tier which I would like to make a three tier chained select <script type="text/javascript"> $(document).ready(function(){ $("select#type").attr("disabled","disabled"); $("select#category").change(function(){ $("select#type").attr("disabled","disabled"); $("select#type").html("<option>wait...</option>"); var id = $("select#category option:selected").attr('value'); $.post("select_type.php", {id:id}, function(data){ $("select#type").removeAttr("disabled"); $("select#type").html(data); }); }); /* $("form#select_form").submit(function(){ var cat = $("select#category option:selected").attr('value'); var type = $("select#type option:selected").attr('value'); if(cat>0 && type>0) { var result = $("select#type option:selected").html(); $("#result").html('your choice: '+result); } else { $("#result").html("you must choose two options!"); } return false; });*/ }); </script> <form id="select_form" name="select_form" action="cat_list.php" method="post"> Choose a category:<br /> <select id="category" name="category"> <?php echo $opt->ShowCategory(); ?> </select> </td><td> choose a type:<br /> <select id="type" name="type"> <option value="0">Choose a Sub-category</option> </select> </td><td> <input type="submit" value="confirm" /> The select_type.php <?php include "includes/select.class.php"; echo $opt->ShowType(); ?> and select.class.php <?php class SelectList { protected $conn; public function __construct() { $this->DbConnect(); } protected function DbConnect() { include "includes/db_config.php"; $this->conn = mysql_connect($host,$user,$password) OR die("Unable to connect to the database"); mysql_select_db($db,$this->conn) OR die("can not select the database $db"); return TRUE; } public function ShowCategory() { $top_level_id = $_GET['catid']; $sql = "SELECT client_subcats.cat_id, categories.cat_id, categories.category FROM client_subcats, categories WHERE client_subcats.cat_id = categories.cat_id AND categories.top_level_id = '$top_level_id' GROUP BY categories.category ORDER BY categories.category"; $res = mysql_query($sql,$this->conn); $category_out = '<option value="0">Choose a Category</option>'; while($row = mysql_fetch_array($res)) { $category_out .= '<option value="' . $row['cat_id'] . '">' . $row['category'] . '</option>'; } return $category_out; } public function ShowType() { $sql = "SELECT client_subcats.subcat_id, subcats.subcat_id, subcats.subcat FROM client_subcats, subcats WHERE client_subcats.subcat_id = subcats.subcat_id AND subcats.cat_id = $_POST[id] GROUP BY subcats.subcat ORDER BY subcats.subcat"; $res = mysql_query($sql,$this->conn); $type = '<option value="0">Choose a Sub-category</option>'; while($row = mysql_fetch_array($res)) { $type .= '<option value="' . $row['subcat_id'] . '">' . $row['subcat'] . '</option>'; } return $type; } } $opt = new SelectList(); ?> This is a two tier and I would like to change it to a three tier. I am very new to AJAX and any help would be appreciated Thanks Lional
  18. Thanks Do I leave this section out then $("form#select_form").submit(function(){ var cat = $("select#category option:selected").attr('value'); var type = $("select#type option:selected").attr('value'); if(cat>0 && type>0) { var result = $("select#type option:selected").html(); $("#result").html('your choice: '+result); } else { $("#result").html("you must choose two options!"); } return false; });
  19. Hi I have this script <script type="text/javascript"> $(document).ready(function(){ $("select#type").attr("disabled","disabled"); $("select#category").change(function(){ $("select#type").attr("disabled","disabled"); $("select#type").html("<option>wait...</option>"); var id = $("select#category option:selected").attr('value'); $.post("select_type.php", {id:id}, function(data){ $("select#type").removeAttr("disabled"); $("select#type").html(data); }); }); $("form#select_form").submit(function(){ var cat = $("select#category option:selected").attr('value'); var type = $("select#type option:selected").attr('value'); if(cat>0 && type>0) { var result = $("select#type option:selected").html(); $("#result").html('your choice: '+result); } else { $("#result").html("you must choose two options!"); } return false; }); }); </script> What I would like to do is instead of displaying output var result = $("select#type option:selected").html(); $("#result").html('your choice: '+result); I would like ti redirect the post in the form of POST to another page. Any help would be appreciated Thanks Lional
  20. Hi I need to create a chained select that goes down 4 levels. I was always using baaselect but I think that goes down 2 levels. Any help or to point me in the right direction will be greatly appreciated Thanks in advance Lional
  21. Hi I have an app where users upload images. I would like to control the maximum width of images. Is there a way that I can change the size of the image with PHP before it is uploaded Thanks in advance Lional
  22. Hi I am trying to do a chained select down to 40 or 5 levels I used baaselect but that I think (I could be wrong) only does 2 levels. can it be made to do the following: Cars -> Make of car -> and then type Thank you Lional
  23. Hi, I have a site where a client requests to join a particular event. From a management site I would like to list the clients who have requested the events specifying if they have attaended the event before so that new applicants will get preference. My tables are as follows. Clients table - I would like to pull the following filelds: fullnames, idno, tel (each client is assigned an unique client_id Event request - I would like to pull the event ID (The fileds in this table are client_is, event_id) Event_booking_history - I would like to pull the amount of times the client has donae a particular event. (the fileds in this table are clieny_id, event_id, no_of_times) I am trying to pull a list from this tables that would list fullname, tel, idno, no_of_times for a specific event that us selected from a drop-down box. I would like check boxes so that I can select which clients can attend which events. here is my code so far <?php $query_town = "SELECT clients.fullnames, clients.idno, clients.tel, event_request.event_id, event_booking_history.no_of_times FROM clients, event_request, event_booking_history WHERE event_request = '$bucket_list_out'"; $result_town = mysql_query($query_town) OR die(mysql_error()); while ($row_town = mysql_fetch_assoc($result_town)) { $town_out = $row_town["clients.fullnames"]; $town_out = $row_town["clients.idno"]; $town_out = $row_town["clients.tel"]; $town_out = $row_town["event_booking_history.no_of_times"]; ?> Thanks Lional
  24. Hi I have one table called bucket_list that lists all the available bucket lists. Another table called client_list that lists the bucket lists that the client has previously selected. I want to create a edit facility that allows users to edit there bucket list. What I am trying to do is create a list of checkboxes that will be checked if the entry exists in the client list and show the bucket list unchecked if the user has not selected it. Here is the code that I have been trying. $query_subcat = "SELECT bucket_list.cat_id, bucket_list.category, client_list.bucket_id FROM bucket_list, client_list WHERE client_list.client_id = '$cid_out' AND bucket_list.active = '1'"; $result_subcat = mysql_query($query_subcat, $conn); while ($row_subcat = mysql_fetch_assoc($result_subcat)){ $sub_cat_id_out = $row_subcat["cat_id"]; $subcat_out = $row_subcat["category"]; $bucket_id_out = $row_subcat['bucket_id']; print '<td width="190" align="left" valign="top"style="color:black;float:left">'; print '<input type="checkbox" value="' . $sub_cat_id_out . '" name="cat[' . $sub_cat_id_out . ']"'; if ($bucket_id_out == $sub_cat_id_out) { print 'checked="checked">'; } print ' ' . $subcat_out . '</td>';
  25. Hi I have two iframe ad banners on a page. I want each one to refresh every 8 seconds. One is on the far left and the other on the far right. I can only get one to refresh. Here is my code <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="js/featuredcontentglider.js">/************************************************ Featured Content Glider script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts* This notice must stay intact for legal use***********************************************/</script> <!--- Right hand iFrame ---> <script type="text/javascript"><!-- // set your interval in milliseconds var reloadInterval = 8000; // this will run when the document is fully loaded function init() { setTimeout('reload()',reloadInterval); } // this reloads the iframe, and triggers the next reload interval function reload() { var iframe = document.getElementById('reloader_lft', 'rht_reloader'); if (!iframe) return false; iframe.src = iframe.src; setTimeout('reload()',reloadInterval); } // load the init() function when the page is fully loaded window.onload = init; --></script> <div id="banner_left"> <iframe src="banner_left.php" width="200" height="485" scrolling="no" id="reloader_lft" style="border:0px;padding:0px;margin-top:-6px"></iframe> </div> <div id="banner_right"> <iframe src="banner_left.php" width="200" height="485" scrolling="no" id="rht_reloader" style="border:0px;padding:0px;margin-top:-6px"></iframe> </div> Thanks Lional
×
×
  • 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.