I have a textbox that will have this kind of value. eg. 1+1, 1+2, 1 +2, 1 + 2.....
So now i need to get the 1 and 2 to add it up. This textbox is for add function.
Before this i using the Mid Function. But this is only work if they entered btwn 1 - 9. If 10 then unable to find it.
I remember there is a function where it will find the value then stop at there. then i only grab the bfore the value. I try to lookup but i can't find the function. I need to get the value bfore + and after + to add it up.
I am trying to loop around a split and the code I have is below:
response.Write("<tr>") response.Write("<td class=""tableHeader"" valign=""top"">Keywords</td>") keywordsSplits = Split (keywords, ", ") For each keywordsSplit in keywordsSplits response.Write("<td>") response.Write(keywordsSplit) response.Write("</td>") Next response.Write("</tr>")
The problem is that it does actually put the seperate keywords into seperate cells (td's) I get the following:
I'm using the split function to split forename and surname, but sometimes there is no second name, is there any way of doing a check to see if there is a second part in the array?
this is the split:- WordArray = Split(strUsername, " ")
Basically I am using XMLHTTP to pull a file ( template ) then I am using replace to replace tags i.e. [code] with a HTML equiv.
So now I need to know how I can split [Menu|http://localhost/root3/cgi-bin/templates/menu.asp?Top] so that I can use XMLHTTP to pull that file and output it as HTML.
I know how to split a string, but I can't call this [Menu|http://localhost/root3/cgi-bin/templates/menu.asp?Top] as a variable as it can change at any time.
p.s I mean how Sitepoint does the url replacement, it will have a replace function that will first search for URL and then convert what ever is after the = into a url, then what ever is after that as the name.
[-URL=http://]test[/-URL] ( I put -'s in to stop the replacement )
I have a multiple select drop down. It will load into it the following information: Student ID, Last Name, First Name
There will be another drop down box that loads with classes, only this is not a multiple select.
I need the user to be able to select all students they need from the first drop down and then select the class they want to insert them into. Then, when they hit the button, it will break up the data from the first, Student ID, Last Name, First Name and insert those three things into the database under those respective column names.
Does anybody know how I can split these up properly when there will be multiple students selected, or does anybody have a better way of doing this?
I am having trouble loading the result of a VBscript split function into an array. The script is supposed to take the user's login name (the form for this is name separated by underscores such as john_foo or lisa_wilson), split it at the underscores, and load first, middle and last name into an array. The problem I keep getting though, is that I am getting a type mismatch error. Here is the code:
<%dim LogName, NameArray(), FirstName, LastName, MiddleName, LastPage 'Get NT authorized login info LogName = request.servervariables("logon_user") NameArray = Split(LogName, "_") for x = 0 to UBound(NameArray) response.write NameArray(x) & "<br>" next %>
The FirstName, MiddleName, LastName vars are supposed to take the array values later.
I am trying to split a mgrgroup field to extract the MD codes. It correctly grabs the MD codes if all records in a mass update are updated, but if only one record in the loop is updated then it puts the last 5 digits of the mgr name in the MD field.
I am using the following code to split/join values in a multi-select field. It is combining all the values in All the records into one long string in each record in recordset.
Example: I have a recordset with 2 records. The 1st contains the split/joined values: Alan Smir, Jeff Karl The 2nd contains the value: Keith Robb
When it updates database, it will put Alan Smir, Jeff Karl, Keith Robb into each record in the recordset. Instead it should be putting Alan Smir, Jeff Karl into the 1st record and Keith Robb into the 2nd record in the recordset.
One of my fields is the customer's social security number, all originally entered as a 9-character string. How can I split and display that into 3-2-4 format?
What I need to do is get the content of a text file, one line at a time, and break it up using , as a delimiter.
So far I can open the file and print out all the content, but all I am getting is a million ???????'s on the screen, and not the file. Here is what I am using: Code:
I have a section where users can add their 'favourite venues' to a list. This is stored in a column in the users table, for example:
10,8,1,18,26
On the user area I can do a select drop-down with all their favourite venues easy.
When I try to use the same (slightly modified) code on the venue detail page to determine whether the user has the venue in their favourite to link either to ADD venue (not currently a fave) or REMOVE venue (already on the faves list) it only recognises the last added venue, i.e. (working on the list above) venue #26.
I am looking for a function to split my string into subsequent parts. I am having a textbox from where user can enter more then one numbers (23, 456, 89, 394 etc), and now I want to write a function which return this sting into this fashion i.e.
i am trying to split an email address into a string.Basically, what i wanna do is take the first part of the email just before the "@" symbol and insert it into the database. How can I do this using asp?
The number '60' can be written as (50+10) or (25+35) or (15+45) or (7+53) etc... but I want the output as (50+10) only when 60 is typed in a textbox & the Form is submitted. How do I do this?