SEARCH YOUR SOLUTION HERE  

help with script?

We work in ASP VBScript pages.
When a check box is ticked at that moment I need to be able to have certain values selected in two drop down lists, so all of this exists at the moment and works but it has to be done manually, since it is all connected it would be good if it had the values selected when the check box was ticked.

I populate values for drop down lists in the following way,select the ID but display the description.

Nature of Problem






What I was thinking of doing and I can't seem to execute that is to create OnClick() function and assign it to the check box so when it gets checked it selects these values.

Function onchange(){

window.thisForm.option1.value = 'whatever';
window.thisForm.option2.value = 'whatever';
}

So I don't know if this would work and if it would do I assign the number that represents the ID of the value i want to see selected on click.For example if i want to see "blah" selected and blah has an ID of 10 would I do it
"window.thisForm.option1.value = '10'

Could somebody advise me on this please

Posted On: Friday 26th of October 2012 04:44:29 AM Total Views:  296
View Complete with Replies




Related Messages:

Need help wth a loop??   (237 Views)
lo , Can someone help me out with adding a do while not eof loop or somethng similar to this bit of code below please, it works but only if there is one record if more than one obviously it leaves the second in the database! Code: Set Con = Server.CreateObject("ADODB.Connection") Con.Open "****-storeDB" Set RS = Server.CreateObject("ADODB.Recordset") sqlString = "SELECT * FROM cart WHERE trans_id = '" & trans_id & "';" RS.ActiveConnection = Con RS.locktype = adlockOptimistic RS.Open sqlString RS.Delete RS.Update RS.Close
Please help   (274 Views)
hi i m declare one variable and it hold the name of a person eg: strName = "Arvind Singh" and i want to put first four character in an other variable please tell me the way to do this
Global.asa/Session/App/Variables help pls..   (264 Views)
Hi all... I'm trying to add a "user-verifacation" thingy to my site. my problem is using/accessing session variables. all the tutorials say that the global.asa should only have the script tags ( & ) and inside the script itself only have the application/session onstart/end. I've created this global.asa file and put it in my site-root folder: Code: function Session_OnStart() { Session("LoggedIn") = "NO" } but i can't access the session variable Session("LoggedIn")... from any page. what am i doing worng
help with 0x800A0046 error - URGENT PLEASE   (417 Views)
Hi i'm doing an asp page and when i do Set BaanObj = CreateObject("Baan4.Application") i get 0x800A0046 permission denied error my IUSR account has the following priviledges: modify, read and execute,read, write and list the content of all folders... so what can be the problem please help me...i'm desperating best regards and
Global.asa file help   (235 Views)
I am in much need of some help with my global.asa file. I use ASP and mySQL. In a nutshell, When a registered user logs in, a field in I have a field that gets updated in my DB Table. It is a TINYINT. When they log in, it updates the value to 1, when they log out, it updates it to 0. I use a tiny iFrame to create a loop displaying users with the value of 1. Basically a cheasy "Who's Online" function. How ever I am now trying to create a global.asa file to say when the session times out, I want the global file to just update the value back to 0. I am also attempting it so that if the users browser window closes and then gets reopened PRIOR to the timeout limit, It knows they are still logged in. I can provide my script if anyone thinks they can help. !!!!!!!!!!!!!!!!!!! I think my final thought would be that when the user closes their browser, that the session ends and the DB field gets updated from a 1 to a 0. Thank you!!!!!!!!!!!!!! A newbie
CDO.Message.1 error '80040212' , on windows 2003 Please help   (532 Views)
Hi , I am getting this CDO error CDO.Message.1error '80040212' The transport lost its connection to the server. This error is only sometimes times. After doing all the trail & error to duplicate the error , I found out that I am getting this error when the email size is more than 5KB. Here is my code Code: Dim objNewMail Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration") set objNewMail = Server.CreateObject("CDO.Message") objCDOSYSCon.Fields( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = "My.IP.ADDR" 'objCDOSYSCon.Fields( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = 25 objCDOSYSCon.Fields( "http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 2 objCDOSYSCon.Fields( "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" ) = 60 objCDOSYSCon.Fields.Update 'Update the CDOSYS Configuration Set objNewMail.Configuration = objCDOSYSCon objNewMail.From = fromemail objNewMail.To = toemail objNewMail.Bcc = bccemail objNewMail.Subject = subject objNewMail.HTMLBody=emlhead&emlbdy &emlfooter objNewMail.Send Set objNewMail = Nothing I even changed the SMTP Properties --> Message Size to 2048 kb, but I dont understand why this error is coming. Is there any other settings I have change, And also if I use objNewMail.CreateMHTMLBody "bodyfile.asp" this wroks no matter how big the email size is. Please somebody help.
Digits help when calculating...   (289 Views)
Hi all, I have the problem when I calculate a Digits for example: 101.12 * 1.21 the resilt is 122.3552 This one should be 122.36 and if it is 122.3549 to be 122.35 How can I make this thing works....
validation help   (377 Views)
hi, i have a textbox that has a value $6.00 for example the user has to enter a dollar value which has to be less then $6.00 so for example if the user enters 4.00 an alert should be fired telling him he has forgotten his dollar sign ("$") then when he enters it properly like this $5.00 i have to check the value is less then $6.00 and it has to be done in javascript the textbox which holds the $6.00 value is called saleprice the textbox which holds the $5.00 or value less then $6.00 is called userprice can anyone help me in this
help   (205 Views)
hello, beginner here. Anybody knowing where i am going wrong just get the error message: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. Code:
sql problem, help!!   (330 Views)
I have a table with one column having values stored as a string. example column : subjectCode values : A4, TM4, ASE4, TMA4 I have a page where the user can select one subjectCode by a radiobutton. I then want to display all the records that are associated with that subjectCode. I can't seem to use the LIKE clause because some records in the table may only have one subjectCode where others have a string of values like in the example above. Say for example I want to display all projects that are associated subjectCode "TMA4" it only displays records that start with TMA4 and not the one above, but if I search for records that have any occurence of the subjectCode then when I search for all records that are associated with A4 then I also get records with TMA4 because this has "A4" at the end. any ideas please cheers Brad
ASP Javascript help urgent   (392 Views)
i am getting real frustrated with this issue i have a window open event so when the user clicks on the words he sees a window with a image what i am trying to do is put our company logo at the bottom of the window and its not letting me do it here is the code for it Code: View Large Image so when the user clicks on the View large image he sees this page and the code is like this Code: so where i have put the line Hi for debugging i wanted the company logo to be there but its not displaying the logo so i put a response.write and its not working can anyone tell me how i do it
Asp/Sql code help   (438 Views)
hello again, i started this thread last week but wasn't able to finish. i am trying to do a simple sql statement in asp (dreamweaver) and due to my in experience in coding i am having lots of trouble but below i am gonig to post the code and if anyone could be so kind as to lend a hand i would be much appreciated..
need help with Asp Mail !!   (478 Views)
I am trying to send an email by using asp in the following way: I get the error in: RCEmail.To= request("Email") The error is Microsoft VBScript compilation (0x800A0408) Invalid character /RegisterConfirmation.asp, line 72, column 21 RCEmail.To= "&Email&" --------------------^ Can anyone help me.
SQL statement help   (279 Views)
I am getting Syntax error saying Missing operator in query expression... Can someone check this out for me
fetch data using sql statement...help!!!   (450 Views)
i have 2 tables. Products and Quotation. 1st, i fetch prodNumber (value for prodName) and prodName (for display in combo box) into a combo box. then user is able to select any prodName listed in the combo and save it into Quotation after complete insert the description and price. the prob is, only prodNumber go to Quotation, the prodName is failed. how to solve that here is my code Code: ' save data into Quotation Dim sqlCheck, rsCheck, sqlFetch, rsFetch, tmpProdName If Request.Form("Submit") = "Save" Then resID = Request.Form("resID") category = Request.Form("cmbProdNumber") description1 = Request.Form("description1") price = Request.Form("price") 'check existing prodNumber in the Quotation sqlCheck = "select * from Quotation where prodNumber = " & category & " And resID = " & resID Set rsCheck = Server.CreateObject("ADODB.Recordset") rsCheck.Open sqlCheck, dbcon 'try to fetch prodName from Products that match with category sqlFetch = "select prodName from Products where prodNumber = " & category Set rsFetch = Server.CreateObject("ADODB.Recordset") rsFetch.Open sqlFetch, dbcon If rsCheck.EOF = True And rsFetch.EOF = True Then tmpProdName = rsFetch("prodName") sql2 = "INSERT INTO Quotation (resID, prodNumber, prodName, description, price) " & _ "VALUES ("&resID&", "&category&", '"&tmpProdName&"', '"&description1&"', '"&price&"')" dbcon.Execute(sql2) Response.Redirect("quotation_admin.aspid="&resID) Else Session("error") = True End If End If ' below is the code that i used to put all all products in the combo box
Noob needs urgent help   (520 Views)
Hi all, I have to write an ASP page that does the following : Gets several fields of data through the url, processes them using a javascript function, and then send it back to another page, again using the url for the data. for example : I get something like www.mydomain.com/test/test.aspnum1=3&num2=4 , then I have to process these numbers and send a reply like www.theirdomain.com/theirasp.aspreply=x Here is what I already (think) I know, and correct me if I am wrong. 1. I can use Request.QueryString to get the values of the fields in the url. 2. I am using javascript to process the two by calling a function. What I don't know (and I know this is funny, cause it's probably the easiest part) is how to send the data, where sending is actually requesting a page with the result url. Please help.
Might be posting in the wrong forum but i need help!   (490 Views)
I need to either write or buy a program that will let me Track each user. By this i mean I want to know when the logged on, how long they where on, and what PAGES they visited. Can anyone help me Clayton
I need DB help badly   (428 Views)
I posted this question in the IIS forum, but it may go here better. http://forums.aspfree.com/t53055/s.html
how to omit row in a table help?   (347 Views)
do while not rs.EOF if nCount Mod 2 = 0 then szColour = " bgcolor=whitesmoke" else szColour = " bgcolor=white" end if nCount = nCount + 1 Response.Write("" & rs("FieldDisplayName") & _ "") Response.Write("") szColour = szColour & " align=middle" if rsData.EOF = false and rsData.BOF = false then do while not rsData.EOF if IsNull(rsData(CStr(rs("FieldName")))) = true then Response.Write("-") else select case rs("FieldName") case "AcadiaFurnishingName" if CInt(rsData("RemovalistNumber")) = 1 then if ISNULL(rsData(CStr(rs("FieldName")))) = false then Response.Write("" & CStr(rsData(CStr(rs("FieldName")))) & _ "") else Response.Write("-") end if end if case "NumberOfRooms" if CInt(rsData("RemovalistNumber")) = 1 then if ISNULL(rsData(CStr(rs("FieldName")))) = false then Response.Write("" & FormatNumber(rsData(CStr(rs("FieldName"))), 0, true) & _ "") else Response.Write("-") end if end if case "BenefitID" Response.Write("" & rsData("ExpType") & _ "") case "SupplierID" if rsData("ShowSupplierName") 0 then Response.Write("" & rsData("SupplierName") & "") else Response.Write("-") end if case "ManagerID" Response.Write("" & rsData("FullName") & _ "") case "Comments" if len(rsData("FixedComments")) > 50 then Response.Write("") else Response.Write("") end if Response.Write(rsData("FixedComments")) Response.Write("") case else select case rsData(CStr(rs("FieldName"))).Type case 135 Response.Write("" & FormatDateTime(rsData(Cstr(rs("FieldName"))), vbShortDate) & "") case 11 if rsData(CStr(rs("FieldName"))) = 0 then Response.Write("-") else Response.Write("Yes") end if case 131 Response.Write("" & FormatNumber(rsData(CStr(rs("FieldName"))), 2, true) & _ "") case else Response.Write("" & rsData(CStr(rs("FieldName"))) & _ "") end select end select end if select case rs("FieldName") case "AcadiaFurnishingName", "NumberOfRooms" if CInt(rsData("RemovalistNumber")) = 1 then Response.Write("") end if case else Response.Write("") end select rsData.MoveNext loop end if rsData.MoveFirst Response.Write("") rs.MoveNext Hi , this is one of the web pages,I hope I have given enough code for somebody to help me. So the idea is that we have check boxes in our system, if a particular check box is selected then the Supplier Name is displayed and if not it displays a "-", and that works fine,but I need to not only make this work in a way that it doesn't display the name if value is zero,but to hide the entire row if the value is zero and then display the row if the value is not zero. I haven't been able to work out how to do that,all of my attempts mess up the whole thing, so I was hoping that somebody could help me. Response.Write("" & rs("FieldDisplayName") & _ "") FieldDisplayName represents the heading,it is bold and in the next column it is the value against that heading, but how to omit the entire row I don't know.
Newbie help   (294 Views)
I have the following code: -