Wrapping Variables In Speech Marks
I am working on a date function, which takes a YYYY-MM-DD input and splits it into dd,mm,yyyy format. e.g:
string1 = "2006-10-20"
Function stripDate(str)
str_len = len(str)
if str_len = 10 then
str = replace(str, "-","")
str_yr = left(str,4)
str2 = right(str,4)
str_mo = left(str2,2)
str_dy = right(str2,2)
stripDate = str_dy & "," & str_mo & "," & str_yr
else
Exit Function
end if
End Function
test = stripDate(string1)
sample output: 20,10,2006
I then want to pass the sample output into another function, but in order to do that, the date variables must be split with speech marks as follows:
"20","10","2006"
but I can't work out how to include that in the stripDate function so that it wraps the variables in speech marks. Whenever I try to include the speech marks the code returns the usual error about unterminated string constants e.g. if I replace the final line of the above function with this:
View Replies
ADVERTISEMENT
how to make a text to speech software embed in my website
i need some text in my website page to be coming out in an audio format for my site customers
View Replies
View Related
I have a form which sends a link from a text field -
<input name=""wishList"" type="hidden" value="<a href='<%=url_link%>?ID=<%=sendID%>&myMonth=<%=sendMonth%>' class='link-onDarkGrey'><%=tripType%> in <%=country%> - <%=mStartDate%></a>">
I need to set a session variable to this value but I think the apostrophies are getting in the way.
session("choices") = request.Form("wishList")
what's the best way to format that lot?
later I want to concatenate several requests so I can display them.
session("choices") = session("choices")&"<br>"&request.Form("wishList")
will this work?
View Replies
View Related
I 've built a site for a client using .asp and eveything is working fine
except I cannot figure out how to wrap text around an image. Everything is
pulled from the database using response.write. The code works correctly but
I just can't seem to figure out how to do it? I've been searching for weeks
about info on how to do this - to no avail
View Replies
View Related
I have long list of names that I would like to wrap across multiple columns (like a newspaper). Are there any suggestions on how to go about this?
View Replies
View Related
Is there a way to prevent IE from forcing a line break? Below in LISTING 2,
you notice the table background image extention of '.jpg' begins a new line,
instead of staying on the same line as it's file name. Same happens with my
javascript onclick event, IE forces a line break and breaks my code. In my
asp code, you notice I'm inserting line breaks, but IE seems to do what it
wants. I should note, the below HTML results is actually 1 table of 40 or so
that asp builds as a string. Code:
View Replies
View Related
I have script pulling text from a databse which is just the name of a file, e.g: test and I have code which puts a hyperlink around it, for example: http://www.myserver/files/test.doc , so that when the user clicks on it the file opens up for them. How do I check that if the name of the file is a particular filename the address is different.
Basically 1: if filename = test1
address = http://www.myserver/files/test1.doc
2: if filename = EXTERNAL
address = http://www.myserver/EXTERNAL.doc
Here's my code so far:
<TD WIDTH=83 class="body"><P><A HREF="http://www.myserver/files/<% Response.Write RSEmps("fileName")%>.doc"><% Response.Write RSEmps("fileName") %></TD>
View Replies
View Related
I have a recordset containing many fields from one row of data populated by an SQL query.
If I return the entire recordset in one row with the column headings the table would scroll off the right of the screen.
What I want to be able to do is to create several tables, one below the other of five columns each to display the data.
This is fine if I am returning just data, but I want the field.Name as well as the data - which is causing me problems.
View Replies
View Related
how to wrap text on a button.
View Replies
View Related
I ran into a little problem with wrapping text and found 'a' solution. The problem was when I read in text from a DB table field to populate a HTML table. I found a line of text to wrap mysteriously after column 37 even when the field was defined with a max character count of 100.
I removed the <td> tag's 'width' attribute and this took care of the wrapping problem.
I hope this will help someone else.
View Replies
View Related
I 've built a site for a client using .asp and eveything is working fine except I cannot figure out how to wrap text around an image. Everything is pulled from the database so the code works correctly but I've been searching for weeks about info on how to do this -to no avail.
View Replies
View Related
When do you use quotation marks around values in an SQL Statement, and when do you ignore the quotation marks completely?
View Replies
View Related
I have a number of records I need to display in a list box (dynamic) - some have quotation marks and the system chokes on them.. whats an easy way to overcome this?
View Replies
View Related
I am trying to copy an uploaded document from one directory to another. The uploaded file (attach1) will be dynamically named. The resulting file (LName) name is based on a last name field. I have the following code but I cannot figure out how to deal with the issue of quotation amrks. Should I escape them or do I use another method?
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.MoveFile "E:Inetpubwwwrootuploads<%=(frmSend.Fields.Item("attach1").Value)%>.doc","E:Inetpubwwwrootuploads
amed<%=(frmSend.Fields.Item("LName").Value)%>.doc"
set fs=nothing
View Replies
View Related
I am working on building an asp forum, (I have posted a few times with questions ) and it works for the most part now, but I am trying to fix some things.
I am storing posts in a memo field. Originally it was text fields, but 255 characters is just not good enough.
Now, posts are saved fine except for 2 things:
1/ " and ' cause errors. These are causing conflicts with my INSERT SQL statement that is made. How would you get around this problem, I wonder?
2/ New lines etc are not being put into the memi field. I can live without this for the time being, but at some point I will want to implement posts being outputted in the same format they were inputted. Any advice on how to deal with this issue?
View Replies
View Related
I can't seem to find the right way to do this, how do I get ASP to ignore a quotation mark in a string? " doesn't work.
View Replies
View Related
Just like my other post about quotation marks not appearing,I am having trouble with foot marks (').
They are going in as ' but are appearing on the user's end of the database as ` Minor.
View Replies
View Related
The following removes any unwanted apostrophes before being inserted into an sql database:
Articletext = replace(articleText,"'","''")
..but if I need to remove all quotation marks, this doesnt work:
Articletext = replace(articleText,""","''") Code:
View Replies
View Related
Just wonder how you guys handle the single quatation marks when you write the value of a text input into SQL server.
View Replies
View Related
I cannot find any information on how to insert an image into a block of text
and have the text wrap around the image. All if the text and graphics in
the client's site are being pulled from the database using response.write.
When I write straight HTML, it is easy to place an image into a block of
text and align the image right or left, having the text wrap around the
image.
View Replies
View Related
I originally believe this was a database issue untill I tried to run this using just pure forms.
Issue. I have a form (basic form) and at one of the steps.. the user inputs an article name (and in this case.. there is a set of doublequotes used in this name).
I used the name ( In "Search" of the three Ethical Reviews )
<input type="text" name="Article">
Now I filled in the rest of the data Including a large section with just paragraphs of text that includes quotations marks, slashes, etc etc.
I click the submit button which Transfers all this information into a review page. The review page is another asp page that merely drags all the info from the last page and displays it on the screen for re-editing. Example Code:
View Replies
View Related
what is the easiest way to display Yes/No, True/Falst, On/Off MS Access fields as check marks on an ASP page? it would be either checked or unchecked.
View Replies
View Related
can anyone tell me difference between environment variables and server variables.
View Replies
View Related
I'm not sure how to best describe my problem, so a simple example should help explain things:
I have two arrays, called set1_data and set2_data
if I create a variable like so:
firstPart = "set1"
and then assign like this:
copyOfArray = firstPart & "_data"
how do I make copyOfArray reference the set1_array, as opposed to just a string "set1_array" which is what it's doing?
I've had a good rummage round ye olde Internet but couldn't find anything there must be a keyword or function to achieve this?!?
View Replies
View Related
I am trying to build a web based database using Access and ASP. I can retreive data form the database in a web page. I can send data from one page to another. However, I am stuck trying to figure out how to make the data variable. I would like the second page to display only data the user selected from a drop down list in the previous web page. I tried using the WHERE function and replace the hard coded information with a variable, but it isn't accepting the code. Could someone please help with this? I have research mulitple sites and can't find this particular piece of code or in tutorials. I must be missing something because seems like it would be basic stuff.
View Replies
View Related
I'm trying to reference a username variable that is saved after the user
logs in. I can reference it using $(Username) in standard html parts of the
page but how do i use it in the script sections enclosed with <% %>
View Replies
View Related
How can I get the value of a variable set in ASP from
inside vbscript tags. Here an exampleCode:
<%
Dim x
x = "something"
%>
<script language=vbscript>
msgbox(x)
</script>
I need to display the variable in a msgbox but can within
ASP.
View Replies
View Related
on the page.asp it searches the database for the specific record with id=3.
now i cant use : variable = Request.Form("id"), because the information does not come from a form, and request.querystring doesn't want to work either.
View Replies
View Related
I am new to asp and have tried a few things and cannot get it to work. I thought this code:
<input type="hidden" name="x_cust_id" value="<%= x_email %>">
would work for making the x_cust_id value equal what was put in the x_email field - but that doesnt work - any idea what Im doing wrong.
View Replies
View Related
I have a webpage with a list of items with checkboxes and a submit button. On the click of the submit button, I call a vbscript that loops through the items and put the values of the checked items in an array or string, and then jump to a new page.
Now I either want to send this variable to the new page, or I want to save the values to a mySQL database table, so I can use the values on the new page.
It seems I can't use session variables (session.contents) for this because that's server-side only.
View Replies
View Related
how can we use variables in sql statements
View Replies
View Related
Does anyone know how to get a variable to transfer from ASP.NET to an ASP page?
View Replies
View Related
Is there any way to get input boxes by thier id rather than
thier name? (Request.Form("elementname")) I don't want to
have to give every box its own id and name when they are just
going to be the same.
View Replies
View Related