JustLikeIcarus
Members-
Posts
430 -
Joined
-
Last visited
Everything posted by JustLikeIcarus
-
Well if you want it to return an Array you need to use the json type. If you want html. One way is to return a Success or Fail message then in jQuery check to see if the returned html contains Success or Fail. However a lot of systems make it to where data is only returned on fail otherwise the php redirects to the authenticated page.
-
Try replacing the following: $JSON_response = '{'; $JSON_response .= '"error": "'.addslashes($error).'",'; $JSON_response .= '"fieldErrors": "'.$msg.'",'; $JSON_response .= '}'; echo $JSON_response; With: (you may not need to set the header but you should.) $JSON_array = array('error' => $error, 'fieldErrors' => $msg); $JSON_response = json_encode($JSON_array); header('Content-type: application/json'); echo $JSON_response;
-
It likely doesnt have a temp name because the files wasnt saved in the temp space. Either your low on disk space or those settings are too low for the file being uploaded.
-
Easiest way is to put a modified copy of the php.ini file in the same directory as the script which needs the modified values.
-
I would check that your php config hasnt been modified with a post or upload max size thats too small for the file.
-
Make the below change to your smtp query section to make sure you are pulling back data from the database. Because it appears fsockopen isnt getting passed an address. Your variables should be fine outside of the function but its better practice to pass them in as arguments or move the whole below section into the mail function. $smtpdetails="SELECT * FROM smtp"; $result1 = mysql_query($smtpdetails); if (!$result1) { echo 'Could not run query: ' . mysql_error(); exit; } if (mysql_num_rows($result1) == 0) { echo "No rows found, nothing to print so am exiting"; exit; } $row1 = mysql_fetch_assoc($result1); mysql_free_result($result1);
-
Here I changed this around a little bit see if it helps. If IE is displaying the loader and nothing else then it most likely isnt recieving a response. Sometimes this can be fixed by specifying the full path to the page you are calling via ajax instead of just login.php. try out the changes I made and let me know if that helps at all. $(document).ready(function () { //This is function triggers when login button is clicked. $('#loginbtn').click(function (){ hideshow('loader',1); $.post('/login.php', { email: $('#email').val(), password: $('#password').val() }, function(data){ show_login(data); }, 'json'); }); }); //This function triggers when loginbtn process is successfully completed. function show_login(resultData) { //alert(resultData.error); if(resultData.error=='no') { $('.error').css('visibility','hidden'); $('#login_form').submit(); hideshow('loader',0); } else { hideshow('loader',0); $('.error').html(resultData.fieldErrors).css('visibility','visible'); } }
-
Safari onClick Alternative Using Jquery
JustLikeIcarus replied to cesarcesar's topic in Javascript Help
Try it this way and see if it works for you. The onMouseOver/Out events are properties of the a element not the img element so I moved those. Also your link didnt have a closing </a>. You shouldn't have to worry about how Safari handles click events since the jQuery core code is set to compensate for differences based on the browser being used. Also I would remove the mouse events from the link and just use css to swap the image on hover. It is also possible that they are causing an issue in regards to safari not triggering the jQuery click function correctly. <script language="Javascript"> <!-- $(document).ready(function() { $('.create_project').click(function(){ alert('its working'); return false; }); }); //--> </script> <a href="#" class="create_project" onMouseOver="MM_swapImage('Image51','','b.create.on.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="b.create.off.gif" width="99" height="45" border="0" id="Image51" ></a> -
I love the 960 Grid System http://960.gs/ As for building the layout I have found the best results always come from a simple text editor.
-
wanting two floating divs (left/right) of equal width in % not pixels
JustLikeIcarus replied to jasonc's topic in CSS Help
This will float the boxes stretched the way you want. However you cant just say 50% for width because the boxes have a border of 1px defined so they wont fit. so you need half the width of the containing div minus the left/right border width. I hope I am making sense.... you also should float both div's to the left not one left and one right. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style> #mainhomepage-container { padding: 0; margin: auto; width: 700px; border: 1px solid #555555;} .clear { height: 0; font-size: 1px; margin: 0; padding: 0; line-height: 0; clear: both; } .float { float: left; margin: 0px; padding:0px; border: 1px solid #555555; width:348px; } </style> </head> <body> <div id="mainhomepage-container"> <div> <div id="left"> <div id="main_left" class="float">left main content left main content left main content left main content left main content</div> <div id="main_right" class="float">right main content right main content right main content right main content right main content</div> </div> </div> <div class="clear"></div> </div> </body> </html> -
There are a couple of things which stand out when I look at this. First you can not have elements with the same id attribute. While this doesn't appear to be the cause of the issue you are having it will wreak havoc later especially if you add Javascript to the page. id's are meant to be unique. As for your spacing issue it looks as if this is an issue with the "margin:auto" rule descending into the container holding the text. For a test try setting the margin to 0 for the div's which are having the issue. And see if the text corrects itself. It appears you left some of the CSS out of the code you supplied so I am not 100% sure the above is correct. Since this is technically tabular data you may be better off using tables however. Let me know how it turns out.
-
If you want the result to look like ItemID, ItemInfo, QualityID, QualityID, etc... with all of the Quality ID's on one row take a look at using mysql's GROUP_CONCAT() function http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat . It handles this very well.
-
Remember that the values in the php.ini file for both upload_max_filesize and post_max_size need to be greater than the size of you file not just upload_max_filesize.
-
As fenway stated you should be doing something along the lines of SELECT * FROM `birthdays` WHERE month(birthday) = 5 and day(birthday) = 12 LIMIT 0, 10
-
Google "Mysql bidirectional replication" there are a few sites which explain how to set it up and you wont have to worry about timestamps, etc... since the db will handle everything.
-
I need help with a script that use Foreign Keys and InnoDB
JustLikeIcarus replied to ben0it24's topic in MySQL Help
The References section of your add constraint statement has an error specifically REFERENCES `pmd_domains` (`domain_ID`) should be REFERENCES `pmd_domains` (`id`) as pmd_domains.domain_id isnt the name of the column. -
Try it like this. You should always make sure you have a document type defined because it will affect the rendering of css, etc... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <style> .SmallButton { padding:0px; width:14px; height:14px; } .SmallButton span { font-size:9px; line-height:10px; position:relative; top:-2px; left:-3px; } </style> </head> <body> <button type="submit" name="btnWrite" value="+" class="SmallButton"> <span>+</span> </button> </body> </html>
-
Well the reason your line-height is changing when you add the paragraph tags is because the css you are using for the .section class has line-height defined. As a test try removing that and see what happens.
-
You may get better results using 2 divs as well.
-
relative positioning is less likely to overlap unless you are using negative margins or top/left/right declarations. Regardless it is inpossible for us to even begin to help without your code.
-
You will have to like vinpkl stated or alter the parsing that php does and parse based on '\n' which is what hitting the enter key in a textarea inputs. One of the nicest ways to do what you want is by using a tokenizing plugin but that is javascript.
-
Seems like you are wanting application level locking described here http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock
-
relatively advanced SQL statment help please??!! :P
JustLikeIcarus replied to alphanumetrix's topic in MySQL Help
I may be wrong but this query will only give you the max placement for each series regardless of date. This is because the ORDER BY clause isnt even used untill after the grouping is performed. Order of operations is as follows 1. FROM clause 2. WHERE clause 3. GROUP BY clause 4. HAVING clause 5. SELECT clause 6. ORDER BY clause So if you want date to affect the grouping it needs to be included in the group by. -
Have you tried something like INSERT INTO brands ( SELECT brand_name, count(1), 'yes' from xml WHERE brand_name NOT IN (SELECT distinct brand from brands) )