Jump to content

nycforever

New Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About nycforever

  • Rank
    Newbie
  1. Appreciate your feedback. If anyone is able to assist with the actual code by showing an example, I would appreciate it. Thanks.
  2. Hi all I apologize for any confusion- the main gist is the same - maybe my use of check box and select box cause the confusion. Current scenario: drop down, choose one option Goal scenario: many options, choose multiple -- using check boxes. If anyone is able to assist with the actual code by showing an example, I would appreciate it. Thanks.
  3. So the main gist of what i need (and am having difficulty with ) is -- changing the drop down to be a select box which allows use to select as many options as they would like. Thanks so much. Appreciate it.
  4. I forgot to answer your question- yes, I do have experience with css, javascript, jquery, html5, Cold Fusion and basic PHP. I am not a super duper guru in any of them.
  5. I agree with you 100%. I did speak with him this morning and told him (he hadn't looked at the code) that the files each had from 600-1200+ lines of code each and that me making changes could possibly open a whole can of worms. I am not too proud to say that I don't know and cannot do something, but i'm happy to learn. I told him that I would be happy to sit with a PHP expert who can walk me through the changes and I can take it from there. I did develop 2 basic applications right after I took the PHP classes 2 years ago and those applications, because I used the tools and basics - have been working well as they are both in production and being used by our company Executives (proud moment, more boosting) lol I am thankful for your reply, however, I may need to search a bit more to see if I can at least make an attempt. The chunks of code I provided were from 3 diff files and I provided them because they were called from the initial file, etc. PS there is NO documentation in their files - and there are also NO includes at the tops of the pages-- my understanding was always to have an "include" at the top- but here they have NONE, so if file1.php was calling a function on file2.js, the only way for me to find the function was to search all of the files in directory until I came across the function in file2.js--- very bizarre -- is this the norm with PHP? Thanks again- your honesty is so much appreciated.
  6. Hi Beginner with PHP, I am making some changes to an application that was written by someone else. Very little documentation at all, so I'm navigating the code. The portion that I need help with is this - we are currently using a drop down where they choose one option. We need to change it to be checkboxes where they can select as many options as they'd like. I'm sharing the 3 main functions that are related to the task at hand. These functions were spread out over 3 different files, each having 1,000+ lines of code. So I'm a bit overwhelmed to say the least. Thanks so much in advance for your assistance. Will be checking back frequently in case I have left anything out in order to get help. You guys rock! Thank you function rrComponentFields($pre, $component, $loc){ global $locationObj; $dbType = utilities::getDBtype($pre); $outStr = "<select class='input-box' name='{$pre}Conponent' id='{$pre}Conponent' onchange='getConponentDetails(\"$pre\");>"; $gct = $locationObj->getCleanableTargetsByType($pre, $component, $loc); for( $i=0; $i<count($gct); $i++ ){ $row = $gct[$i]; $isSelected = ""; if( $row["SELECTED"] == true ){ $isSelected = "selected=\"selected\""; } $outStr .= "<option value=\"$row[CTID]\" $isSelected> $row[FULLNAME] </option>"; } $outStr .= "</select><input type='checkbox' name='allConponents' value='allConponents' id='{$pre}AllConponents' /> Apply to all conponents <br/>"; return $outStr; } function getConponentDetails(pre){ /*switch(pre){ case "pl": case "i": //url = "getInterlockingInfo.php"; url = "getStationInfoNoConponent.php"; break; case "l": default: url = "getStationInfo.php"; break; } */ var param = document.getElementById( pre+'Conponent' ).value; var eventId = window.eventId; if(window.XMLHttpRequest){ // If IE7, Mozilla, Safari, etc: Use native object var client = new XMLHttpRequest(); }else{ if(window.ActiveXObject){ // ...otherwise, use the ActiveX control for IE5.x and IE6 var client = new ActiveXObject("Microsoft.XMLHTTP"); } } //getEmployees(pre); client.onreadystatechange = function() {conponentDetailhandler(pre, client)}; client.open("GET", "getStationInfo.php" + "?param=" + param + "&eventId=" + eventId); client.send(""); } //getData() function conponentDetailhandler(pre, obj) { console.log( "Pre = ", pre ); var status = document.getElementById(pre+'Status'); var comments = document.getElementById(pre+'History'); var forman = document.getElementById(pre+'Forman'); var pass = document.getElementById(pre+'PassNum'); //var bags = document.getElementById(pre+'NumBags'); var gangButton = document.getElementById('gangEnterUpdate'); var downloadFile = document.getElementById(pre+'DownloadFile'); downloadFile.options.length = 0; if(obj.readyState == 4 && obj.status == 200) { var val = eval('(' + obj.responseText + ')'); for(var i = 0; i < val.length; i++) { var txtNew = document.createElement('text'); txtNew.text = val[i].STATUS; status.value = txtNew.text; txtNew.text = val[i].COMMENTS; comments.value = txtNew.text; txtNew.text = val[i].PASS; if(pass){ pass.value = txtNew.text; } var doctxt = txtNew.text; //------------------------------- //Grab all the attached documents and list in a option txtNew.text = val[i].SUPPORTDOCS; var doctxt = txtNew.text; var docArray = new Array(); if(doctxt && doctxt.length > 0){ docArray = doctxt.split(","); } for(var x = 0; x < docArray.length; x++) { var opt = docArray[x]; var el = document.createElement("option"); el.innerHTML = opt; el.value = opt; downloadFile.appendChild(el); }
×
×
  • 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.