Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript mess, help for jquery-(PHP/jQuery) Desktop app
    primarykey
    data
    text
    <p>First of all, im new here, and im (not) a pro ;) (but i want to... lol). Okay, im starting a little php application to manage my icons (huge) collection... but i realise that i wrote everything in javascript (no jQuery) and my life would by a little more easier if i use jQuery... So now im trying to understand how to do that i i'll need your hints and your patience to help me... (if someday your make a trip in montreal, i'll pay you a coffee :))</p> <p>So i'll explain my template structure... (see the screenshot---EDIT: new user, not allowed to post images)</p> <p>((Image explanation))<br> Left: Div ID=nav its all folder and sub-folder.<br> A button Create library calling mkdir() JS function</p> <p>|-IconShock (X) &lt;--to delete folder<br> |---Vista collection (X)<br> |-New folder 1 (X) </p> <p>At the right: Div ID=container...<br> Contain icons like in windows explorer, showing icon image, onclick on an icon = show_info(url, height, width, size, etc..), update the bottom div id=show_info that show some information on the icon.</p> <p>Just take a look at the JS, you'll that i need jquery XD (i already started basic js to jquery)</p> <p>CODE</p> <pre><code>//When adding a folder (Create Library), deleting folder, etc... function refresh_nav() { $.ajax({ type: 'GET', url: './nav.php', timeout: 10000, success: function(data) { $("#nav").html(data); folder_selected(folder); } }); } //When deleting file, changing folder or view //filter_display = thumb or details function refresh_container(fd, filter_display) { folder = fd; filter_display = filter_display; $.ajax({ type: 'GET', url: './container.php?path='+fd+'&amp;filter_display='+filter_display, success: function(data) { $("#container").html(data); } }); } //When clicking "Create library" form NAV function mkdir() { var dir = prompt("New folder's name", 'New folder'); $.ajax({ type: 'GET', url: './action.php?action=mkdir&amp;file='+dir, timeout: 10000, success: function(data) { refresh_nav(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { //? } }); } //delete a directory from NAV function deldir(dir) { var answer = confirm('You\'re about to delete '+dir+' and all files inside.'); if (answer){ $.ajax({ type: 'GET', url: 'action.php?action=delete_dir&amp;file='+dir, success: function() { refresh_nav(); } }); } } //When click Edit menu, Convert //show_icons is a form that have all div inside containing icon images, and a invisible checkbox //if an icon (we function convert(file) { if(file) { var c_value= ""; var f_value= ""; var count = ""; // For each checkbox for (var i=0; i &lt; document.show_icons.file_check.length; i++) { //If its selected if (show_icons.elements[i].checked) { //Put path in variable and add a spliter c_value = c_value + document.show_icons.file_check[i].value + "|"; //Increase counter count++; } } for (var i=0; i &lt; document.show_folders.folder_check.length; i++) { //If its selected if (show_folders.elements[i].checked) { //Put path in variable and add a spliter f_value = f_value + document.show_folders.folder_check[i].value + "|"; //Increase counter count++; } } //If no files checked if(c_value.length == 0) { //If no folder is checked if(f_value.length == 0) { //Single file convertion newmodal('execConvert/?act=convert&amp;file='+file, 'Convert', 500, 400); } } else { //Else multiple file selected var file = c_value; newmodal('execConvert/?act=convert&amp;multi_file=1&amp;file='+c_value, 'Convert', 500, 400); } } else { alert('No selected item'); } } &lt;body onLoad="refresh_nav(); refresh_container('', '&lt;?=$default_container_display?&gt;'); get_info_erease();"&gt; </code></pre> <p>I dont know if im understandable (?) but if not ill be more precise. I just want to know if there is any way i can get every JS above in jQuery. Because its a mess trying to figure everything with want im doing right now without jquery. Or more simple code... for now, i have a little piece of code in a nav.php file, another code in container.php (showing icons) a func_php file, a core.js file.. its really hard to understand and code i these situation.. lol</p> <p>if someone here have tutorials for creating php application with jQuery cause i really need to know jquery..</p> <p>Thanks for reading me guys! ( :) and girls )</p> <p>And please say me its not a too big mess XD</p> <p>Have a nice evening!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload