|
I have a logon page. I would like to automatically set focus on the user name text box. Any idea how to do it?
Here is the text box code:
<form id="login" method="post" runat="server"><asp:Table id="Table1" style="Z-INDEX: 101; LEFT: 45px; POSITION: absolute; TOP: 63px" runat="server" Width="181px" Height="95px"><asp:TableRow Font-Size="10pt" Font-Names="Verdana"><asp:TableCell Font-Bold="True" Text="Name:"></asp:TableCell>
<asp:TableCell><asp:TextBox runat="server" ID="tbName"></asp:TextBox></asp:TableCell></asp:TableRow>
The TextBox class doesn't seem to have a Focus() method.
Thanks for any assistance
|
|
|
|
|
The easiest way is to use the ONLOAD event of the BODY element. So body onload="document.txtTest.focus();"
ASP.NET rather strangely forgot to include a focus method for input fields. AFAIK there is a user control out there on the web you can download to get around this.
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Personally, I'm seeking a red-headed, double-breasted mattress thrasher
|
|
|
|
|
I have an HTML frameset page with 2 frames. In the left frame, I have a menu containing several buttons. For each button I have an "Onclick" event that calls the Javascript window.open() function. Basically, this function just loads the results of a Perl script (*.pl) into the right frame.
For example, the button to add a customer calls:
window.open("AddCustomerToDatabase.pl", "right frame");
I also have a "show all customers" button that loads another Perl script which will retrieve all customers from a database and display them in nice table on the screen. This script also loads into the right frame, replacing the existing content.
The problem I have is that I notice that the window.open() function does not load a FRESH page. (Evidently, I dont see the IE status/progress bar at the bottom showing any activity).
For example, first I click "show all customers" and I see a table with 4 customers. Then I click "add customer" which loads a form (into the same right frame) in which I fill out the new customer information, and then submit it. Then when I click "show all customers" again, I still see the same table with only 4 customers, and not 5. Only when I click IE's "refresh" button will the updated table be displayed. I am using MySQL database, and I am positive that the submitted customer info is updated in the database immediately when i clicked submit. (I have checked that).
I find it weird that window.open() doesnt load a fresh page each time. It only loads a fresh page during that page's first load. Can someone suggest me a way to force a fresh load each time?
I thought about using window.location = http://blahblahblah.pl, but then there is no way to specify the target frame. Please help. Thanks.
|
|
|
|
|
It sounds as if IE is caching the content from the first page displayed, and when subsequent actions request a page by the same name it serves up the cached copy, rather than generating a new one. I'm not sure how you would do so in a frameset, but try turning off caching, or expiring the display page immediately.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
You can append a unique parameter to the end of your query string to force the browser to load a new copy. This parameter will most likely be ignored by your script. Example:
var cURL = "AddCustomerToDatabase.pl";
var dDate = new Date();
cURL += "&RandomNumber=" + dDate.valueOf();
window.open(cURL, "right frame");
Although if working in an IE only environment, I prefer to call window.navigate() method of the frame that I want to load. Ex:
window.parent.frames[1].navigate(cURL);
onwards and upwards...
|
|
|
|
|
Thanks roger. Changing my IE browser's settings so that it checks for new versions of stored pages on every visit to the page did the job.
Thats a nice little trick, basementman. I'll remember it. And I might give it a try as well. Thanks.
|
|
|
|
|
Hey guys..its me again.
This time I was wondering if anyone knew how to add an icon to the explorer toolbar.
you know where the BACK, FOWARD, STOP, REFRESH, HOME, buttons are?? well..there are some programs like Messanger or Realplayer that add small icons after you instal their software on your PC...the thing is that I've seen some sites which do it via web. Ive seen it mostly with these ad sites...like the casino one...also...(and Im innocent until proven otherwise)...some porn sites do it too.
Does anyone know how its done....
Im asuming its some sort of auto-download but thats as far as I go.
thanks guys
talk soon.
Jon
X-ZD Designs
|
|
|
|
|
Does anyone know if it the Crystal Report Viever respond to events. For example, if the user clicks on a bar in my Crystal Report bar graph, I can respond to it in some manner?
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
Hi Everyone.
Please try my following link and understand the problem.
Here is my link file to register:
http://www.tuviglobal.com/dangki.html
After I registered and tried to login. Here is my link to login:
http://www.tuviglobal.com/login.html
Then it shows as such:
BEGIN
Load Class
driver
OK
select * from user where user_id ='michaeltran' and password = 'mt1961'
java.sql.SQLException: Before start of result set
I have a Database in MySQL. After I insert data into this, but I can't get Data from my code. Please help me. I am waiting to hear from you soon. Thanks a lot.
<br />
void setValue(HttpServletRequest req) { <br />
String query = ""; <br />
<br />
Connection con = null; <br />
Statement stmt; <br />
ResultSet rs; <br />
<br />
<br />
String DBUrl = "jdbc:mysql://localhost/MYDB"; <br />
String DBUserName = "USERNAME"; <br />
String DBPassword = "PASSWORD"; <br />
LogUser = req.getParameterValues("User")[0]; <br />
LogPass = req.getParameterValues("Pass")[0] <br />
<br />
Class.forName("org.gjt.mm.mysql.Driver"); <br />
con = DriverManager.getConnection(DBUrl, DBUserName , DBPassword); <br />
stmt = con.createStatement (); <br />
query = "select * from user where user_id =" + packString(LogUser) + " and password = " + packString(LogPass); <br />
rs = stmt.executeQuery(query); <br />
<br />
UserName = rs.getString("user_id");
Password = rs.getString("password");
} <br />
<br />
<br />
|
|
|
|
|
I dont think you will find any help here...
This is an ASP, HTML, JavaScript board...
try some java message boards on other web sites..
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
Hello All,
I recieved this information of a .NET service provider from another developer at the workplace.
It has integration capabilities with VS.NET.
http://www.discountasp.net/[^]
Running Windows Server 2003, IIS 6.0
Check it out
Tony
|
|
|
|
|
hello,
here is the scenario, for my problem.
how can i use IIS installed on another machine in a networked environment, i.e. IIS is not installed on my system.
i am just to create an asp.net application.
ASIM NAZIR
Asim
|
|
|
|
|
Asim,
If you are using Visual Studio.NET, you can simply create a New Project and set the location to the server running the instance of IIS.
Location: http://servername/WebProject1
If you are using a text editor like TextPad, and need to move the files, assign a share \\servername\sharename on the server running IIS, map to the shared resource, copy your files into the shared resource, create a vitual directory on the server running the instance of IIS, point the virtual directory to the shared folder.
HTH
Tony
|
|
|
|
|
Im using the file system object to delete files from the W2k server, and am running into the permission denied error.
Things Ive done/checked:
- Given full access to the IUSR user on the folder/files to delete
- Given full access to everyone on SCRRUN.DLL
- Rebooted several times just in case
- The file is not read only (and im using the force=true parameter anyway)
What else can I try???
|
|
|
|
|
Ned,
Where is this file located that you are trying to delete?
How are you accessing the file through FSO?
If possible, please post your code.
Tony
|
|
|
|
|
My asp code sits in C:\AC Projects\ISAS\Report Arch\RR which is setup as a virtual directory in IIS and the file to delete sits in C:\Temp\reports, both on the same machine.
The relevant code is:
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile "killme.txt", true
|
|
|
|
|
Ned,
Try changing the callout of FSO.
From:
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile "killme.txt", true
To:
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.DeleteFile "C:\Temp\reports\killme.txt", true
HTH
Tony
|
|
|
|
|
OK now i feel like the biggest idiot on the planet. I forgot to add the path!
Ive been trying to figure this out all day! Thanks for finding my stupid mistake
|
|
|
|
|
|
You could take this code and modify it to do that by creating 12 tables and removing the month combobox stuff:
http://test.pubsuite.com/calendar.htm[^]
NOTE: this was designed to be displayed as a popup, modal dialog...
onwards and upwards...
|
|
|
|
|
|
I cannot run any perl scripts. I am running Windows Server 2003 and I have downloaded and installed ActiveState Perl, and had all the application extension mappings (pl, plx) set during this installation. The script engines are correctly associated.
My Perl scripts and html files are located in d:\MyPerlProgram but are mapped to a Virtual Directory "MyPerlProg".
I made sure the Administrator, System and Users group have at least "Read/Execute" permissions for that virtual directory. Under Application Settings, the "Script and Executable" execute permissions are allowed.
I also made sure the Internet Guess Account (MyComp\IUSR_MyComp) has read and execute persmissions as well.
But nothing is working. I try to access my program using http://localhost/MyPerlProg/frameset.htm. (Note: frameset.htm has a frame for my *.pl script that should also be executed/loaded). But I keep getting a "Page Cannot Be Found" error.
However, when I go into Visual Studio .NET to edit this page (in the Design view), a "File Download" box pops up and asks if I want to Save or Open the *.pl script file. I dont know why it's like this.
Note that my perl scripts all work before on Windows 2000 Adv Server. However, in that configuration, I stuck all my Perl scripts in c:\inetpub\wwwroot\Scripts. And somehow IIS 5.0 knows how to execute stuff in that directory as scripts.
However, in windows server 2003, I dont see any default "Scripts" folder. Is there supposed to be one?
|
|
|
|
|
IN ADDITION...
What does "lock down" really mean in terms of IIS? Because right after I installed Windows Server 2003, I went into Control Panel to ADD/remove Windows components (specifically IIS with FrontPage extensions). I did all that before I installed ActiveState Perl. At this point, is it "unlocked" yet?
Well, assuming IIS is ready, I installed ActiveState to d:\Perl, and I let it automatically generate the IIS scripts.
After installation, I went into IIS to check. I right-clicked "Default Web Sites" and chose "Properties". On the "Home Directory" tab, under "Application Settings", I clicked "Configuration". Then, under the "Mappings" tab, I looked for the *.pl and *.plx extensions. Here's what I saw:
For *.pl, it points to d:\Perl\bin\Perl.exe "%s" %s (with Verbs: GET, HEAD, POST)
For *.plx, it points to d:\Perl\bin\Perlis.dll (with Verbs: GET, HEAD, POST)
Doesnt that mean the mappings are correct?
Then I made some more tweakings that I mentioned in the first post above. And after all that, I still get "Page Cannot Be Found" error.
NOTE: My frameset.htm has two frames. The left frame just contains an HTML file and this is displayed perfectly. The right frame is supposed execute a Perl CGI script (*.pl) and display the corresponding page. The "Page Cannot Be Found" error message is occuring in the right frame only.
|
|
|
|
|
OK. The problem is 50% solved. I found out that I needed to add a new Web Service Extension to IIS's list. I added "CGI Perl Scripts"and I assign the following "required files" to it:
1) d:\Perl\bin\perl.exe "s%" s%
2) d:\Perl\bin\perlis.dll
Now my *pl script executes and loads just how it's supposed to. However, that script has a Javascript code that upon a certain event (specifically, an onClick event for a drop down menu) reloads the script itself:
window.location = "http://localhost/MyPerlProg/MyScript.pl?hiddenField=" + selectedID;
This is where I get the "Page Cannot Be Found" error again.
What is wrong now?
|
|
|
|
|
Hi, I just finished reading http://www.codeproject.com/asp/indexserver.asp and have followed the article to the letter. How come I don't see the vPath property in the property-list in the Index Server consoll?
A.
|
|
|
|