Mandatory Field Function

I'm trying to make sure that the user inserts data in all necessary fields: for example first_name and last_name fields are mandatory. How can I create a function that will alert the user that these fields are mandatory?

View Replies


ADVERTISEMENT

Display VBScript Function As Text Field

I have a VBScript function:

<script language="VBScript" type="text/vbscript">
Function Main()
set wshshell = createobject("wscript.shell")
struser = wshShell.ExpandEnvironmentStrings("%USERNAME%")
strdomain = wshShell.ExpandEnvironmentStrings("%USERDOMAIN%")
msgbox struser & strdomain
End Function
</script>

That works great as a Active X script but I want this to display as a value in a text field and I can't find how o do that.

View Replies View Related

I Wan't Any Function To Update The Db Field When Checking A Check Box

is there any one know how to make function to update db field and to be called on checking a check books.

View Replies View Related

Using Vbscript "SPLIT" Function On Multi-select Field

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.

THIS IS THE CODE: ....

View Replies View Related

Using Vbscript "SPLIT" Function On Multi-select 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.

Does anyone see what is wrong with the code ....

View Replies View Related

LEFT JOIN On A Date Field And A Numerical Field - Using WHERE Clause

I am using a Relational database for my site and i have the following tables:

FIXTURES, GAMEDATES

the fields in FIXTURES are:

GameDate
Home
Away

(All of the above are numerical fields)

the fields in GAMEDATES are:

DateID(integer)
GameDate(#Date Field#)

What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)

The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:

WHERE Fixtures.GameDate<=(Date())

obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.

The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.

Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data

View Replies View Related

Difference Between Private Function And Public Function?

What's the difference between private and public functions in ASP? When should I use either?

View Replies View Related

Comparing Field Data From Previous Field

Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData

This will work when comparing other fields withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?

View Replies View Related

How Can I Add Mail Function To That Post Function

I am using a simple guestbook /portal and i want script to send mail to the thread owner when someone reply his message.

this is the send message code ....

View Replies View Related

Fill Field Based On Another Field

I have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.

I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.

I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).

View Replies View Related

Pass Hidden Form Field Value To Another Form Field To Insert In Db

I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.

(The hidden value (1 for example) would then automatically get passed to the
other input field.)

The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:

View Replies View Related

How Can I Change One Line Input Field Into Larger Input Field

I have being working with making an edit field over the past few days. The edit function is now working fine. The edit fields that i have are for id, subject, notes, timedate.

All of the edit screens are one line text screens. What I want to do now is increase the size of the notes box to a larger textarea type box to make it easier to edit notes. The notes field in the db is a textarea field. Code:

View Replies View Related

Function Inside A Function

Can I define a function inside a function. e.g;

function abc()
function xyz()
....some code.....
End Function
End Function

I googled this but can't find any related topic.

View Replies View Related

Function In The InStr Function

I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:

I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.

View Replies View Related

Automated "state" Field From "Country" Field

When you select the "Country" field in a Hotmail "get new account" link, the field "State" changes automatically, giving you the correct States that belongs to the chosen Country.

View Replies View Related

Request.Form("Field Name") Versus Request.QueryString("Field Name")

I want to know what's the differences between

Request.Form("Field Name") and
Request.QueryString("Field Name")

OR they function exactly the same, which is to return the value of the
field??

View Replies View Related

Asp Function

I am trying to call a function in asp to check to see if a varibale has a value stored in it if there is nothing wite the value NA into it. My code is

<%
Function NullValues(userField)
if userField = "" then userField = "NA"
end function

AccountNo = ""
Name = "sam clowes"
email = ""

AccountNo = (NullValues(AccountNo))
Name = (NullValues(Name))
email = (NullValues(email))

response.Write AccountNo & "<br>"
response.Write Name & "<br>"
response.Write email & "<br>"
%>

When I run this code ALL the variables are blank and nothing is output

View Replies View Related

XML/XSL & ASP Function

the function
<%
Dim objXML, objXSL

Function ShowXML(strXML,strStyleSheet)
Set objXML = CreateObject("MSXML.DOMDocument")
Set objXSL = CreateObject("MSXML.DOMDocument")
objXML.load(Server.MapPath(strXML))
objXSL.load(Server.MapPath(strStyleSheet))
Response.Write objXML.transformNode(objXSL)
Set objXML = Nothing
Set objXSL = Nothing
End Function
%>


calling the function in an asp file
<%Call ShowXML("http://msn.foxsports.com/feedout/syndicatedContent?categoryId=142","nhl/xsl/news/teamNews.xsl")%>


the errors
1. the http:// part
2. and the ? mark

the error message says that the path has been typed wrong.

View Replies View Related

Function

the user can key in variable A and B
then C is auto generated by C = A / B

so how and where should i write the C function??

View Replies View Related

XML Value Into ASP Function

Possibly a very simple question but how do I get a value out of an XML document so I can play with it in ASP

E.G: <Name>Tom</Name

How do I pull the work tom into asp

View Replies View Related

Now() Function

I am using the now() function to be displayed on an email after a form submission has been sent. The problem is that the server is not in the same timezone as I am for the result. How do I adjust the hours on the now() to allow for this please ?

View Replies View Related

Sub Or Function

I know the basic difference between a subroutine and a function is a
subroutine performs a task and a function performs a task and returns a
value. The Call keyword is required when using parens with subs with more
than 1 parameters. Parens around values passed are ByVal vs ByRef and is a
waste of processing if passed ByRef for no reason.
I am told there is no reason to ever use a subroutine as a function can be
used even if it doesn't return a value. While this appears to be true, is
there any reason why it's ever a bad idea to use a function, instead of a
subroutine, that doesn't return a value? Are there memory, performance,
etc. issues?

View Replies View Related

ASP Function

I am trying to locate information on how to call a sub within VBScript on an
ASP page but I can't locate generic information. What I want to do is
generate a page that will stay up but the information on it will change
based on a series of drop down boxes. I need the first drop down box to call
a second dropped down box based on the state that is chosen then city and so
on.

View Replies View Related

Asp Function

I have a column in the table which contains 2 full names seperated by "&" (e.g: Joe Smith & Jeff Scott) I want to display only the first names of the whole record in an asp page. Is there an asp function using which i can do this?

View Replies View Related

Mod Function

im using the mod function to create a calendar for me, which everything works perfectly, all is totally well with that!
but...when i use the mod function it churns out this loooooooooong string which is the whole table...
if there is some way that i can insert hard breaks IN THE CODE ITSELF.

View Replies View Related

NaN Function

I used to be quite an experienced ASP programmer but I haven't used it for a while

I’m trying to do something that I remember as very simple I'm trying to check that the value of a form text box is numerical using the isNaN function. The code I am using is:

<%
quantity = Request.Form("number1")

if isNaN(quantity) = true then
Response.Write "Your input was not a number"
else
Response.Write "Your input was a number"
end if
%>

All I get is a NaN type mismatch error.

View Replies View Related

Contains Function

Is there a function to check to see if a string contains a space
Thanks

View Replies View Related

Mid Function

I was just wondering when using the mid function how does the assigment work when the length is longer then string itself? For example

test = mid(12345, 1, 10)

What would be the end result of test?Would it be 0000012345 or 1234500000 or 12345?

View Replies View Related

Mid() Function

When I create a single character string

var str = "A"
'convert to ascii
num = asc(str)
Response.Write num ' 65 shows up
'when I have a whole string
str = "hello"
str = mid(str, 1, 1) ' return 'h'
num = asc(str)

'I get an error:

Invalid procedure call or argument:'asc'What can be done to fix this?

View Replies View Related

Use Asc() Function

I've an array to store alphabets, in my code...in a random order. How can i use the Asc() function to get the equivalent Ascii of each alaphabaet of that array....
whenever i use ,

for i = 0 to NoOfElements
Response.write Asc("ArrayName(i)")
next

it displays 65, "NOOfElements" times (ascii of A)...on the other hand..i can't write

Response.write Asc(ArrayName(i))

since this shows some error...How can i solve this?

View Replies View Related

Function To Be Available

Depending on some situations, I or the user, need to execute a function (e.g., login, sending email, etc...) and then continue from the original place. How can I make one function to be available from any page from my site?

View Replies View Related

Max() Function

I have a problem with max() function. The SQL is as follow SELECT max(group_no) as group_no FROM doc_groups. if I run the sql in MS SQL server, it will return correct result. However when I run in ASP file, there is no record return. I check with RecordCount property and it return -1.

View Replies View Related

PV Function In ASP

Does anyone know how to use the Excel PV Function in an asp page? Is it possible at all? I know how to use it in .Net but not in ASP.

View Replies View Related







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