I want to make it so that when the user is looking at a rendered ASP page
and they hit the ENTER key, one of the buttons on the form gets "clicked".
In other words I want for the user to not have to click on the button, and
just hit ENTER instead. How do I specify the button?
On an aspx page, I notice when the page opens there is no default command button (press enter & nothing happens). However, once I set the focus on a text field one of the command buttons becomes the default (press enter & the command button is executed). How do I define which button should be the default and can I change it depending on the text box I am in?
I have a form with two radio buttons, if a visitors check radio button 2 and click submit in the next page radio button 2 to be check by default
If I use this code:
<% If Request.Item("col")="firstcoll" Then Response.Write "Checked"%>
in .aspx page for example like that:
<input type="radio" name="col" value="firstcoll" <% If Request.Item("col")="firstcoll" Then Response.Write "Checked"%>> (I have try to omit the code and I have try <%@ but still the same)
it breaking the script and I'm getting error BC30800
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form to the web server, but regular button won't.
I have a problem that needs to pass HTML elements data back and forth in several ASP pages. I am using regular button to do that. But what's the approaches?
I'm using a binary stream to send down a file from the web server. I've been having trouble with IE and getting it to recognize my file. I've added the filename as a paramater(?filename=file.jpgw) to handle IE's mime type mangling, but I'm still having trouble with IE's default Save As Type being HTML. When we send down a jpgw (geo-jpeg) file IE wants to save it as an HTML file. I've got the correct filename showing in the Filename box, and if I choose the All Files option from the Save As Type drop down then the file is saved with the correct extension. I'd like to have the All Files option choosen by default. I know it's just a couple of clicks but we have some noivce users that can't seem to get that
I wrote an application that generates reports.It then presents a page where I click a button [javascript:print()] to open the print page. However, I have a fixed printer and would like to know how to print to the default printer without me clicking anything. So the page will just load up and print. Or when I click a button. I just don't want the select printer screen to pop up. Much similar to clicking the print button on top of the address bar in Internet Explorer.
my new site uses default.asp, instead of using index.asp. this is how my old site was done. now i get error 500. is this because it is trying to find index.asp or because my database isn;t workjing properly? i'm tired and being stupid i think. it's reall probably the database, but i just want to make sure in my sleep deprived state.
This is the code for a combo box, and I would like to make certain value the default value, so that appears unless users select somthing else.
call rs.Open("SELECT * FROM Trim.dbo.luDecisionMaker ORDER BY DecisionMakerName" _ , myCon)
do while not rs.EOF Response.Write("<OPTION value=" & rs("DecisionMakerID")) if rs("DecisionMakerID") = nDecisionMaker then Response.Write(" selected") end if Response.Write(">" & _ rs("DecisionMakerName") & "</OPTION>" & Chr(10)) rs.MoveNext loop
rs.Close
It comes from a table and has PropertyDetailsID(1,2,3,4) and PropertyDetailsname(Fee, 5,10,Other) and for example "Fee" needs to be the dafault value.
If a new user is added to the database through a webform, and they would usually have immediate access to member only services, is there a way to make them nonactive in a MS access db until an admin activates them?
I am wanting to compress/zip a file up on the server and email it. Is there a default component that should be installed on the server that will compress/zip files? If not is there FREE ones that anyone would suggest?
How do I make a value the default value for a combo box in ASP 3.0?
What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself, but not if I use it in a ASP 3.0 app.
The following code works fine for PC but not for MAC. It won't select the default image from the DB. When I check the DB there looks like there is Binary information there but nothing is displayed ....
I need a string of code that will allow me to eliminate,exclude,or ignore the default values that are sent in my web form.It is an order form that has hundreds of items.The items not selected show up looking like this in my email box.
and I have to sort through all of them to find the few selected.can any one tell me with some type of loop to eliminate the values returning 0 or 0.00.
i set up iis 5.0 on my local machine(win2kpro) (on a pvt LAN) at the default port. when i try to access asp it gives http 500 error. i have been able to configure cgi scripts but asp still doesnt work.
I have two drop down lists on one of my pages.One of the them lists all the MONTHS in a year, second one list a number of years starting for 2004. Users couldn't be bothered selecting that every time they are filling it in for submission, so they want me to popolute the two fields with the current month and the year automatically.
Plus the month has to be selected as a current month up to the 7th of every month,on the 7th it changes to the correct month. of basically if date is < 07/08/2004 = July.
I need to display (and use as a hidden field) the date on a page. How do I change if from MM/DD/YYYY (e.g. 12/25/2004) to 25/DEC/04 . I'm putting it into an Oracle date field and it doesn't like the date in the first format.
Is there available some list of COM components available to ASP pages, that are available on virtually every IIS machine?
I am wondering wether there is some right-away-available API with cryptogrphy functions. The particular function I need is MD5 hash estimation for files. I have one written in JScript, but it would be very slow for larger files.
Is it possible to reset a SQL field to it's default setting? For example, someone changes FIELD1 to "John Doe" and the the default is "YOUR NAME". Can I reset it back to "YOUR NAME" somehow?
I am getting the above error message on a non-default website. But, default.asp and other asp files work properly. There are few asp files which are residing on this non- default website created by our application folks, and it is not working.
Server Details Win2k SP4 IIS 5.0 URLSCAN is installed C2 Security Settings implemented on the server.
I got the following error when access an asp page.
Response object error 'ASP 0185 : 8002000e' Missing Default Property /downtime_category-old2.asp, line 0 A default property was not found for the object.
I have 3 text fields in an Access db with each some default values.
I have an edit page where user's can edit those fields. The problem am having is if for instance I empty the field in the edition page, since am not allowing null or empty in them, when I save of course I receive an error telling me that this field is not allowing empty value.
Now what I would like to be able to do is this, when I save I'll check If the request.form("thefield") is empty, if so then instead of saving the empty value I want to return to the default value set in the db.
I have setup an IIS 6 server and I am trying to migrate a pretty basic website to it. It will display any ASP page that I set as the default page, but gives a 404.2 for any other ASP pages that I link to.
All I want to do is set a session variable in my default page which points to a directory on my server where all media for my site is contained. Now, I used a session variable to do this, and fell into a trap. Say I set it up like this:
Session("mediadir")="D:dev<sitename>media". Now, when anyone looks at my site, the mediadir variable is trying to point to their d:dev.... What should I do. I know it is crazy, but I have mental blank.
I have a list box with a number of values (4) on a ASP form, the value is stored in a database field.
When a form to amend the record is loaded, I would like to display the list box with the currently held value as the seleceted item in the list box. e.g.
4 items in listbox A B C D
B selected and saved.
Amendment form displayed, List box contains A B C D, with B highlighted.
How do I display 'Please Select' as the default value my code is below.Code:
<option selected>Please select</option> <%SQLStmt = "SELECT magcode FROM Magazine ORDER BY Magcode" Set rsDistMags = Connection.Execute(SQLStmt) Do WHILE NOT rsDistMags.EOF%> <option value="<%=Trim(rsDistMags("magcode"))%>"<%If Request("magcode") = Trim(rsDistMags("magcode")) Then Response.Write " Selected" End If%>><%=Trim(rsDistMags("magcode"))%></option> <%rsDistMags.MoveNext Loop%> </select>
I'm migrating a system from a mssql to MySQL backend and just ran into problems with ASP's date format. Which is quite different from what MySQL expects to get for a datetime column. And there's calls to now() all over the place.
What I'd like to know is whether there's a way, and if there is what that way might be to change the date output format (DD-MM-YYYY HH:mm:ii) to match MySQL's expectations (YYYY-MM-DD HH:mm:ii).
i using the iis on my comp as a server.if i dun have a index.html or default.html page in my directory then when i enter //localhost then all files will be shown.now i put a index.html page inside the directory.. it will open up the index page when i enter localhost.i wan to link a page from the index.html page to the main login page.how do i do it?