Search Results

Search found 369 results on 15 pages for 'om nom nom'.

Page 4/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jquery question

    - by OM The Eternity
    I am using the Jquery library to copy the text enter in one textfield to another textfield using a check box when clicked.. which is as follows <html> <head> <script src="js/jquery.js" ></script> </head> <body> <form> <input type="text" name="startdate" id="startdate" value=""/> <input type="text" name="enddate" id="enddate" value=""/> <input type="checkbox" name="checker" id="checker" /> </form> <script> $(document).ready(function(){ $("input#checker").bind("click",function(o){ if($("input#checker:checked").length){ $("#enddate").val($("#startdate").val()); }else{ $("#enddate").val(""); } }); } ); </script> </body> </html> now here i want the check box to be selected by default, so that the data entered in start date get copied automatically as check box is checked by default... so what event should be called here in jquery script? please help me in resolving this issue...

    Read the article

  • need to upload multiple files each with different parameters

    - by OM The Eternity
    I have a form in which there are total eight fields, name, address, age and 5 other file/photo upload fields such that at a time one upload field is visible.. Now here every time I upload a file i need to fill the "name, address and age" as well. at this point I dont want to submit the form, but I just want to save these values in any variable and get back to same form with information of previous file ready to be submitted, now again user can upload new file with new values in... and so on... as user is done with the 5 files he should not be allowed to upload more but he should be allowed to submit all the 5 files to DB along with there supporting fields.. How should I proceed further ...?

    Read the article

  • I need to copy only selected files and folders in PHP

    - by OM The Eternity
    I am using the following code, in which initially i am taking the difference of two folder structure and then the out put needs to be copied to other folder. here is the code below.. $source = '/var/www/html/copy1'; $mirror = '/var/www/html/copy2'; function scan_dir_recursive($dir, $rel = null) { $all_paths = array(); $new_paths = scandir($dir); foreach ($new_paths as $path) { if ($path == '.' || $path == '..') { continue; } if ($rel === null) { $path_with_rel = $path; } else { $path_with_rel = $rel . DIRECTORY_SEPARATOR . $path; } $full_path = $dir . DIRECTORY_SEPARATOR . $path; $all_paths[] = $path_with_rel; if (is_dir($full_path)) { $all_paths = array_merge( $all_paths, scan_dir_recursive($full_path, $path_with_rel) ); } } return $all_paths; } $diff_paths = array_diff( scan_dir_recursive($mirror), scan_dir_recursive($source) ); /*$diff_path = array_diff($mirror,$original);*/ echo "<pre>Difference ";print_r($diff_paths); foreach($diff_paths as $path) { echo $source1 = "var/www/html/copy2/".$path; echo "<br>"; $des = "var/www/html/copy1/".$path; copy_recursive_dirs($source1, $des); } function copy_recursive_dirs($dirsource, $dirdest) { $dir_handle=opendir($dirsource); mkdir($dirdest,0777); while(false!==($file=readdir($dir_handle))) {/*echo "<pre>"; print_r($file);*/ if($file!="." && $file!="..") { if(is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { //Copy the file at the same level in the destination folder copy_recursive_dirs($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$file); } else{ //Copy the dir at the same lavel in the destination folder copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$file); } } } closedir($dir_handle); return true; } Whenever I execute the script I get the difference output but do not get the other copy on second folder as per code... Pls help me in rectifying...

    Read the article

  • What is the use of mysql_rollback() function in PHP?

    - by OM The Eternity
    What is the use of mysql_rollback() function in PHP? How is it used? please explain me with some example, PS: Please Do not give me link to the php.net or, mysql site, I dont need AUTHOR language to understand it, I need the Developer way to understand... I hope u understand... Thanks in advance. UPDATE if i have Updated something in a tanle can i Reset the previous value using this function?

    Read the article

  • How can i Rollback for files/folders corresponding to the changes done?

    - by OM The Eternity
    I am using PHP and Mysql I have PHP script in which I rollback all the data in the database such data all the old value be reset to the database if update is done, and all new value gets deleted if new insert has been done. Now my goal is to perform the same process with files/folders associated with the changes done, I am not able to create an idea for doing the rollback job with the files/folders associated with the Changes.. So can anyone of u help me or direct me to get the best idea?????

    Read the article

  • Recursive function for copy of multilevel folder is not working.

    - by OM The Eternity
    Recursive function for copy of multilevel folder is not working. I have a code to copy all the mulitilevel folder to new folder. But in between I feel there is problem of proper path recognition, see the code below.. <?php $source = '/var/www/html/pranav_test'; $destination = '/var/www/html/parth'; copy_recursive_dirs($source, $destination); function copy_recursive_dirs($dirsource, $dirdest) { // recursive function to copy // all subdirectories and contents: if(is_dir($dirsource)) { $dir_handle=opendir($dirsource); } if(!is_dir($dirdest)) { mkdir($dirdest, 0777); } while($file=readdir($dir_handle)) {/*echo "<pre>"; print_r($file);*/ if($file!="." && $file!="..") { if(!is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file); } else{ copy_recursive_dirs($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest); } } } closedir($dir_handle); return true; } ?> from the above code the if loop has a copy function as per requirement, but the path applied for destination here is not proper, I have tried with basename function as well.. but it didnt got the expected result.. below is the if loop i am talking about with comment describing the output... if(!is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { $basefile = basename($dirsource.DIRECTORY_SEPARATOR.$file);//it gives the file name echo "Pranav<br>".$dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file;//it outputs for example "/var/www/html/parth//var/www/html/pranav_test/media/system/js/caption.js" which is not correct.. copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file); } as shown above the i cannot get the files and folders copied to expected path.. please guide me to place proper path in the function....

    Read the article

  • My Pop window displays Horizontal scroller, how to remove it?

    - by OM The Eternity
    My Pop window displays Horizontal scroller, how to remove it? I am using Mozilla 3.6.3, PHP in Windows, I have an anchor tag with href as given below: <a href="javascript:popupWindow('http://example/english/images/buttons/button_invoice.gif"></a> but when I click on this link my pop window is displayed with a horizontal scrollbar.. so help me to remove this horizontal scroll bar...

    Read the article

  • javascript error of unterminated string

    - by OM The Eternity
    I want pass a parameter of javascript functiona which is a string. This javascript function is a hintbox on mousehover.. and the string i am using is like this: Hemmed Finish: Every side/edge (1/2" to 2") of the banner are folded and glued (special vinyl solution) or heat pressed. This is the most common and best finish option. Stitched Finish: Every side/edge (1" to 2") of the banner are folded in the back and stitched/sewed with white thread. This is not a common option as thread can be seen on the banner. Now in the hintbox on mousehover the above given text has to be display as it is displayed above along with the paragraph break.. But when i pass the above as parameter in that function along with appending some backslashes to recognise some punctuation, iots till gives me javascript error of unterminated string... I am doing this: onMouseover="showhint('Hemmed Finish\: Every side/edge \(1/2\'\' to 2\'\'\) of the banner are folded and glued \(special vinyl solution\) or heat pressed. This is the most common and best finish option.Stitched Finish\: Every side/edge \(1\'\' to 2\'\'\) of the banner are folded in the back and stitched/sewed with white thread. This is not a common option as thread can be seen on the banner', this, event, '250px')" pls could u help me in rectifying the issue...

    Read the article

  • How to display records below form on submission in php without the use of database?

    - by OM The Eternity
    I have a form with multiple fields in it along with a image input field, just below the form i have a list to be displayed on every submit of this form... this has to be done without the use of DB.. I think this can be achieved by using session but its not working with me, as evrytime page gets refreshed and session gets recreated/reset.. Please help me in resolving this issue

    Read the article

  • How to display records below form on submission in php without the use of database?

    - by OM The Eternity
    How to make the use of hidden variables as array for consecutive submission of data so that they can be used to display the records list. I have a form with 4 text fields and a file upload field.. as i submit he form it should get appended to the list which needs to be displayed below the form, such that these values are NOT stored in the DB.. So in this case how can i use the post array to collect the data and display in the list below?

    Read the article

  • get me the latest Change from Select Query in below given condition

    - by OM The Eternity
    I have a Table structure as id, trackid, table_name, operation, oldvalue, newvalue, field, changedonetime Now if I have 3 rows for the same "trackid" same "field", then how can i select the latest out of the three? i.e. for e.g.: id = 100 trackid = 152 table_name = jos_menu operation= UPDATE oldvalue = IPL newvalue = IPLcccc field = name live = 0 changedonetime = 2010-04-30 17:54:39 and id = 101 trackid = 152 table_name = jos_menu operation= UPDATE oldvalue = IPLcccc newvalue = IPL2222 field = name live = 0 changedonetime = 2010-04-30 18:54:39 As u can see above the secind entry is the latest change, Now what query I should use to get the only one and Latest row out of many such rows... $distupdqry = "select DISTINCT trackid,table_name from jos_audittrail where live = 0 AND operation = 'UPDATE'"; $disupdsel = mysql_query($distupdqry); $t_ids = array(); $t_table = array(); while($row3 = mysql_fetch_array($disupdsel)) { $t_ids[] = $row3['trackid']; $t_table[] = $row3['table_name']; //$t_table[] = $row3['table_name']; } //echo "<pre>";print_r($t_table);echo "<pre>"; //exit; for($n=0;$n<count($t_ids);$n++) { $qupd = "SELECT * FROM jos_audittrail WHERE operation = 'UPDATE' AND trackid=$t_ids[$n] order by changedone DESC "; $seletupdaudit = mysql_query($qupd); $row4 = array(); $audit3 = array(); while($row4 = mysql_fetch_array($seletupdaudit)) { $audit3[] = $row4; } $updatefield = ''; for($j=0;$j<count($audit3);$j++) { if($j == 0) { if($audit3[$j]['operation'] == "UPDATE") { //$insqry .= $audit2[$i]['operation']." "; //echo "<br>"; $updatefield .= "UPDATE `".$audit3[$j]['table_name']."` SET "; } } if($audit3[$j]['operation'] == "UPDATE") { $updatefield .= $audit3[$j]['field']." = '".$audit3[$j]['newvalue']."', "; } } /*echo "<pre>"; print_r($audit3); exit;*/ $primarykey = "SHOW INDEXES FROM `".$t_table[$n]."` WHERE Key_name = 'PRIMARY'"; $prime = mysql_query($primarykey); $pkey = mysql_fetch_array($prime); $updatefield .= "]"; echo $updatefield = str_replace(", ]"," WHERE ".$pkey['Column_name']." = '".$t_ids[$n]."'",$updatefield); } In the above code I am fetching ou the distinct IDs in which update operation has been done, and then accordingly query is fired to get all the changes done on different fields of the selected distinct ids... Here I am creating the Update query by fetching the records from the initially described table which is here mentioned as audittrail table... Therefore I need the last made change in the field so that only latest change can be selected in the select queries i have used... please go through the code.. and see how can i make the required change i need finally..

    Read the article

  • Mulitple variable containing "for loop" is not working in my code...

    - by OM The Eternity
    Below is the code I am working with and the last for loop i am iterating is not working... I think i am doing something wrong using multiple variable in a for loop,also I m aware of the fact that it can be done. $updaterbk = "SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrail j2 ON ( j1.trackid != j2.trackid AND j1.field != j2.field AND j1.changedone < j2.changedone ) WHERE j1.operation = 'UPDATE' AND j2.id IS NULL "; $selectupdrbk = mysql_query($updaterbk); while($row1 = mysql_fetch_array($selectupdrbk)) { $updrbk[] = $row1; } foreach($updrbk as $upfield) { if(!in_array($upfield['field'],$exist)) { $exist[] = $upfield['field']; $existval[] = $upfield['oldvalue']; //echo $updqueryrbk = "UPDATE `".$upfield['table_name']."` SET "; } } print_r($existval); for($i=0;$j=0;$i<count($exist);$j<count($existval);$i++;$j++) { $updqueryrbk.= $exist[$i]['field']."=".$existval[$j]['oldvalue'].","; $updqueryrbk.="="; $updqueryrbk.= $existval[$j]['oldvalue']; $updqueryrbk.=","; }

    Read the article

  • is it correct to unset the session variable for a particular index as the vay whole session is made

    - by OM The Eternity
    is it correct to unset the session variable for a particular index as the vay whole session is made unset in PHP? I know this works: unset($_SESSION['bannersize']) But does this works ? : unset($_SESSION['bannersize'][3]) or is there any other way to unset any particular desired index of the session and then again rearrange the values inside it to remove the empty index..?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >