Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Customizing message
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Customizing message

 Post Reply Post Reply
Author
Sammy View Drop Down
Newbie
Newbie


Joined: 18 December 2003
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sammy Quote  Post ReplyReply Direct Link To This Post Topic: Customizing message
    Posted: 02 January 2004 at 2:49pm

I need help in customizing the message for this code.

If my update is successful, I need the message to display at the top of the page. Likewise if it is not successful.

For instance,

I have this screen:

Job Successully Uploaded!

Enter PIN___________________________submit

After entering this pin, if there is a matching record on the db, a second page is display for editing.

After successul updation, I will to say at the top of the page:

Job successful uploaded. If not, I will like to say Unsuccessful upload but I want above, please see it.

So far, the message appears in a separate page.

<%
uploaddir = "Upload"     ' Folder where they will store the files.

UPLOADDIRECTORY = Server.MapPath(uploaddir)
Set Upload = Server.CreateObject("Persits.Upload.1")   &nb sp;     ' This is the correct code.
Upload.SetMaxSize 1048576 ' Truncate files above 1MB
Upload.OverwriteFiles = True
Count = Upload.Save(UPLOADDIRECTORY)

Set File = Upload.Files("File1")
If Not File Is Nothing Then
   'Response.Write File.ExtractFilename
    Filename = File.ExtractFilename
    Filesize = File.Size
    contentType = File.Ext 'UCase(Right(File.Path, 3))
    fileData = File.Binary
else
     Filename = ""
End If

'Check your update statement. Update the description in accidentnumber field it seems. Other wise write the code like this. oRs is the recordset object

Set oRs=Server.CreateObject("ADODB.Recordset")
Set DbObjmembers = Server.CreateObject("ADODB.Connection")
DbObjmembers.Open "dsn=jobs"
'oRs.open "Select * from ImageFiles where filename='"&filename&"';",DbObjmembers,1,3
oRs.open "Select * from ImageFiles Where ID="&Upload.form("A_Number"),DbObjmembers,1,3

if count > 0 then
      if oRs.eof then
          oRs.addnew
          oRs("filesize") = filesize
          oRs("contentType") = contentType
          oRs("filedata") = filedata
          oRs("filename") = filename
          oRs("description") = Upload.form("description")
          oRs("AccidentNumber") = Upload.form("accidentNumber")
          oRs.Update
     else
          oRs("filesize") = filesize
          oRs("contentType") = contentType
          oRs("filedata") = filedata
          oRs("filename") = filename
          oRs("description") = Upload.form("description")
          oRs("AccidentNumber") = Upload.form("accidentNumber")
          oRs.Update
     end if


       Response.Write "<font color=""green"">Job was successfully stored...</font>"
Else
       Response.Write "<font color=""brown"">Job Upload Unsuccessful...</font>"
End If
%>

 

 

Back to Top
Sammy View Drop Down
Newbie
Newbie


Joined: 18 December 2003
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sammy Quote  Post ReplyReply Direct Link To This Post Posted: 02 January 2004 at 3:21pm

Please ignore my post; I wasn't thinking.

I have it working the way I want it.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.