Jump to content

Akasha

Members
  • Posts

    71
  • Joined

  • Last visited

Everything posted by Akasha

  1. Akasha

    uploading

    ok thnx it workedbut now i have the following problemI want to upload to another server (network connection)not to my own serveris there a possible way Dim uploadsDirVaruploadsDirVar = "\\Presentations\" then i get the error path doesn't exist
  2. Akasha

    Request.form

    I have found the problemMy first and second dropdown menu had the same nameso when he does the request form he will take the result from dropdown menu 1 and 2.
  3. Akasha

    Request.form

    This is the outputrename=Rename itemhcat=testhoofdcategorie=Group, hoofdcategorieen=
  4. Akasha

    Request.form

    forgot something </tr><tr> <td><div align="left"></div></td> <td colspan="2"><div align="left"></div></td></tr><tr> <td class="p-content"><input name=rename type="submit" value="Rename item"></td> <td class="p-content"><div align="right"><input type='button' onclick="window.location.href='../main.asp'" name=submit value='Cancel'></div> </td></tr></form>
  5. Akasha

    Request.form

    this is the code after the submit If Request.Form("rename") = "Rename item" Then if Request.Form("hcat") <> "" then if Request.Form("hoofdcategorie") <> "" then sql ="UPDATE Hoofdcategorieen SET hoofdcat_name = '" &Request.Form("hcat")& "' WHERE (hoofdcat_name = '"&Request.Form("hoofdcategorie")&"')" Response.Write(Sql) end if conn2.Execute(sql)end if and this is my form <form name='form' method='post' action='change_menu.asp'> <tr> <td> <select name="hoofdcategorie" onchange="changeHoofdcat()"> <option value=''>--- Select a category --- <% 'Recordset set rs2 = Server.CreateObject("ADODB.recordset") rs2.Open "SELECT * FROM Hoofdcategorieen WHERE hoofdcat_id > 1 ORDER BY hoofdcat_name ASC", conn2 'Fill variables with values Do until rs2.EOF if Request("HoofdCat") = rs2.fields("hoofdcat_name") then Response.Write("<OPTION SELECTED value='" & rs2.fields("hoofdcat_name") & "'>" & rs2.fields("hoofdcat_name") & "</option>") else Response.Write("<OPTION value='" & rs2.fields("hoofdcat_name") & "'>" & rs2.fields("hoofdcat_name") & "</option>") end if rs2.movenext Loop rs2.close %> </select> </td> <% if Request("HoofdCat") <> "" then 'Recordset set rs2 = Server.CreateObject("ADODB.recordset") rs2.Open "SELECT c.*, h.hoofdcat_id FROM hoofdcategorieen h, categorieen c WHERE h.hoofdcat_name='"&Request("HoofdCat")&"' AND h.hoofdcat_id= c.hoofdcat_id ORDER BY c.cat_name ASC", conn2,1,1 'Fill variables with values Hoofdcat = Request("HoofdCat") if rs2.RecordCount = 0 then Response.Write("<td><INPUT TYPE=""text"" NAME=""hcat"" SIZE=""20"" MAXLENGTH=""30""></td></tr>") else if request("Cat") = "" then Response.Write("<td><INPUT TYPE=""text"" NAME=""hcat"" SIZE=""20"" MAXLENGTH=""30""></td></tr>") end if Response.Write("</tr><tr><td><select name=""hoofdcategorie"" onchange=""changeCat()""><option value=''>--- Select a category ---") Do until rs2.EOF if request("Cat") = rs2.fields("cat_name") then Response.Write("<OPTION SELECTED value='" & rs2.fields("cat_name") & "'>" & rs2.fields("cat_name") & "</option>") else Response.Write("<OPTION value='" & rs2.fields("cat_name") & "'>" & rs2.fields("cat_name") & "</option>") end if rs2.movenext Loop rs2.close Response.Write("</select></td>") end if end if %><% if Request("Cat") <> "" then 'Recordset set rs2 = Server.CreateObject("ADODB.recordset") rs2.Open "SELECT s.*, c.cat_id FROM categorieen c, subcategorieen s WHERE c.cat_name='"&Request("Cat")&"' AND c.cat_id= s.cat_id ORDER BY s.subcat_name ASC", conn2,1,1 'Fill variables with values if rs2.RecordCount = 0 then Response.Write("<td><INPUT TYPE=""text"" NAME=""categorie"" SIZE=""20"" MAXLENGTH=""30""></td></tr>") else if request("SubCat") = "" then Response.Write("<td><INPUT TYPE=""text"" NAME=""categorie"" SIZE=""20"" MAXLENGTH=""30""></td></tr>") end if Response.Write("</tr><tr><td><select name=""subcategorie"" onchange=""changeSubCat()""><option value=''>--- Select a category ---") Do until rs2.EOF if request("SubCat") = rs2.fields("subcat_name") then Response.Write("<OPTION SELECTED value='" & rs2.fields("subcat_name") & "'>" & rs2.fields("subcat_name") & "</option>") else Response.Write("<OPTION value='" & rs2.fields("subcat_name") & "'>" & rs2.fields("subcat_name") & "</option>") end if rs2.movenext Loop rs2.close Response.Write("</select></td>") if request("SubCat") <> "" then Response.Write("<td><INPUT TYPE=""text"" NAME=""scat"" SIZE=""20"" MAXLENGTH=""30""></td>") end ifend ifend if%>
  6. Akasha

    Request.form

    HelloI have a button and when i push it, it must execute an sql update querythe query gets his information from a dropdown menu and a textfieldThat works all finebut somehow the &Request.Form("hoofdcategorie") functiongives back a strange result like <option>, for example i have choosen in my dropdown menu the item Groupthe query must be UPDATE Hoofdcategorieen SET hoofdcat_name = 'test' WHERE (hoofdcat_name = 'Publications') but instead he writes UPDATE Hoofdcategorieen SET hoofdcat_name = 'test' WHERE (hoofdcat_name = 'Publications, ') 'Publications, 'the red part in the queryIs there sometime wrong with my Request.Form???thnxgreetzakasha
  7. Akasha

    Dropdown menu

    Already found a solution for that
  8. Akasha

    Dropdown menu

    Hmz.. ok now he fills my second dropdownbut loses the inserted value in dropdown menu 1is there a way to keep thos values ?
  9. Hello peeps,i have this problem i can't figure out.I use ASP and have a formwith 2 dropdown menusthe first one gets filled with a querywhen someone makes a choice in the first dropdown menuthe second must contain the choices related to the first choice in dropdown menu 1Dropdown menu als needs to be filled with a query.what code needs in the function??or do you have another solution?? function changeHoofdcat(){ ?????}........<form name='form' method='post' action='links.asp'><select name="hoofdcategorie" onchange="go()"><option value=''>--- Select a category ---<% set rs2 = Server.CreateObject("ADODB.recordset") rs2.Open "SELECT * FROM Hoofdcategorieen WHERE hoofdcat_id > 1 ORDER BY hoofdcat_name ASC", conn2 'Fill variables with values Do until rs2.EOF Response.Write("<OPTION value='" & rs2.fields("hoofdcat_name") & "'>" & rs2.fields("hoofdcat_name") & "</option>") rs2.movenext Loop rs2.close%></select><br/><select name="categorie" onchange="go()"><option value=''>--- Select a category ---<% set rs2 = Server.CreateObject("ADODB.recordset") rs2.Open "SELECT c.*, h.hoofdcat_id FROM hoofdcategorieen h, categorieen c WHERE h.hoofdcat_name='"&SelValue&"' AND h.hoofdcat_id= c.hoofdcat_id ORDER BY c.cat_name ASC", conn2 'Fill variables with values Do until rs2.EOF Response.Write("<OPTION value='" & rs2.fields("hoofdcat_name") & "'>" & rs2.fields("hoofdcat_name") & "</option>") rs2.movenext Loop rs2.close%></select> GreetzLeandra
  10. Akasha

    uploading

    HelloI want to upload files from a pc to a server using ASPI am working on a website and on this website it must be possible for the users to upload files to the server like ppt or doc filesdoes anyone know if this is possible and where i can find the scriptthnx alotgreets Leandra
  11. Akasha

    RecordCount

    Already found the problem. :)Recordcount is not supported with the default forward-only cursor.so i opened it in a different waysolution is found at this link:http://www.aspfaq.com/show.asp?id=2193greets leandra
  12. Akasha

    RecordCount

    Helloi am new with asp and i have a problemI want to check the number of records in a recordsetif there aren't any in it it must give back an error that there was nothing returnedif rs2.RecordCount > 0 thenthat all works fine except for one thing and that is dat rs2.RecordCount keeps giving back -1 even when the query didn't or did return something from the database?why do I get -1 :)I look at the explanation of recordcount but didn't get any wisergreets Leandraps. excuses for my english
×
×
  • Create New...