Jump to content

bravo14

Members
  • Posts

    296
  • Joined

  • Last visited

Everything posted by bravo14

  1. Being as the different plugins are using a different version, do I just need to use the most recent version of jquery for all plugins?
  2. Hi Guys I hope you can help me, I have a page that uses certain jquery plugins, but I am not sure if having all of the plugins listed has caused some kind of conflict that stops some of them working. The html that is delivered to the browser is as follows <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head> <title>Trade-Bidz :: View Lot :: RENAULT SCENIC EXPRESSION 16V A MPV</title> <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/> <link rel="stylesheet" href="css/template.css" type="text/css"/> <script src="js/jquery-1.6.min.js" type="text/javascript"> </script> <script src="js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"> </script> <script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"> </script> <script src="js/contrib/other-validations.js" type="text/javascript" charset="utf-8"> </script> <script> jQuery(document).ready(function(){ // binds form submission and fields to the validation engine jQuery("#formID").validationEngine(); }); </script> <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" /> <link href="style/trade-bidz.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css"> <script src="http://jqueryui.com/ui/jquery.ui.core.js"></script> <script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script> <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js'></script> <script type='text/javascript' src='source/jquery.tag.js'></script> <link media="screen" rel="stylesheet" href="css/jquery.tag.css" type="text/css" /> <link media="screen" rel="stylesheet" href="css/jquery-ui.custom.css" type="text/css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script> <link rel="stylesheet" type="text/css" href="style/jquery.lightbox-0.5.css" media="screen" /> <script type="text/javascript"> $(function() { $('.gallery a').lightBox(); }); </script> </head> <body> <table> <tr> <td colspan="2"> <div id="header"> <div id="login_form"> <a href="logout.php">Logout</a></div> <img src="images/logo.jpg" width="300" /></div> </td> </tr> <tr> <tr> <td colspan="2"> <div id="nav_head"> <ul> <li><a href="index.php">Home</a></li> <li><a href="browse.php">Buying</a></li> <li><a href="sell-vehicle.php">Selling</a></li> <li><a href="contact-us.php">Contact Us</a></li> <li><a href="terms.php">Terms</a></li> <li><a href="my-trade-bidz.php">My Trade-Bidz</a></li> <li><a href="how-it-works.php">How It Works</a></li> </ul> </div> </td> </tr> <tr> <td width="200"> <div class="left_column_box"> <h3>Search Items</h3> <form method="post" action="browse.php"> <table width="100%"> <tr><td>Make:</td> <td><select name="make" onchange="reload(this.form)"> <option selected="selected">Please select...</option> <option value="MG">MG</option><option value="RENAULT">RENAULT</option> </select></td> </tr> <tr><td>Model:</td><td> <select name="model"> <option>Select Make</option> </select> </td></tr> <tr><td>Style:</td><td></td></tr> <tr><td></td><td><input type="submit" name="make_model_search" value="Search"/></td></tr> </table> </form> </div> <div class="left_column_box"> <h3>Ending Soon</h3> There are no lots completing today </div> <div class="left_column_box"> <h3>Other Selected Lots</h3> <div class="mini_lot"> <h4>MG ZR</h4> <img src="photos/"/><br/> Current Bid: £1234<br/> Time Left: Countdown will go here<br/> <a href="lot.php?lot_id=38">View Lot</a><br/> </div><div class="mini_lot"> <h4>MG ZR</h4> <img src="photos/"/><br/> Current Bid: £12<br/> Time Left: Countdown will go here<br/> <a href="lot.php?lot_id=37">View Lot</a><br/> </div><div class="mini_lot"> <h4>RENAULT SCENIC EXPRESSION 16V A</h4> <img src="photos/"/><br/> Current Bid: £12<br/> Time Left: Countdown will go here<br/> <a href="lot.php?lot_id=36">View Lot</a><br/> </div> </div> </td> <td> User ID: 42<br /> Seller ID: 39<br /> Allowed to Bid: yes<br /> Allowed to Watch: no<br /> <div id="bidder_message">You are the current high bidderYou are currently watching this item</div><img src="photos/20.jpg"/> <div id="countdown">This lot ends is <span class="countdown">Insert Countdown here</span></div> <div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup"> <li class="TabbedPanelsTab" tabindex="0">Main Details</li> <li class="TabbedPanelsTab" tabindex="0">Photos</li> <li class="TabbedPanelsTab" tabindex="0">Damage</li> <li class="TabbedPanelsTab" tabindex="0">Seller Details</li> </ul> <div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent"> <table> <tr> <td>Make/Model</td><td>RENAULT SCENIC EXPRESSION 16V A MPV</td></tr> <tr> <td>Date of Manufacture:</td><td></td></tr> <tr> <td>Date of First Registration:</td><td></td></tr> <tr> <td>Colour:</td><td>GREEN</td></tr> <tr> <td>Number of Doors:</td><td>5</td></tr> <tr> <td>Engine Size:</td><td>1598</td></tr> <tr> <td>Fuel Type:</td><td>PETROL</td></tr> <tr> <td>Gearbox Type:</td><td>TIPTRONIC AUTOMATIC</td></tr> <tr> <td>Previous Keepers:</td><td>1</td></tr> <tr> <td>BHP:</td><td>115.10</td></tr> <tr> <td>Emissions:</td><td>0.00</td></tr> <tr> <td>Tread Depths:</td> <td>F/O/S 0mm F/N/S 0mm</td> </tr> <tr> <td></td> <td>R/O/S 0mm R/N/S 0mm</td> </tr> <tr><td>Service History:</td><td>0</td></tr> <tr><td>Vehicle Condition:</td><td>Please select V </td></tr> <tr><td>MOT Date:</td> <td>0000-00-00</td> </tr> </table> </div> <div class="TabbedPanelsContent"> <div class="gallery"> <ul><li><a href="photos/20.jpg"><img src="photos/20.jpg" title=""/></a></li></ul> </div> </div> <div class="TabbedPanelsContent"> <img src="images/car-outline.jpg" id="img" /> </div> <div class="TabbedPanelsContent"> <h1>Seller Details</h1> </div> </div> </div> <script type="text/javascript"> <!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); //--> </script> <div> <form id="formID" action="submit-bid.php" method="post"> <table width="60%"> <tr><td width="40%">Current Price</td><td>£3434</td></tr> <tr><td>Current High Bidder</td><td><a href="profile.php?p=42">Boyce Autos</a><input type="hidden" name="high_bidder" value="42" readonly="readonly" /></td></tr> <tr><td>Your Bid</td><td>£<input type="hidden" name="bidder" value="42" readonly="readonly" /> <input type="hidden" name="lot" value="34" readonly="readonly" /> <input type="text" class="validate[required,min[3484]]" id="bid" name="bid" /><br/>Please enter at least 3484</td></tr> <tr><td></td> <td>Once a Bid has been placed, a legal contract has been made between the bidder and the seller, the seller agrees to sell the vehicle once the reserve price has been met, the bidder agrees to purchase the vehicle once the reserve price has been met. If a bidder wants to retract a bid he or she must contact trade-bidz. Trade-bidz will monitor all bid retractions. Excessive retractions may result in a bidders membership being suspended. <br /><input type="checkbox" id="terms" class="validate[required] checkbox" name="terms" value="yes" /> By ticking this box you are agreeing to the above.<br /></td> </tr> <tr><td></td><td><input type="submit" name="submit" value="Submit Bid" /></td></tr> </table> </form> </div> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> </body> <script> $(document).ready(function(){ $("#img").tag({ save: function(width,height,top_pos,left,label,the_tag){ $.post("ajax.php",{'action':'save','width':width,'height':height,'top':top_pos,'left':left,'label':label},function(id){ the_tag.setId(id); }); }, remove: function(id){ $.post("ajax.php",{'action':'delete','id':id}); } }); $.getJSON("ajax.php",{'action':'list'},function(tags){ $.each(tags, function(key,tag){ $("#img").addTag(tag.width,tag.height,tag.top,tag.left,tag.label,tag.id); }); }); }); </script> </html> There are a couple of Javascript errors listed on the page and they are: Message: Object doesn't support this property or method Line: 18 Char: 17 Code: 0 URI: http://www.trade-bidz.co.uk/lot.php?lot_id=34 Message: Object doesn't support this property or method Line: 220 Char: 4 Code: 0 URI: http://www.trade-bidz.co.uk/lot.php?lot_id=34 When they are used by themselves the plugins work, but now they have stopped. Any help would be much appreciated.
  3. Hi guys From the page below I am trying to add image 'tags to a database using ajax. <?php session_start(); $lot_id=$_SESSION['lot_id']; include_once('includes/connect_inc.php'); ?> <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head> <title>Trade-Bidz</title> <link href="style/trade-bidz.css" rel="stylesheet" type="text/css" /> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script> <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js'></script> <script type='text/javascript' src='source/jquery.tag.js'></script> <link media="screen" rel="stylesheet" href="css/jquery.tag.css" type="text/css" /> <link media="screen" rel="stylesheet" href="css/jquery-ui.custom.css" type="text/css" /> </head> <body> <table> <tr> <td colspan="2"> <?php include_once('page_layout/header_inc.php');?> </td> </tr> <tr> <tr> <td colspan="2"> <?php include_once('page_layout/menu_inc.php');?> </td> </tr> <tr> <td width="200"> <?php include_once('page_layout/left_sidebox_inc.php');?> </td> <td> <img src="images/car-outline.jpg" id="img" /> </td> </tr> <tr> <td colspan="2"> <?php include_once('page_layout/footer_inc.php');?> </td> </tr> <tr> </body> <script> $(document).ready(function(){ $("#img").tag({ save: function(width,height,top_pos,left,label,the_tag){ $.post("ajax.php",{'action':'save','width':width,'height':height,'top':top_pos,'left':left,'label':label},function(id){ the_tag.setId(id); }); }, remove: function(id){ $.post("ajax.php",{'action':'delete','id':id}); } }); $.getJSON("ajax.php",{'action':'list'},function(tags){ $.each(tags, function(key,tag){ $("#img").addTag(tag.width,tag.height,tag.top,tag.left,tag.label,tag.id); }); }); }); </script> </html> Here is the ajax <?php /* this is ugly it's just a poc ! Do not use this on production (sql injection...)*/ session_start(); $lot_id=$_SESSION['lot_id']; include_once('includes/connect_inc.php'); switch($_REQUEST['action']){ case 'list': $tags = array(); $query = mysql_query("select * from `tbl_tags` where `lot_id` = '$lot_id'"); while($row = mysql_fetch_array($query)){ $tags[] = array("id"=>$row['id'], "label"=>$row['label'], "width"=>$row['width'], "height"=>$row['height'], "top"=>$row['top'], "left"=>$row['left']); } echo json_encode($tags); break; case 'delete': mysql_query("delete from `tbl_tags where id = ".$_REQUEST['id']); break; case 'save': mysql_query("insert into tag (`width`,`height`,`top`,`left`,`description`,`lot_id`) values ( ".$_REQUEST['width'].", ".$_REQUEST['height'].", ".$_REQUEST['top'].", ".$_REQUEST['left'].", '".$_REQUEST['label']."' '".$lot_id." )") or die(mysql_error()); echo mysql_insert_id(); break; } ?> and the sql to create the table structure is below CREATE TABLE IF NOT EXISTS `tbl_tags` ( `id` int(11) NOT NULL AUTO_INCREMENT, `lot_id` int(11) NOT NULL, `top` int(11) NOT NULL, `left` int(11) NOT NULL, `width` int(11) NOT NULL, `height` int(11) NOT NULL, `description` varchar(50) NOT NULL, PRIMARY KEY (`id`), KEY `lot_id` (`lot_id`) ) ENGINE=MyISAM DEFAULT The records are not inserting into the database,
  4. Hi I have changed the code on line 35 to $end_time=date("H:i",$_POST['end_time']); I am still getting the same error message
  5. Hi I am trying to merge to fields to make a date and time. The date field is calculated to be 4 days from today and the time is selected from a select menu using the following code <select name="end_time"> <option value="12:00:00">12:00 Noon</option> <option value="17:00:00">5:00pm</option> </select> Using the following php script $end_time=strtotime("H:i",$_POST['end_time']); //Line 35 $date=date("Y-m-d"); $end_date=strtotime($date ."+4 days" ); $end_date_time=$end_date.$end_time; $add_vehicle_sql=mysql_query("INSERT INTO `tbl_auction_lot`(`cust_id`,`reserve`,`make`,`model`,`spec`,`fuel`,`doors`,`mot_date`,`fns`,`fos`,`rns`,`ros`,`condition`,`reg_no`,`service_history`,`sale_type`,`status`,`keepers`,`gearbox`,`emissions`,`colour`,`date_first_reg`,`date_manufacture`,`bhp`,`engine_size`,`end_date`,`current_price`) VALUES ('$seller_id','$reserve','$make','$model','$body_style','$fuel_type','$no_of_doors','$mot','$fns','$fos','$rns','$ros','$vehicle_condition','$vrm','$service_history','auction','$status','$prev_keepers','$gearbox','$emissions','$colour',$date_reg','$date_man','$bhp','$engine_size', '$end_date_time','$reserve')") or die(mysql_error()); I am getting the following error message Notice: A non well formed numeric value encountered in /home/sites/trade-bidz.co.uk/public_html/add-vehicle.php on line 35 What have I done wrong?
×
×
  • 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.