Jump to content

Akasha

Members
  • Posts

    71
  • Joined

  • Last visited

Posts posted by Akasha

  1. Already made a beautiful very long querie, but hey it does the job :)i also wanna know if its possible to make some kind of rollback when sombody changes the database, but because of some reason something goes wrong. Is it posiible to make an rollback with asp

  2. Hello i want to have 2 multiple comboboxesthe first one contains people that are on the project.The second one contains the other members that are not on the project.I filled my first comboboxby doing that i also created an array with the names of the people in the project.Now i want to fill my combobox with all users except for those names.But i can't figure out how.i have already tried StrComp perhaps i should try for statement to change the select query and use where notdoes anyone has a solutionthanks in advance

  3. Hello I have a form with 3 radiobuttons.Depending on which radio is selected , they will be redirected to a pagebut it doesn't matter which button i click all 3 are going to the same page (add_project) what am i doing wrong? here is the code of my form

        <p class="gen"><b>What would you like to ...</b></p>            <form name='form' method='post'>   <input type="radio" name="choice" value="Add" onclick="goto()"/> add a project?   <input type="radio" name="choice" value="Edit" onclick="goto()"/> edit a project you have added?   <input type="radio" name="choice" value="Delete" onclick="goto()"/> delete a project you have added?</form>

    here is the code of my javascriptfunction

    function goto(){  for (i=0;i<document.forms[0].elements.length;i++) {   if (document.forms[0].elements[i].checked)  {    if (document.forms[0].elements[i].value = "Add")      location.href = "add_project.asp"    else  if (document.forms[0].elements[i].value = "Edit")      location.href = "edit_project.asp"    else  if (document.forms[0].elements[i].value = "Delete")      location.href = "delete_project.asp"   } } }

  4. FINALLY..... IT WORKS i found out how it works pffiieeeuuuwww!!!!hahaha i' am starting to become a real programmer :( i looked at the documentation of AspUpload and found out you can indeed use Upload.form to retrieve data from a form.But when i used it i got this error

    Microsoft VBScript runtime error '800a01a8'  Object required: ''

    i found out that the page was trying to use an object that wasn't created yet.i only gets created after the submitso i first had to check if a submit was donedid it with the line:

    if Request.ServerVariables("REQUEST_METHOD") = "POST" then

    so got the variables out of the form and send it to the databasework absoluty fine and my file was also uploadedthe only i needed to do now was to send te filename to the databasetherefore i used this code

        dim Upload, fileName Set Upload = New FileUpload    Upload.Save(uploadsDirVar)	for each fileKey in Upload.UploadedFiles.keys            SaveFiles = Upload.UploadedFiles(fileKey).FileName     next

    and used the SaveFiles in my queryand now it all works :):):D:blink::)

  5. SQL = "INSERT INTO m_lobby values('123')"if that's the only kolom in your table or elseSQL = "INSERT INTO m_lobby ('ft_8watt ') VALUES ('123')"if it doesn't workplease tell what the error is

  6. maxcounter stands for how many times you want to repeat the query

    set conn2=Server.CreateObject("ADODB.Connection")conn2.Provider="Microsoft.Jet.OLEDB.4.0"conn2.Open "Provider=SQLOLEDB; Data Source = ......"For i = 0 to maxcounter    sql = "INSERT INTO [I]naamtables [/I]VALUES ([I]'Values"'[/I])"    conn2.Execute(sql)Next

    for your sql query you can use dynamical variables to change the queriefor example

    sql2 = "INSERT INTO Simulatie_auteur VALUES ('"&request.form("titel") & "', '" & memberarray(i) & "')"

    the titel stays the same, but the memberarray(i) changes as long maxcounter hasn't been reachedi hope this wil help you on your way :)

  7. try this

         function ClipText(TheText, TheLength)     ' Test if needed first     if TheLength > 0 then       if (Len(TheText) > TheLength) then        TheText = Left(TheText, TheLength - 3) & "..."      end if     end if  	 ClipText = TheText      end function

    and where you want to write the tekst you enterfirst you have to load your text into a variable like summaryand specify the amount of characters you want to show

    <%=ClipText(summary, 300)%>

    for examplethis will get the first 300 charactersthe text will be finished with three dots ...i hope it will help you out :)

  8. hello after some research on the internet i came to the conclusing that you cannot use request.from and uploading a filebecause you get this error:Cannot use the generic Request collection after calling BinaryRead. the gave several solutions like use Upload.form or FormUploadRequest instead of request.form I have tried it but it still won't work :)I use the code from FreeASPUploadit would be nice is i could use variables from my page and use the file uploador else i have to split te form in 2 parts :)does anyone has a solution??greetings Leandra

  9. Found a solution to work around the problemI collect the values from a databaseThen I replace all spaces within the value with a _ then the combobox will be filledThe onchange event is envokedThen I want to use that value in the queryso I replace the _ in the value again with a spaceworks fine :)

  10. Helloi have a combobox filled with a databaseWhen the value change it will call the onChange event.In this onChange he will get the selected valuebut the problem is that the value contains spacesso that the value that will be returned is only the first part.for example the value in combobox is Blue Tooththe value he will return is Blue :) is there a way to get the full value out of the combobox without editing the values in the database.because i alse need that value to use it in several query to retrieve more information from the database after the onchange eventthis is the code for the combobox

    <select name="projects" onchange="showProject()"><%    	     'Recordset     set rs2 = Server.CreateObject("ADODB.recordset")     rs2.Open "SELECT projectnaam FROM Project ORDER BY projectnaam ASC", conn2     Response.Write("<OPTION>-- Select a project -- </OPTION>")     'Fill variables with values     Do until rs2.EOF        if request("project") = rs2.fields("projectnaam") then        Response.Write("<OPTION SELECTED value="&rs2.fields("projectnaam")&">" & rs2.fields("projectnaam") & "</OPTION>")      else        Response.Write("<OPTION value="&rs2.fields("projectnaam")&">" & rs2.fields("projectnaam") & "</OPTION>")      end if      rs2.movenext   Loop   rs2.close%>  	</select>

    and this is the code for the function

    function showProject(){   var project = form.projects[form.projects.selectedIndex].value      location.href = "projects.asp?project="+project;}

  11. Helloi want to have a button and when it is pushed it must sent an emailI have the following code

      Set myMail=CreateObject("CDO.Message")  	myMail.Subject="Sending email with CDO"  	myMail.From="nlv@mydomain"  	myMail.To="leandra_S@hotmail.com"  	myMail.TextBody="This is a message."  	myMail.Configuration.Fields.Item _  	("http://schemas.microsoft.com/cdo/configuration/sendusing")=2  	'Name or IP of remote SMTP server  	myMail.Configuration.Fields.Item _  	("http://schemas.microsoft.com/cdo/configuration/smtpserver") _  	="smtp server"  	'Server port  	myMail.Configuration.Fields.Item _  	("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _  	=25   	myMail.Configuration.Fields.Update  	myMail.Send  	set myMail=nothing              Response.Redirect("../main.asp?message=Newsitem has been added and users are notified")

    Getting this errorError Type:CDO.Message.1 (0x80040213)The transport failed to connect to the server. /Internal/Secretary/Newsitems/newsitemnotify.asp, line 192what's wrongps. for my smtp and port number i use the settings used in outlook, but this is an imap is that a problem

  12. yes i know and i have tried itbut he keeps returning the value thats been giving in the beginning

     <%if request.form("rte1") = "" then   sContent = "test"&chr(13)    sContent = RTESafe(sContent)else   sContent = RTESafe(request.form("rte1"))end if%>

    he is been giving the value testafter submitting, the value is still test even if i changed it in the frame

  13. and if i make a website where someone could load an asp file then the website tranfers it too plain html and save it localand the users it self needs to upload the file to the server with ftp

  14. Hellois it possible to use an asp script or javascript to get the source of an webpage.For example i have a dynamic page, and using asp/java to get data out of an database to build the webpage.But one of the server doesn't support asp only php (apache webserver),So is there an command to get the static source.(same as right click -> source) and save it as an HTML file.so you get the same page only not dynamic but staticeven better if there is an converter van asp to php, probably there isn'thoop it is a liitle bit cleargreetz akasha

  15. Helloi wrote an excel macro with vbscript that makes an dynamic name (range) that works perfect.but then my asp page says that he can't find the objectwhy can't he read dynamic range names?greetz

  16. Can't it be solved with a virtual map connected with the other server?or perhapsi could put the upload script on the location wehre the files needs to goand include that files in this asp script

×
×
  • Create New...