Generate A Number
I want to prepopulate a ticket number in my form, like when user enters the form the field ticket Id should always be filled with a number. I want to start my number with 1000.
View RepliesI want to prepopulate a ticket number in my form, like when user enters the form the field ticket Id should always be filled with a number. I want to start my number with 1000.
View Repliesdo anybody know how to write a code to increment id number in the text field once the "New" button is clicked in the form. Code:
View Replies View RelatedI want to display a random banner from a selection of 5 banners. So if number = 1 then display baner 1 etc. My code is as follows:
bannerCount = bannerRecordSet.RecordCount
Dim bannerSelected
Randomize
bannerSelected = Int(Rnd * bannerCount)
The above code works although it never seems to generate the value 1, ie 2-5. Also when I refresh the page sometimes a random banner is displayed and other times I get an error. Is this because I am generating a value outside 1-5? Code:
I want a sample code for developing an " auto genearte number " and want to store in database.
View Replies View Relatedi trying to generate randomize number between in the range of 1 to 9999 using the below code. DNum* is between 1 - 9
RandValue = CLng((2^7*(ID1Num1))+(2^6*(ID1Num2))+(2^5*(ID1Num3 ))+(2^4*(ID1Num4))+(2^3*(ID1Num5))+(2^2*(ID1Num6)) +(2^1*(ID1Num7))+min1+min2+sec1+sec2)
then i put the randvalue where is usually generate number between 400-to-1500 into the below formula, any suggestion on how to improve the below code?
num_pmax = Int((9999 * Rnd) + 1)
num_pmin=1
value1 = Int((Num_pmax-Num_pmin+1)*Rnd+Num_pmin + RandValue)
I am creating a Change Management system and need my ASP script to be able to generate a number as an incident number for example for me automatically. The number would be stored in a MySQL database and the language I am using is ASP.
Can I create a column in the database that is a Primary Key and is auto_increment, even if I have already got another coulumn that is the ID column, which is a primary key?
I know this is not a php forum, but i've been given a task to create a form that requires a unique number every time the form is loaded. The form has been created but they have php on their site. windows would be in 3 weeks time but they want the form asap. The field is a hidden field since i've never looked at a php code page b4 i need some help.
View Replies View RelatedI need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?
View Replies View Relatedhere is the scenerio
in master batch table i have various master batch like
200701-0001
200701-0002
200701-0003
Now each master batch can have multiple final mixed batch like
200701-0001-01
200701-0001-02
200701-0001-03
and this record is inserted in to fmix table.
so i have a form in which i have a dropdown menu in which all the master batch is listed,
i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,
how to achieve this
so in short each master batch will have more than one final mixed batch.
pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.
I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.
How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?
how I generate a new XML file that I can then use with an XSLT file. I am trying to use an XML file generated from Microsoft Project or even better generate an XML file from the project file (MPP File) itself. Which I can then use with an XSLT file
I am new to XML and want to create a project viewer using XML, ASP and XHTML. I have an idea of how this should work but would really appritiate any help someone can offer. Is it possible to take an XML file and generate it in ASP without using an XSLT file??
I've been trying to Google this but have been getting far too many hits to be of use. Is there a slick way to generate a CSV or other Excel-friendly format and push it to the client? I'm using VBScript (and HTML and other typical stuff of course) on the ASP pages (no .NET stuff). Just a shove in the right direction is all I really need here.
View Replies View Relatedhow can i generate ID(automatically) when user press the "New Record" button in my registration pages.the ID will get from the existing database and start with C01234.let says the last id in database is C01234,then when the New Record is entered,then the id number will change to C01235.
View Replies View RelatedI noticed that PHP have the ability to create PDF files without using any third partty componentys. Most notably is via FPDF. It generates PDF by using "pdf markups" / or ghostscripts .
I believe the same can be done via ASP too. One has to use response.write pdf headers. Has anyone succeeded in doing that? I have the intention to go thru PHP's FPDF and try to convert that to VBScript.
I trying to generate a new XML file everytime a user post a value through a simple form.
The form has one textfield called "price" and I want to save a new XML file (rewriting the file if the case) using the value entered. I don't want to append the value. I saw many turorials, but none of them work for me, and everytime I try to edit them, nothing seems to work.
Can you tell me how to generate a GUID value in ASP?
View Replies View RelatedI want to create an Excel object from an ASP page. Basically, the input parameters to the Excel would be from the ASP. I know ASP and I know VBA, but I haven't used both of them together. Here's what I would like to do -
The ASP should generate an Excel report by passing 2 parameters to the Excel application (I have done this independently; without interfacing with ASP).
I know that I can create an excel handle from the ASP as -
Set MyExcel = Server.CreateObject("Excel.Application")
I dont know where the VBA code has to go? DO I have to include it in the ASP?
I have a web page using frameset split into few pages. And I want to generate one page of HTML code and send it through email. My question is have to generate a HTML page using asp?
View Replies View RelatedI want to be able to generate a date (day,month,year)
and add it to a DB so as to prove when a record was added(when a transaction was completed)I then want to delete a record automatically 1 day after the date was generated.
I have a form which contains drop down box with several available selections. Based on the users selection, I would like to have a popup box appear upon the form submission that gives them some additional information about their dropdown box selection. Is this possible?If so, how do I go about doing something like this?
View Replies View Relatedi have a long recordset that i want to page through. can sql pass back say, 5 records from 20 to 25 out of 1000?
i can then pass 2 variables between the pages to dynamically generate the sql and thus page through the results. can someone post up a simple example of this if its possible?
I have design a single row (which includes text box and combo box) with muptilpe columns. When user enters a one details (for example: employee id), the other boxes will be automatically be filled in with that employees details. This I can do. However, how if I want to add more rows (to get more than one employee's details)? I can add rows but then the previous info (say on row one) goes missing
View Replies View RelatedI've looked around for a good while trying to figure out how to do this... and I need your help.I have a web page that is dynamically generated and it display rows from a DB and the rows get to be in the 100s. I need to break it up into sections... but I'm not sure how to go about doing it.What I'm wanting is something like this:
<< Previous 1 | 2 | 3 | 4 Next >>
(kindof like what is at the bottom of the forums here)
I have two webpages main.asp with some codes and text.html I need joint
(insert) text into main.asp.
I forgotten instructions to insert first webpage into second. How I can do
it?
I need to create a table with 4 cols and X rows based on the number records
in my database. I dont know how this can be done, mabye with an array?
If I got for example 6 records in my database, a table with 4 cols and 2
rows should be generated, the last row will only have 2 cols with
information... Code:
currently, i export data from ASP to Excel. but i want to change it to RTF. i have looked at microsoft website and tried whay i have studied but failed to make it. at microsoft website, the table is created using rtf script but in my case, i just want to create it using html script.
and then, when user click PRINT button, i want my system shows the detail contents of rtf file and then open the Print window later. so user does not need to click File->Print and so on. is there any example script i can study?
I'm trying to generate three random different numbers to display three images on a page without repeating them. I can't seem to be able to get them to always be different. There's probably some simple solution, but I can't figure it out.
Here's my current code: ....
I am using the code below to create an excel document from data that is returned from an sql query. The formatting of the excel document is pretty and all is good unless I hit the back button and run my query a second time, or a third time (I haven't made it past 3
times). Basically what happens is every time I do this, excel does not close once I hit my back button. Does anyone have a solution to this problem? Another problem is that when I run the query it just opens excel within my browser, is there any way to make it ask if you want to save or open the file?
I basically throw this code at the top of the html doc: .....
i am developing asp project. database in ACCESS. i want to generate AUTOID when user submit the form. how can i do this?i mean, there is one field AutoId which increment by 1 , when user submit the form.
View Replies View RelatedThis is a strange request - but I'm trying to generate a Type Mismatch error. It's for an example in some documentation.I was looking for something that would error (like a mathematical equation using a string) that could be simply fixed using CInt(). However, the strings are getting converted at run time so I can't get the error to throw.
View Replies View Relatedif this is possible and what is the best method to do it? I have heard of website copier but they don't seem to work perfectly.
View Replies View Relatedin relation to creating word documents on the fly using asp.I am using SQL Server 2000 as my backend and want to create word documents containing the data i retrieve.
View Replies View Relatedhow to generate a text file with data from the db in asp and save that file in clients system.
View Replies View Related