Jump to content

Splurd

Members
  • Posts

    60
  • Joined

  • Last visited

Splurd's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. My boss want to know which country and organisation an IP is from so they have a better idea of who visits them. Is there an easy way to do this?
  2. I cannot use servers because this is being burn on a CD to be passed to customers.I dont need to write to the database, only to read from it.The database contains a catalague of products. I need to make a webpage, that can read from this database and display the data. And all of this should be on a CD so its portable and no internet access is needed.
  3. I have a database. (whoopie)I have a cd. (whoopie)I have to get some way to get data from the database when its burnt onto a CD. (o crap)I have no idea how to do this, so was thinking if it was possible to do it via javascript. Or any other language. Or any easy method.
  4. I have a static IP address. (which irks me to no end) And the speed here is not an issue, My main goal is to get a website up and running, with as little cost as possible. (aka no cost)Didnt think my humble thread would generate a heated discussion about hosting and servers and uh, drinking habbits. ;p But to be truthful I dont think I will be in need of such a secure system.I knew of a guy who set up his webpage from his home pc, using windows and using ISS. Thats kinda what I am aiming for. Though I would consider getting a hosting service because its more efficent, I still am curious as to how to host on a home pc.
  5. Most of the time, I've been using either my collage servers or my the server at my workplace to host my files and do my stuff. But all of those were already set up and I basicly just ftp over and run it. I have very little knowlage of networking and such.Anyway, my parents want their lovely little IT wiz kid to make them a website, and I am not very sure of how to host it. Whilst I am aware of sites that offer hosting services, I was thinking of using my PC at home to be my server and host the site since it is basily on 24/7.So can anyone point to me a guide on how to host a website using your own computer as a server? And getting domain names etc.
  6. Well lets say you have a database, I use microsoft access, and you can select to import data from an excel file. And put the data from the excel file into the database in a table.was wondering if it was possible to make a script such that, when a person uploads a excel file, it will automaticly covert it and add the data from the excel file into the database.
  7. Can it be done? Is there a way to get a excel file, and upload it to the server and let it automaticly add it to a database?
  8. I'm having trouble with my update db page, and so I've included the code.The table I have, has some values as numbers and some as String, I'm not 100% sure if that is causing the problem. ^^^This is the error that I am getting<%'Dimension variablesDim adoCon 'Holds the Database Connection ObjectDim rsUpdateEntry 'Holds the recordset for the record to be updatedDim strSQL 'Holds the SQL query for the databaseDim lngRecordNo 'Holds the record number to be updatedDim Primekey 'Holds the primarykey nameDim keyno 'Holds the primarykey value, must be numberDim table1 'table name,'Read in the record number to be updatedtable1 = Request.Form("table1")if table1 = "sg_test" OR table1 = "False_tb" then primekey = "SN"elseif table1="Contact_tb" OR table1 ="User_tb" then primekey = "Account_ID"elseif table1="Warrenty2_tb" Or table1="Warrenty_tb" then primekey = "ID"end ifkeyno = Request.Form("keyno")'Create an ADO connection odjectSet adoCon = Server.CreateObject("ADODB.Connection")'Set an active connection to the Connection object using a DSN-less connectionadoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db1.mdb")'Create an ADO recordset objectSet rsUpdateEntry = Server.CreateObject("ADODB.Recordset")'Initialise the strSQL variable with an SQL statement to query the databasestrSQL = "SELECT " & table1 & ".* FROM " & table1 & " WHERE " & primekey & "=" & keyno'strSQL = "SELECT sg_test.* FROM sg_test WHERE SN ='" & Request.Form("ID_no") & "'"response.Write(strSQL & "<br>" )'Set the cursor type we are using so we can navigate through the recordsetrsUpdateEntry.CursorType = 2'Set the lock type so that the record is locked by ADO when it is updatedrsUpdateEntry.LockType = 3'Open the tblComments table using the SQL query held in the strSQL varaiablersUpdateEntry.Open strSQL, adoCon'Update the record in the recordset'rsUpdateEntry.Fields("CONTACT_NO") = Request.Form("CONTACT_NO") for each x in rsUpdateEntry.Fields rsUpdateEntry.Fields(Cstr(x.name)) = Request.Form(x.name) next'Write the updated recordset to the databasersUpdateEntry.Update'Reset server objectsrsUpdateEntry.CloseSet rsUpdateEntry = NothingSet adoCon = Nothing'Return to the update select page incase another record needs deletingResponse.Redirect "update_select.asp"%> ^^^This is my code.Any views on this?
  9. because I am going to put id="ect" in the 2nd form to do JS with it, and if I combine the form it makes things somewhat complicated for me, so I was wondering it there was a way to do it. Plus it cant hurt to know if it can be done.I tried scott100's method but it only sumbited the 2nd form. Its weird tho, I put an alert in the script and it processed the first form but not the second. But if I remove the aleart, It will process the 2nd form.(eg, form1.submitalert("hoho")form2.submit)returns the first one. scott100's target thing seems to work, but I think thats besause the forum is submited twice to the pages. eg, form1 gets sumbited to the page, then form2 gets sumbited to another instance of the page. As opposed to form1 and form2 get submited to the page at the same time.
  10. Can it be done? basicly I have one form, but since I am doing some JS thing, I want to split it up into two forms.Like, <form action="sectest2.asp" method="post"><input type="text" name="haha"><br></form><form action="sectest2.asp" method="post"><input type="text" name="hehe"><br><input type="submit" name="wow" value="Da submit buttan"><br></form>
  11. Yes, you can use images if you are simply accessing the html offline. Just put the image file in the same folder as your html file and reference it.<img src="haha.jpg">Or give the whole path,<img src="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg">etc
  12. Splurd

    javascript help

    How do you use a asp varible in javascript?Like, x.innerhtml += <% Request.Cookies('id') %> doesnt work for me.
  13. Doesnt that use innerhtml as well o.O?
  14. I was using firefox and it didnt work. I dont know why, anyway I made one that worked <html><head><script type="text/javascript">function addbox(){var x=document.getElementById('haha')//divvar y=document.getElementById('warnety')//formvar i=0for (i=0;i<(y.length-2);i++) { z+="tb1<input type='text' name='tb1' value=" + y.elements[i].value + "><br>" i++ z+="tb2<input type='text' name='tb2' value=" + y.elements[i].value + "><br><hr>" }x.innerHTML= z +"tb1<input type='text' name='tb1'><br>tb2<input type='text' name='tb2'><br>"}</script><title>test start</title></head><body bgcolor="white" text="black"><form ID="warnety"action="test2.asp" method="post"><div id="haha">tb1<input type="text" name="tb1"><br>tb2<input type="text" name="tb2"><br></div><input type="button" onClick="addbox()" value="Clickzor"><input type="submit" value="de submit buttan"></form><br></body></html> Loops thru the form, puts the values in z, then pastes z + 2 new textboxes out.
  15. uh, its like, you type in something, hit the button to add boxes, but it wipes out what you previously typed.after a moment of thought, In order to make it work, I have to loop thru the textboxes, get their value, and somehow get it print out the value inside the text boxes.
×
×
  • Create New...