ASP, XML Stuff...

I'm trying o get my head around XML and using ASP to parse documents.

I've managed to kncok together the code below to send a request to an
external server and then pop the response into a variable and format it
a bit.

What I'm trying to do is insert the data into a nice HTML table, maybe
using the node names as column headings. Has anyone got any suggestions
on how I can do this? and also, is this the best methid of performing
this task? I need it to be xbrowser compatible so I figured server side
would be the best option. Code:

View Replies


ADVERTISEMENT

Textarea Stuff To A DB

I've written several scenarios where the end user needs to enter data into a textarea (descriptions, messges etc) which becomes part of a form. End users often put apostrophe's and carrige returns in the textarea... however, when the code i write is submitted to the database, it generates an sql command from the page that sent the action.

Client Side:

<form action="somepage.asp" method="post">
<input type="text" name="emailaddress">
<textarea cols="20" rows="5" name="comments"></textarea>
</form>

On code submission...

sql="insert into tableName (email,comments) values ('" & request.form("emailaddress") & "','" & request.form("comments") & "');"
db.execute(sql)

Now, when strange people put carrige returns, it stuffs up the string and therefore produces an error, and to make matters worse if it did recognise a carrige return, it wouldn't be displayed on HTML output. Apostrophes are even worse - they signify the end of a variable in the SQL sentance Can anyone help me and figure out a new way of writing to the DB?

View Replies View Related

Dates And Stuff

I'm gonna be writing a new ASP based system for work for staff to book in deliverys with our warehouse - I'm starting to think about the database design and i'm trying to think how best to work it - Each day will be a record - with a date field - but I have no idea how to automatically create a date field with concurrent dates - and also we can book deliverys upto 6 months in advance, so there needs to be a lot of records created.

View Replies View Related

Date Stuff

<%
dyear = year(RS("dates"))
dmonth = Month(RS("dates"))
dDay = day(RS("dates"))

response.write dyear
response.write dmonth
response.write dDay
%>

i get 2003 12 9

how do i dispaly 2003 December Tuesday

View Replies View Related

Forms, PHP, ASP 'n Stuff

I have a web form (fine so far) which POSTs to a PHP routine which mails the information. Very standard. Now I would like to update a database as well as emailing the form contents.

The problem is that the database has to br MS SQL and I can't install the bits to make it work with PHP - so the database part HAS to be ASP. The mail bit HAS to be PHP as that's the only mail routine I can use. Code:

View Replies View Related

How Do You Make If.then.else Do Two Stuff On One Line?

is it possible to do a insert, add, and a redirect all on the same page?

for example... signup.asp. there's a text box labeled Acctid. If you don't have an acctid please enter "0000" otherwise enter one. This box is used to see if they have an existing account in the database by using an UPDATE query and if they don't it does an INSERT query with acctid = 0000 for all non customers. What I want the if.then.else statement to do is to

If acctid = "0000" then
conn.execute acct_add
(and if sucessful to response.redirect "/yay.asp"
Else if NOT acctid = "0000" then
conn.execute acct_update

(but I want it to return an error if the update wasn't sucessful either because the acount doesn't exist or watever and if the update was sucessful to response.redirect "/yay.asp") END IF

Do ya get it?

View Replies View Related

Photo Album Stuff

I am about to get rid of TZO on my computer, and I've been using it's photo software to view photo's on my web site. I could write something in ASP (or asp.net), but I figure why spend time re-inventing the wheel if there's something already out there.

Does anyone have any recommendations on ASP apps that I can use for viewing photo's on my web site? I would rather it be free if possible, and it needs to just look at a folder, or series of folders, and build a thumbnail type of view from what's there. In other words, I don't want to have to populate a database with all of my pictures.

View Replies View Related

Loading Stuff Into Combobox

I have a combobox that on page load is disabled. I've noticed that the information will not load into the combo box if this is the case. Is there a way to load the information and then disable it so the user has no idea what has happened? I load another combobox before this one, that is NOT disabled and so loads properly.

Code:

="1" name="County" disabled="true">
<%
While not objrs.eof
%>
<option value ="<%=objrs("County")%>">
<%=objrs.fields("County")%>
<%
objrs.movenext
wend
objrs.close
%>

View Replies View Related

ASP Equivalent Of Some Cold Fusion Stuff - Date/Time?

I was wondering if anybody could help me translate this from my native Cold Fusion tongue to ASP? :

#DateFormat(Visitors_DateTime, 'dd mmmm yyyy')#
#TimeFormat(Visitors_DateTime, 'h:mm tt')#

The data is held with SQL2000 in a smalldatetime datatype column.

Would just like to display the full date and time really.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved