Help - Search - Members - Calendar
Full Version: .asp Help!
Zymic Webmaster Forums > Web Design & Development > General Web Design Discussion
benje
Howdy...

Not sure whats going to be the best way to explain all this too you BUT...

http://pastebin.com/m619cc8e0
^^ The code found in that "paste" is my current webpage which give a page look like this;



I'm going to be having hundreds/thousands of "folders" showing up in the image above.

Everything works fine at the moment...i can scroll between pages etc to look through all "uploads" BUT i need some way of sorting these out.

I have found a script online that basically creates a link on the field name which then sorts the column ascending/descending.

I really could do with this intergrating into my site...that OR having someone of making each upload stay at the top rather than putting them in some random order!!

Here is this script i have found;

http://pastebin.com/m6ff694b4

or direct link = http://www.asp101.com/samples/viewasp.asp?file=db_sort.asp

gives an outcome like this = http://www.asp101.com/samples/db_sort.asp

Appologies if this is in the wrong place sad.gif

I look forward to your assistance smile.gifsmile.gifsmile.gifsmile.gifsmile.gif

unsure.gif

Well,

i've just bashed a JS in there for the moment which works wonders BUT i still have the problem of...

If i upload a new item it will not automatically place it at the top of the list sad.gifsad.gif

Thanks

New problem... smile.gif

QUOTE
<b>Select email to send notification to:</b> <select name="mailto">
<%
emails = objRS("Email").Value.split("|");
for (i = 0; i<10; i++)
{
if (i< emails.length)
{
%>
<option><%=emails[i] %></option>
<%
}
}
%>


This bit of code isn't pulling the email address through from a DB - is this code at fault or does this seem fine??

Cheers!

Right i've sorted that one now!!

lol, you should all carry on ignoring me and i'll fix all my own problems smile.gif

QUOTE
<% emailbody = "A new set of documents are ready for download from 'contract documents' on the .\n"
+"\n"
+"Foldername: " +objRS("title") + "\n"
+"Notes: " +objRS("description") + "\n"
+"\n"
+"You have 30 days to print your documents after which time they will auto delete.\n"
+"\n"
+"Your documents can be accessed by logging on to \n"
+"\n"
+"Sign in using your username and password and click on the link for contract documents.\n"
+"Please don't hesitate to contact us if you require any assistance.\n"
+"\n"
+"Sales administration\n"
+"Admin telephone : \n"
+"E.mail : \n"
+"Internet : \n"
%>


When the email is received there are no spaces/breaks between each line - \n is not working??
benje
Come on people...i've determined that the likely hood of the reason why i'm receiving the mail like so is because i'm receiving it in PLAIN text.

How would i change this to HTML mail??!!
Ed
You need to send the appropriate headers:

CODE
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
benje
This is fun !
benje
objCDO.Body = BodyString
objCDO.BodyFormat = 0
objCDO.MailFormat = 0
objCDO.Send()
objCDO = null


0 = hmtl
1 = plain

CHAMONE!
benje
I've finally got it in HTML...BUT biggrin.gif:D:D:D:D

Html is not working in the script!??? It just ignores it...well, <font face = "..."> anyway??

"
CODE
The website cannot display the page
HTTP 500  
   Most likely causes:
The website is under maintenance.
The website has a programming error.

   What you can try:
     Refresh the page.

     Go back to the previous page.

     More information

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.
"


see this works fine...

CODE
BodyString =  "\n"
            +"A new set of documents are ready for download from 'Contract Documents'.\n <br>"
            +"\n <br>"
            +"<b>Foldername:</b>  " +objRS("title")  + "\n <br>"
            +"<b>Notes:</b>  " +objRS("description")  + "\n <br>"


If i try defining a font inside there it goes mental!!!!
benje
anyone???
benje
Right;

how would i go about setting the font in here please smile.gif

"span" ??

CODE
    objRS.open ("SELECT franchise.Email, franchise.Name, tblContractFolders.* FROM franchise INNER JOIN tblContractFolders ON franchise.ID = tblContractFolders.franchiseid WHERE tblContractFolders.id = " + Upload.Form("id"), Conn)
  
        objCDO = Server.CreateObject("CDONTS.NewMail")
        objCDO.From = "administration@lease360evolution.plc.uk"
        objCDO.To = Upload.Form("mailto")
        objCDO.Cc = ""
        objCDO.Bcc = ""
        objCDO.Subject = "Lease 360 Evolution - New documents uploaded to website"    
        BodyString =  "\n"
            +"A new set of documents are ready for download from 'contract documents' on the lease 360 evolution plc website.\n <br>"
            +"\n <br>"
            +"<b>Foldername:</b>  " +objRS("title")  + "\n <br>"
            +"<b>Notes:</b>  " +objRS("description")  + "\n <br>"
            +"\n <br>"
            +"You have 30 days to print your documents after which time they will auto delete.\n <br>"
            +"\n <br>"
            +"Your documents can be accessed by logging on to [url=http://www.lease360evolution.plc.uk/franchise.asp]http://www.lease360evolution.plc.uk/franchise.asp[/url] \n <br>"
            +"\n <br>"
            +"Sign in using your username and password and click on the link for contract documents.\n <br>"
            +"Please don't hesitate to contact us if you require any assistance.\n <br>"
            +"\n <br>"
            +"Sales administration\n <br>"
            +"Admin telephone     : 0870 360360 1\n <br>"
            +"E.mail             : administration@lease360evolution.plc.uk\n <br>"
            +"Internet             : www.lease360evolution.plc.uk <br>"
        
        objCDO.Body = BodyString
        objCDO.BodyFormat = 0
        objCDO.MailFormat = 0
        objCDO.Send()
        objCDO = null
        
%>
    <table width=600 align=center class=left_right_border_gray cellspacing=0 cellpadding=5>
    <tr><td class=tblRepeatList colspan=2 align=center><b>Email sucessfully sent to <%= Upload.Form("mailto")  %> </b></td></tr>
      <td class=tblRepeatList valign=top align=center><a href="contractfolders.asp">Return to Contract Folders administration</a></td>
    </table>
<%
objRS.close();
}

%>
benje
moooooo

QUOTE
+"<font face=\"Verdana\">A new set of documents a


works a treat smile.gif
benje
Everyone is so helpful!!

60+ people looked here and not one said anything sad.gif
Ed
Not sure many people here know ASP or even want to wink.gif.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.