Jump to content

denny911

Members
  • Posts

    88
  • Joined

  • Last visited

Posts posted by denny911

  1. Hello,Since I really didn't know where to post my question, I'm posting it here..I've got a really nice gallery script on my ASP (MS Access) site. It only scans its default image folder and displays images along with their comments.I've integrated file upload, and everything works pretty fine.BUT.. This script doesn't enable moving images or deleting them directly from the page (with administrator privileges, of course) but it simply lists and shows images.Now, I'm wondering if anybody knows about some script that will enable moving and deleting (or, at least one of the mentioned) images from any folder in my root directory (of course, i would be using it independently from my gallery script)..Thanks,Denny

  2. Hi all,On ASP page ,when I use <%@ Language=Javascript%> in the 1st line, how can I add ASP code after? Anytime I try to write a ASP code, it shows me error. How can I fix it? Is there anything I need to add to go back on ASP code?Thx Joe

    if that piece of code isn't in the 1st line of code, thaT'll cause the errortry to put it in the first line, maybe that's the solution
  3. Hello,I have asp adrotator set up on my site.. im using .jpg banners.Now, i wanna know is it possible to use .swf (flash) files, alone or along with .jpg and/or .gif files?Thank you

  4. Hello,Recently I decided to make an info portal of my own (I chose ASP). I've started from 0 knowledge of ASP and later I learned that using MS Access databases is not very good idea if you plan to have many users at the same time.Now, what I want to know is whether it is possible to use MySQL with ASP pages? Or should I better start learning PHP (as well as MySQL) and transform my current portal from ASP to PHP site?If you like, go to http://www.uskportal.info and take a look.Thanks for your replies!

  5. Hello,Recently I decided to make an info portal of my own (I chose ASP). I've started from 0 knowledge of ASP and later I learned that using MS Access databases is not very good idea if you plan to have many users at the same time.Now, what I want to know is whether it is possible to use MySQL with ASP pages? Or should I better start learning PHP (as well as MySQL) and transform my current portal from ASP to PHP site?If you like, go to http://www.uskportal.info and take a look.Thanks for your replies!

  6. Hello,In the table "mytbl" there's a field named "hits". I'm trying to make this piece of code below increase the value of that field by one.

    <% Set conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("database-path.mdb"))SQL = "UPDATE mytbl SET "sql=sql & " VALUES "sql=sql & "hits ='" & hits+1 & "'"sql=sql & " WHERE ID = " & ID & ""on error resume nextconn.Execute sql, recaffectedif err<>0 then Response.Write("Error!")else  Response.Write("Record Added")end if%>

    Below this is the code that shows the value of the field hits and it works just fine. The problem is after I refresh the page, that value is NOT increased by 1, as it is supposed to be (the ERROR message appears but database's value is displayed). It only shows the value as it is, every time I refresh the page.Any suggestions?Thanks

  7. You could find out where your host is and determine the hour difference. Then before displaying the date add/subtract the needed amount of hours.
    DATEADD("h",7,NOW( ))

    The above code adds 7 hours to the current date time.

    you see, i know for sure that the time difference is 7 hours. in my database i have the date/time fields which are filled automatically since their default value is set to Now()How can i change the time format of my hosting server to show the current time + 7hours and also to show date in this format: 31.12.2005 and not 12/31/2005?Thx
  8. Hello everyone,i have uploaded my site for testing purposes. i use an MS database and when i open my site from localhost, dates and times are shown like this:28.12.2005 15:04:29But, when i open the same page from internet, the same date and time are shown like this:12/28/2005 8:04:29 AMi realize that the server time is used in both cases. since im in bosnia and herzegovina, the first date and time format are what i want.but, my hosting server is probably somewhere in USA (since the other time is 7 hours behind).Now, i want to know if there is any way to make my server display GMT+1 time instead of that of my hosting server?Any suggestions, anyone?THX

  9. i think you should have another .asp page that will be placed in form's action, something like this: <form action="confirmation.asp">, where you would put: Your subscription has been confirmed! or something like that..i'm just a beginner in ASP so.. ;-)

  10. now i've been asked to figure out how to add stuff (math)  so like say what the date will be in 3 days time. 
    i'm not sure that i understood what you want to do?
  11. sql=sql & "'" & Request.Form("comment") & "')"
    You see, i think the problem might be in this:sql=sql & "'" & Request.Form("comment") & "')" (there is no ";" after closing bracket..Try insert it:sql=sql & "'" & Request.Form("comment") & "');"and let me know if that was the problem.
  12. You want a counter to check how many people read the article?Just make in your database another colum "Counter" and do that everytime someone enters the page it will add the same article Counter colum 1

    ok, but how am i supposed to do that? should i open a database connection and thenSELECT * FROM counter..can you continue? thanks for your response if there's gonna be any..Denis
  13. Hi,If you want, go to my testing site at hhtp://d.1asphost.com/krajinaonline/ and take a look so it'll be easier to understand what i want.I want to add the code that will increase value by "1" every time user opens a page."This article is commented: xx times" (i already have this one and it's working)"This article is viewed: xx times" (on my page, here i put the same code as above but i've added (+8) just to make it seem different from above - it does NOT what it is supposed to)so, after the first user reads an article, there should be "1 times", and after another user reads that article, there should be "2 times" and so on..i suppose the value should be stored in my database, but how? And what code should i use?thanks!

  14. Glad to help - let me know how it goes.

    I solved the problem with adding first comment, now i'm searching for a javascript that will reset my form (cause i don't know javascript).there's also one more thing i want to have on my site. i want the number of views of my articles (news) to be displayed.At the moment, i have active counting of the number of comments posted (for a particular article) and, beneath that number, i simply added "+8" value just to make it seem like it's real number of views.If you could explain me how to do that, it would be great.
  15. ISSUE 1:In the popup for ID=7 your form tag carries the ID=7 into your action attribute.  When the page with ID=12 requests the popup, it send the ID=12 into the page as a URL parameter but the action attribute in your form this time looks like this:<form method="post" action="komentari.asp?komentID="><input name="komentID" value="" size="20" type="hidden">Both are Its missing the ID.I hacked in 12 and my comments appear.Check your code an investigate why the URL string is not being picked up - I can't help any more on that one without seeing the actual code.

    well, Skemcin, what you wrote helped me understand what the problem was with the issue 1.Now I'll try to solve issue 2 by inserting the ONCLICK event as you suggested.Hope you'll be around to help me with some other problems i might have (or still have).THANK YOU
  16. Hi,I have some troubles handling some problems on my site, so I tried several times to give detailed description of my problem but nobody seems to understand me perfectly.Now I have found a free ASP hosting, and the link is:http://d.1asphost.com/krajinaonline/default.aspThe site's language is Bosnian, but if you are really interested in helping me, that doesn't really matter.ISSUE 1 deals with comments:Click on the first pic or the link beneath it (first row with small pictures, ID of that article is 7) and after it's open, there's a link "Vaš komentar", so click it and pop-up window will open. There's already several comments. Try to add yours (write anything).Now open the article on the top (big picture), the ID is 12.Repeat the procedure. There's no comments. Try to add yours.Now, if you have a solution, write it here.ISSUE 2:In the right column, there's something like a ShoutBox. Make your shout and you'll notice that the form didn't reset (form's action page is placed into an iframe).So, if you have an answer for that, write it here.THANKS,Denis K., Bosnia Herzegovina

  17. I don't get the problem... Did you try the loop I gave you, what error do you get?:)  No, this time we will do it together, otherwise I feel you won't understand what you do.

    I tried to use the loop you gave me:<%'...Do While Not rs.EOF And Not rs.BOF Response.Write(rs("ime") & " " & rs("komentar") & " " & rs("vrijeme"))rs.MoveNextLoop'... %>..but it just doesn't seem to work..Regarding the error i get, it's the same one I've been getting before: sth like this: YOUR SESSION HAS EXPIRED, remember?The code I need is the one that will enable me to show comments with certain ID AND if THERE IS NO RECORD with that ID, the code should enable me to add THE FIRST ONE using the form provided.So, the problem is users can't add any comments unless there is AT LEAST ONE with that ID.Since your previous loop doesn't work (whole system slows down and nothing happens for some time and then the error appears), maybe you can come up with something else?Thanks Jerome..
  18. You're welcome!Was it usefull?  :)

    well, it was useful in a way-- it didn't solve my actual problem but your way of "Response.Write" is much better cause it enables me to separate those records (nick, comment and time) so I can modify their appearance separately..But my actual problem still stands.. I can't add the first comment through my form.. It's the same error again..Can you try to rewrite the code once again?
  19. Pls, paste your code  :)

    This inserts shouts into the database:<% set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("proba.mdb"))sql="INSERT INTO haber (nick, haber)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("ime") & "',"sql=sql & "'" & Request.Form("komentar") & "');"on error resume nextconn.Execute sql,recaffected%>---------------------------------------------this is iframe's code and form's code:<iframe name=scroller src="haber.asp" frameBorder=0 border=0 width=100% height=270 scrolling="auto"></iframe><table align="left"><form method="post" action="haber.asp" target="scroller"><input name="ime" id="ime" size="12"></td><textarea style="font-family:Arial" name="komentar" cols="19" rows="3" id="komentar"></textarea><input name="submit" type="submit" value="Unesi"><input name="reset" type="reset" value="Poništi"></form>-----------------------------------------------------------when users submit the form, nothing actually happens with the main window (page), but the page "haber.asp" refreshes in the iframe so I think that is the reason why the text is still in form's fields (form is placed in my main window (page) and users have to reset the form to make it disappear.
  20. Denny,You are right, the problem is in your loop... your are asking the cursor to go throught the recordset untill he comes to the End Of File (EOF). If the table contains any value, there is no problem. But if it's empty, it just doesn't find any End Of File, and it keeps looking and looking untill you get an error...Instead, try to use a "Do While" loop like this :
    <%'...Do While Not rs.EOF And Not rs.BOF  Response.Write(rs("ime") & " " & rs("komentar") & " " & rs("vrijeme"))rs.MoveNextLoop'... %>

    well, jerome, thanks for your reply--i'll try it right now..
  21. Hello,I'm using a simple form on my page. It's some kind of shoutbox (short messages for everybody to see them).The form's action is a page that is loaded into an iframe. So, when a user clicks the Submit button, form doesn't get reset (I think it's because the main page itself (where the form is actually placed) doesn't refresh but the other page is opened in the iframe).Given the circumstances, is there any way I could make the form reset (without clicking Reset button) after submitting it?Thanks, Denny

  22. Hi,on my site visitors have the option for commenting the articles. I created a database and a table for comments within the database. When a visitor wants to comment some particular article, he inserts his nick and comment into a simple form and submits it.Now, if there ARE ANY COMMENTS (at least ONE) for that article, everything will go just fine and visitor's comment will show up.BUT.. For some strange reason, if there IS NO COMMENTS for that article, after submitting the form, everything is so slowed down, page seems to be loading forever, and after some period of time an error occurs (something like YOUR SESSION HAS EXPIRED.. or TIME IS EXCEEDED..)The code i'm using to show the previous comments for some article is shown below:<%Dim komentID komentID = Request.QueryString ("komentID") set rs = Server.CreateObject("ADODB.recordset")dataSQL = "SELECT ime, komentar, vrijeme FROM komentari WHERE komentID = " & komentID & ""rs.Open dataSQL, conndo until rs.EOF for each x in rs.Fields Response.Write(x.value) next rs.MoveNextlooprs.closeset rs = nothing%>So, is there anybody who could tell me what's wrong with the code? (Maybe it's that LOOP thing?)P.S. Please, be as specific as you can be, since I'm just a beginner in ASP..Thanks, Denny

×
×
  • Create New...