|
I have an ASP web form that has a listbox (Project & Category) where I cannot use the letter shortcut keys (Project works, Category doesn't), yet others users accessing the same form can use the letter L, for example, to pick Larry from the list.
SheracK
Project: |
Select a Project
<% if not rstProject.EOF then
do until rstProject.EOF %>
">
<%= rstProject("project_name")%>
<% rstProject.MoveNext
loop
rstProject.MoveFirst
end if%>
| | | Category: |
Select a Category
<% if not rstOptList.EOF then
do until rstOptList.EOF %>
">
<%= rstOptList("option_name")%>
<% rstOptList.MoveNext
loop
rstOptList.MoveFirst
end if
%>
| Status: | |
|
|
|
|
|
I have the following situation. I have a web page called registration.asp. In it there is a province combo box. When the user selects a province, all the regions for that province is loaded into a region combo box. When the user selects a region, all the areas for that region is loaded into an area combo box. I do this by making a trip to the server, and posting the results back to the registration.asp page. This is done in my action="registration.asp". There is an onsubmit event in the form tag for whn everything is done and the submit button it clicked it does a form validation using javascript. If the validation is successful, then all the results must be posted to another page called RegistrationProcess.asp. Included in my code is the following.
This is included at the top of my registration page...
<%
Dim objForm
Dim intProvince: intProvince = 0 ' Value is set to 0 so that a blank region combo is loaded
Dim intRegion: intRegion = 0 ' Value is set to 0 so that a blank area combo is loaded
Dim intReferenceType, intSubscriptionType
Dim boolIsPost
boolIsPost = CBool(Request.Form("IsPost"))
If boolIsPost Then
' Get the numeric value of the selected index of the province combo
intProvince = CInt(Request.Form("province"))
' Regions and area should only load if a province is selected
If intProvince > 0 Then
intRegion = CInt(Request.Form("region"))
End If
End If
%>
Here is my javascript function that validates all the fields. When all is good, it must submit it to the RegistrationProcess.asp page. I'm not sure if this is the correct way to do it.
function checkForm(form) {
// Validation goes here...
// If all is good
return true;
}
Here is my form tag with the combo boxes. I have a function that automatically loads the combo box from the database. I have just included the province combo, the region and area combo looks exactly the same, they only differ in values.
Province:
None
Eastern Cape
Free State
Gauteng
KwaZulu Natal
Limpopo
Mpumalanga
North West Province
Northern Cape
Western Cape
Region:
' This how I populate my combos boxes using asp
Define SQL statement and open it
strSQL = "SELECT RegionID_PK, RegionName " & _
"FROM tblRegion " & _
"WHERE ProvinceID_FK = " & intProvince & " " & _
"ORDER BY RegionName;"
objRs.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly
' Create and instance of the form class
Set objForm = New Form
Response.Write objForm.GetList("frmAppReg", "region", objRs, 0, 1, intRegion, True, True, False)
Set objForm = Nothing
' Close the recordset
objRs.Close
CHEERS
BRENDAN
|
|
|
|
|
Hi Brendan,
When the validation has been successfully have't you tried setting the action property to the "RegistrationProcess.asp" that you want it sent to? e.g.
function checkForm(form)
{
if (form)
{
form.action = "RegistrationProcess.asp";
}
return true;
}
Hope this helps,
Andy
|
|
|
|
|
I am writing a web application using ASP.NET which includes a Windows Media Player object. However, my application only fully works if the client browser is IE and Windows Media Player 9 with latest update was installed (i.e WinMediaPlayer version 9.0.0.3128). If the Windows Media Player 9 was installed without the latest update, my web application only produces audio (without any video) when playing a video clip.
Can any one give the javascript code to force the client machine automatically download the latest Windows Media Player if it has wmp version 8 or older
and force to download the latest update automatically if it has wmp 9 (if it was installed without the latest update)?
I have had the javascript to detect which of Windows Media Player is currently installed in the client machine (from http://www.nwlink.com/~zachd/pss/pss.html).
|
|
|
|
|
My ASP.NET web applicaton includes a window media player (wmp) object. I'm using that wmp object to play a .wmv file in the network share folder.
something like
<object style="Z-INDEX: 0; LEFT: 0px; RIGHT: 0px; TOP: 0px; BOTTOM= 0px; WIDTH= 100%; HEIGHT= 100%" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="winMediaPlayer">
<param name="URL" value="\\192.168.100.100\sharefolder\video.wmv" />
Form1.winMediaPlayer.controls.stop();
However, since at the moment I can not include the username/password to access the folder in the url, Windows Media Player gives an error message
"Windows Media Player can not copy or play the file because the server denied access to it. Verify that you have access rights to the file, and then try again".
Note that no authentication window appeared so that I could authenticate. wmp simply gave the above error message. If I create a map network drive (using "net use z: path /user:username password"), the wmp has no problem playing the URL. This means the problem was caused by authentication.
Therefore I would like to have a JAVASCRIPT TO AUTHENTICATE THE CLIENT MACHINE TO THE NETWORK SHARED FOLDER (OR THE REMOTE COMPUTER) before the wmp plays the URL. Could anyone help me on that? Thanks.
|
|
|
|
|
I wonder why your question is being voted down?
Your situation isn't entirely clear, but if you have a folder containing media files intended for playing over the Internet using your web application, why not grant the IUSR_MACHINENAME account Read access to the folder? Better still, if the folder is a network share, create a group - MediaUsers - with permissions to access the folder, then add the IUSR account to the group. If you must limit access by username and password, use javascript to authenicate users for the application itself, but give the app access to the folder.
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
I need to create online interactive form, so that when visitors fill,
I can see what are they filling and guide them where-ever required.
In other words me and my visitor working on one form simultaneously.
Is this doable in PHP? Please guide...
|
|
|
|
|
Hi,
I just inherited code at my work which creats .asmx file on the fly. To make changes don't need to compile just stop iis make changes to XML file and when iis restart and by invoking web services it generates .asmx file.
My task was to add a method to that web service. I am able to see all my changes in web services ... logic is in store procedures that passed along with the other two required parameters.
I can invoke any other method from the webservice but the one I just created.. I can see the method description their... nothing is different in .asmx .... It asks for the parameters but when I invoke its gives me authentication fail error.
One more thing is... it's using SQLXML .... I m thinking t has to do with some sqlxml rights... but have no idea ... I m struggling from last 2 days... please.. Any help.. Any idea .. any suggestion are appreciated ...
thanks
|
|
|
|
|
Hi
Can someone suggest a tool that can measure time IE takes to download a URL and sub components (like GIFS, .js files in the url)?
We have a slow web application. We suspect it is on the client side javascript or how we have the client html structured. Just wondering whether there is any tool helping with this.
Appreciate ur help.
Thanks
Puri
|
|
|
|
|
I found one myself.
HttpWatch is good for this. It costs $195 for single user license. But I like it.
|
|
|
|
|
I need to connect to remout ftp server through local server.
My ftp client programmed on C in Unix...
|
|
|
|
|
I know there is an HTML tag (or header? Or something) that informs the server as to how often this page should refresh, and is used for caching and stuff. Basically, i want something in my HTML to tell the server, "Don't cache this! It is dynamic and will change."
Anyone know the particular tags to do this? Or do I need to explain myself more clearly? Thanks.
"Fish and guests stink in three days." - Benjamin Franlkin
|
|
|
|
|
Nevermind, I figured it out. (the "Expires" header.) Thanks!
"Fish and guests stink in three days." - Benjamin Franlkin
|
|
|
|
|
Hi there,
I have a way maybe help you :
you can add meta tag to html code of the page that you want it refresh
ex:
bye
|
|
|
|
|
Hi.
I have posted this question before, and I could not get an answer. I hope there is someone that can help me now.
I have an ASP page. The page consists of a province selection. If a selection is made, all regions for this province is loaded into a region combo box. I do this by making a trip to the server everytime and post the results back to the same page. The name of the page is AddProperty.asp. In the form tag, I use the following action="Addproperty.asp". This works cool. I also have an onSubmit event in the form tag for the user clicks on the submit button. It goes to a Javascript function which does the form validation. But now I need to go to another page to add the data, but I don't know how because the action property contains the name of the current page. How do I solve this problem? I would like to submit the page after validation to an AddPropertyProcess.asp page.
BRENDAN
|
|
|
|
|
My Code is
set rs=server.CreateObject("ADODB.Recordset")
set fso=server.createobject("Scripting.FileSystemObject")
if fso.FolderExists("F:\stores\") then
if fso.FileExists("F:\stores\RATEREV.TXT") then
set fout=fso.GetFile("F:\stores\RATEREV.TXT")
set fout=fso.OpenTextFile("F:\stores\RATEREV.TXT")
Response.Write "hello"
m=0
n=0
do while not fout.AtEndOfStream
n=n+1
m=m+1
i=0
LINE=fout.ReadLine
REC=split(LINE,"|",-1,1)
for each TMP in REC
COL(i)=TMP
i=i+1
next
inflds="insert into raterev ( mat_code_rev,rate_rev"
invals=" values('"&COL(0)&"'," &COL(1)
inflds=inflds & ")"
invals=invals & ")"
strSQL = inflds & invals
Response.Write "Qry : " & strsql
con.Execute strsql
LINE=""
if m=1000 then
Response.Write "No Of Records Inserted Is" & n & " "
m=0
end if
loop
Response.Write ("No Of Records Inserted Is") & n
Response.Flush
fout.close
set fout=nothing
Set fso=nothing
else
Response.Write "FILE NOT EXIST .... PLEASE CHECK.."
end if
else
Response.Write "FOLDER DOES NOT EXIST ... PLEASE CHECK...."
end if
Even after norton antivirus script blocking is switched off problem continous. But same code was working well previously. Now only this happening. Kindly help whether the problem is with IIS or Windows. Kindly help me.
|
|
|
|
|
Ok, this is quite a simple question.
I'm changing my website to use CSS. And i thought hey, how about allowing the CSS to control my tables as well.
So if we have a table, which the code looks like:
and we want to apply the CSS style to it.
Do i have to create a style for everything, hence
Table, tr and td. Because that is what i am doing, and it seams a little tedious.. hence it becomes
Is there a simplier way, so I don't have to apply the class to literally everything seperately
---
Peter M
|
|
|
|
|
Yes. When you specify that will work for your entire table.
But when you want to use a different style for some cells you will have to specify tag in your style sheet. Then every | would take that style.
like:
td {
color: #FF0000;
}
And yes this was a really simple question, CAUSE I WAS ABLE TO ANSWER IT.
Any tool is only as good as you can use it!!
(http://www.pascalnet.tk) |
|
|
|
|
|
Peter:
You can apply style to a table as a whole, or to the rows, or to the cells. If you use the html attributes, you can individually apply style how you want. If you are using css styles then rules such as these:
table{}
tr{}
td{}
apply styles that apply to the whole table, all rows, and all cells. If you want to have independent control you may use as shown in the next block of formatting:
[cut and paste in notepade and save with htm or html extension and open it in IE or Netscape..
-------------------
<STYLE TYPE="TEXT/CSS">
table{background-color:gold}
.firstrow{background-color:pink}
.lastcell{background-color:magenta}
</STYLE>
<BODY>
<table border="1" width="200">
<tr class="firstrow">
<td>Jay </td>
<td>Krish</td>
</tr>
<tr>
<td>Mysorian </td>
<td class="lastcell"> India</td>
</tr>
</table>
----------------------
|
|
|
|
|
I have a problem opening a window in javascript. I user availHeight and availWidth to open the window, but if the user has moved the taskbar the window may be positioned under it. IE doens't support availLeft or availTop or outerHeight.
Does anyone know how to to determine the taskbar position using javascript and ie?
thanks, kevin
|
|
|
|
|
Hi.
I'm thinking about doing a component that calls a webservice to get xml, applies a XSL to it and renders out HTML.
I have an example now that works. not too hard really.
Now I want to be able to let the user provide a xsl to use. This also works fine.
To make it truly reusable i also want to let the use enter the url of a webservice to call and the webservice method to use.
Now, how the h... do I accomplish this? I really have no idea...
|
|
|
|
|
found a solution here:
http://www.c-sharpcorner.com/Code/2004/Feb/GenericWebServiceProxy.asp
|
|
|
|
|
Hello Freinds,
I need to know about availablity of MS XML Parser. I'm developing a 3-tier web application using ASP.NET & C#. This web application is targetted to run on MS platforms. To achieve high reusability i've choosen to use XML strings as communication medium between presentation and business layer. I've written javascript code which parses and renders XML Data to screen. For this purpose i need MS XML Parser at every client machine.
Query 1: MS IE 5.0 and greater can render XML. Can i expect that every client machine running MS IE and greater will have MS XML parser installed irrespective of which MS OS the machine is running ??
Query 2: Is there any other optimal solution ??
Thanks in advance,
Regards,
Hatim Ali.
|
|
|
|
|
1) I think that is a valid assumption
2) Do the parsing of XML into HTML at the server, where you know what is installed. Use CSS to control the layout of the pages.
As a fun project for exploring what can be done with XML and JavaScript, what you have done is great. I'm even impressed with what you were able to do with Javascript.
However, if a member of my programming team presented this structure to me as a valid way of doing things for an actual application, I would send them back to the drawing board.
(The .aspx page is designed to be the presentation. The code-behind the ASP.NET page is for tying your presentation to your business logic. JavaScript is for working around the limitations of HTML and CSS. Web browsers are designed to handle HTML, and anything else will only work some of the time on some of the browsers).
my blog
|
|
|
|
|
Thanks Steve.
Lets say i want to avoid excess server calls by embedding client side scripts into .aspx pages. Obviously for this purpose i've to fetch data, redner it on screen (client side code), moniter the changes made by user(client side code) and then posting data back for making the changes persistant.
Do you know how to achieve this if i choose to adhere to your suggestion.
Regards,
Hatim Ali.
|
|
|
|