Jump to content


  • Posts

  • Joined

  • Last visited

kastellu's Achievements


Newbie (1/7)



  1. Hello,I have one question. How I could create a page with objects (for example pictures) and when a user (that was registered and at the moment he is loged in) would click and look at the picture , his session or id of that user and id of selected picture would be inserted into table. So at that moment i would get information who was looking at that picture.Any examples?Best regards,K
  2. So nobady doesn't know how to read a value of select list or drop down box?K
  3. Hello,Firstly, thanks for your replay. No that is not it! I am working in some report software, that is java coded. All objects are just drag and drop, with that i mean that you only grag a selectbox in to report and set some properties, and it works. But the only way you can customize your reports is with some HTML item , where you can write in a javascript that can corespond to that report.. The problem is that i get the values in to some selectbox (i get only need value that is prefiltered from some other object) , but since i wouldn't like to see the result in a selectbox i would like to hide that selectbox(visibility it is a propertie of this object) object and its value send to text item or tag if you like it (that tag has a object name as well). So what i am trying to do is to put that HTML object where that script would be written - select value from hidden selectbox(SELECTBOXVALUE - name) and writte it into tag object (TAGEVALUE-name) - this is only a regular tag in main page and not pop up.I hope you understand. The report software is COGNOS BI 8.2Thanks for your help!Best regards,K
  4. Hello,I don't have any clue about javascript , so that is why i am asking you about this. How to writte a script that will give me a value from listbox and it would be pasted into text item or just be a text. So ,,... , value BIKE from a listbox (name of object is LISTBOX1) as an object to ,....,BIKE in a text ite (name of a text item is TEXTITEM2).Can you please give me a full script.Thank youK
  5. Hello,At bottom you can see the code of SQL procedure that inserts the value to a table1. And the test asp page which has a form with where the value is insertet and submited. The problem is that i don t know how to send the value to an executed procedure , that is wrong and that is the reason why i get an error that the parameter for procedure is not provided. I know that i need to provide the Web value from a form at the time that the procedure is executed. Can you help me with this problem. The procedure in SQL works but when a button is submited the error ...Thanks,KASP test page <form name = "test" action = "test.asp?sub=add" method = "POST"><input type = "text" name = "ValueWEB"><input type = "submit" name ="insert" value = "enter"></form><%ValueWEB = RequestForm("ValueWEB")set cnn = server.createobject("ADODB.Connection")cnn.open "PROVIDER = SQLOLEDB; DATA SOURCE = TESTSERVER; UID = sa; PWD = test123; DATABASE =db"If ValueWEB <> "" thencnn.testprocedureend if%> testprocedure in SQL SERVER 2005 USE dbGOCREATE PROCEDURE testprocedure( @ValueWEB varchar(30))ASINSERT INTO ValueTable( Value)VALUES( @ValueWEB)
  6. Firstly i would read some tutorials and try some examples , how to write in to DB and how to read from DB, that are on w3schools , secondly i would work with simple web page that has funcionalities of updating the data from DB. I would recomend that you go trought few examples and trough tutorials so that you will understand what is all about ( conn , if , case , sql statement, cn.close, update,...)
  7. O.K. thanks !But here is another problem, how to put value , back to first one, when you click on it again!thanks
  8. Hello, Could someone help me with this one. I would like to change the order by when clicking on link.My code: <a herf = "index.asp?sort=asc">Products<%sort = request.querystring ("sort")If sort = asc then SORTBY = ascElseSORTBY = descsql ="SELECT * FROM tblExample ORDER BY '& SORTBY &';"%> Am i on a right way or did i lose it fully.Thank you
  9. Hello,How can you create a loop that will after a limited nuber of row or exported data create a new page and loop on , and again create new page,....So if you have 1000 row, i would like to limit this on to subpages to ever hundred or less rows per page. I don t eaven know is there other function in asp that creates that,..Thank you an example woul be welcome.L
  10. Hello,Let me first try to explain you what i am trying to do! I have created an page default.asp where a loop on vaules from db is made and i get a list of data.HOMESUPPORTSOFTWAREHARDWARENow i have made an querystring , so if i chose one of the values , for example SOFTWARE i will get next page:HOMESUPPORTSOFTWAREHARDWAREWindowsXPWindows2000Windows98Windows95How do i get this data. When i chose a SOFTWARE the querystring takes an value and starts if sentence If Request.QueryString (VALUE) ="Software"<!--#include file="softwarelist.asp"-->End IF... O.K. the problem comes now in softwarelist where:WindowsXPWindows2000Windows98Windows95is i have another querystring so that if i click for example WindowsXPI will get sub content(zip,rar,iso,..) . If i run software list by itself works fine, but if i run it unde default.asp i will get with get with screen only with fist values of SOFTWARE, HARDWARE,...I know that the problem is in querystringdefault.asp?value=Software works , but when you call sub querystring t he problem comes because i lose default.asp?value=Software and is changed into whatever the href of the querystring in software.asp is What i would like to see but i cant is:HOMESUPPORTSOFTWAREHARDWAREWindowsXPWindows2000Windows98Windows95ziprarisoSo how to do the querystring or set the href of every sub querystring that the data of previous and this one would be still there and i could open all sub "data" - some kind of menu , submenu , subsubmenu,...Thank you for hel i hope u understand
  11. HelloThanks for that! But a few minutes ago i just did it like this.Value = 0 Then Value ""If Value <> "" Then Run = 1...Select Case RunCase 1SQL = SELECT * FROM tblCompany WHERE Cost = " & Value & " ;"By using <> i can writte all the combinations that i want ,...Thanks
  12. Hello , let mi first try to show you what i am trying to do. date1 = Request.Form("date1")date2 = Request.Form("date2")date = Request.Form("date")value1 = Request.Form("value1")value2 = Request.Form("value2")company = Request.Form("company")If date ="" and value1 = "" and value2 = "" and company = "" and date2="" and date1 ="" Then checking = 1 End IfIf date ="1" and value1 = "" and value2 = "" and company = "" and date1 ="" And date2="" Then checking = 3 End IfIf date ="2" and value1 = "" and value2 = "" and company = "" and date1 ="" And date2="" Then checking = 4 End IfIf date ="3" and value1 = "" and value2 = "" and company = "" and date1 ="" And date2="" Then checking = 5 End IfIf date = "4" and value1 = "" and value2 = "" and company = "" and date1 ="" And date2="" Then checking = 6 End IfIf value1 = "" and value2 = "" and date1 ="" And date2="" Then checking = 7 End IfIf company = "" and value2 = "" and date1 ="" And date2="" Then checking = 8 End IfIf value1 = "" and company = "" and date1 ="" And date2="" Then checking = 9 End IfIf value2 = "" and value1 = "" and company = "" And date2="" Then checking = 10 End IfIf date1="" and value2 = "" and value1 = "" and company = "" Then checking = 11 End If...'as you can see i am trying to write all the combinations to make a search without an error. But i have a problem with writting this if statementSelect Case checking Case 1 sql = "SELECT * FROM tblcompany;" Case 2 sql = "SELECT * FROM tblcompany WHERE company_date BETWEEN "&(date1)&" AND " &(date2)&";" Case 3 sql = "SELECT * FROM tblcompany WHERE company_date BETWEEN "&fncleto(a)&" AND "&fncdanes(b)&" ;" Case 4 sql = "SELECT * FROM tblcompany WHERE company_date BETWEEN "&fncmesec(c)&" AND "&fncdanes(b)&";" Case 5 sql = "SELECT * FROM tblcompany WHERE company_date BETWEEN "&fncteden(d)&" AND "&fncdanes(b)&";" Case 6 sql = "SELECT * FROM tblcompany WHERE company_date = "&fncdanes(b)&" ;" Case 7 sql = "SELECT * FROM tblcompany WHERE company = " &company&";" Case 8 sql = "SELECT * FROM tblcompany WHERE company_value >= " &value1&";" Case 9 sql = "SELECT * FROM tblcompany WHERE company_value <= " &value2& ";" Case 10 sql = "SELECT * FROM tblcompany WHERE company_date >= "&date1&";" Case 11 sql = "SELECT * FROM tblcompany WHERE company_date <= "&date2&";" Case 12 sql = "SELECT tblcompany.company, tblcompany.company_value FROM tblcompany WHERE (((tblcompany.company)='" & company & "') AND ((tblcompany.company_value)='" & value1 & "'));" ... End Select O.K. I have a problem with writting a corect If statement, ... Why this kind of statement, i would like to writte all of the combinations of atributs so that i would never get an eror and allways an corect SELECT would be made. For example: when nothing is chouse i get he table with all the data , and so on. I eaven would like to filtet with more combinations. This will be a filter for data that i get from the DB. date is an radiobutton,... i think that you will figer it out, but this still aren t all the combinations that i wrot , this is just a part of it,...Can someon help me with this IF statementThanks
  13. kastellu


    Hello,Anyone has an colum sortable table code. I have created conection to DB an i get data in a table. But now i would like to install some JAVASCRIPT with more advance filtering by rows , sum , sorting by rows and limitation of number of rows per page. I am working with ASP. If not mabe just a code for limitation of number of rows per page with next an prewious link to go trought data. And code for sum one of the coloum with footer row where the sum is.The best would be one advanced javascript for tables. I only found the basic one. I dont have a clue about scripting in this language, so please , help me.Regards
  14. kastellu


    Thanks it works!
  15. kastellu


    Hello,Can someone help me with this code , i tried to create an filter that if a check box is checked the select case would test one sql select and if not would do the other one. I was checking what i get (response.write sqlresponse.end ) , the only result that i get was when if ch1 = "" was like this ufcourse the forum is not written in full version. What am i doing wrong , mabe someone can repair my code. Thank you response.write("<tr><td><input type='checkbox' name='ch1'></td></tr>")ch1 = Request.Form("ch1")If ch1 ="1" then test= 1 else test = 2 end ifSelect Case test Case 1 sql = "SELECT * FROM tblxx;" Case 2 sql = "SELECT * FROM tblxx WHERE O xx_date BETWEEN " & fncleto(a) & " AND " & fncdanes(b) & " ;"End Select
  • Create New...