hey this button moves an item from one menu to another and it should on click also post to the database but i dont think i have it right its an update command for the database called MM_editAction
If its <%= then you dont need any quotes .. its just like typing HTML there ..
Whats a typical value of : MM_editAction
this is in the html its the button inside it thats what its told to do MM_editAction would be going into the doctor_matrix based on the values in teh table looking for the DEPTCONTACT_ID from the table and if its different or added it will do teh appropiate action!
means you are assigning a value from ASP (vbscript) ..
what would this typically look like ..?
Is it a seperate event ..?
Right now you are doing ..
onClick="MoveOption(this.form.DEPT_ID, this.form.CURRENTDEPT_ID)<%=MM_editAction%>"
so it is calling the Javascript function MoveOption with the values DEPT_ID and CURRENTDEPT_ID ..
Is MM_editAction additional Javascript or something else ..?
Does MoveOptions contain 3 values?? Can you post that script or at least the function start?
got down to manage attachments .. click that and upload the page/s ... submit and it will be there for me to download .. you can always goto your User CP and manage attachments and delete the attachements .
Is after the MoveOption script called, do you want it to redirect to another page ..?? If so you would put that in the MoveOption javascript function and use Location.Href = MM_editAction; after the script has done its work ..
This whole thing really needs a rewrite iMO but anyways .. :-)
VB Code:
<script>
<!--
function MoveOption(objSourceElement, objTargetElement)
{
var aryTempSourceOptions = new Array();
var x = 0;
//looping through source element to find selected options
for (var i = 0; i < objSourceElement.length; i++) {
another simple example of making somethings better would be ..
Put Most of it in Subs and Functions ..
seperate all HTML from ASP .. ASP first then write out the HTML using Varibles ..
or at least make the variables first instead of putting database values right into the HTML ..
Get rid of all the Open and Closes .. eg .. dont need ..
%>
<%
Slows the script down ..
I dont see any kind of error checking in there also .. Seperate different types of procedures into their own include files .. eg. The Upload code could go in something like modUpload.asp ... a class would be nice but even if the basics are covered it would be alot easier to maintain and work with .. even so .. i see alot of errors .. which may not bring up errors but will definately slow the script down very very much ..
Basically the whole thing needs a revamp .. ;-)
Also instead of all those Dim Statements ..
VB Code:
'*** Pure ASP File Upload 2.1.7
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload")) <> "") Then
another simple example of making somethings better would be ..
Put Most of it in Subs and Functions ..
seperate all HTML from ASP .. ASP first then write out the HTML using Varibles ..
or at least make the variables first instead of putting database values right into the HTML ..
Get rid of all the Open and Closes .. eg .. dont need ..
%>
<%
Slows the script down ..
I dont see any kind of error checking in there also .. Seperate different types of procedures into their own include files .. eg. The Upload code could go in something like modUpload.asp ... a class would be nice but even if the basics are covered it would be alot easier to maintain and work with .. even so .. i see alot of errors .. which may not bring up errors but will definately slow the script down very very much ..
Basically the whole thing needs a revamp .. ;-)
Also instead of all those Dim Statements ..
VB Code:
'*** Pure ASP File Upload 2.1.7
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload")) <> "") Then
when u say total revamp what do u mean i'm totally new to this i need all the help i can get the code u posted whats it for like does it replace something let me know i really really appreciate all this help man