|
Probably only through an ActiveX container.
regards,
Paul Watson
Bluegrass
South Africa
Christopher Duncan wrote:
"I always knew that somewhere deep inside that likable, Save the Whales kinda guy there lurked the heart of a troublemaker..."
Crikey! ain't life grand?
|
|
|
|
|
Hi,
I am trying to write a script that will take an input field value from a ASP.NET form and determine if its magnetic data from a magstrip on a credit card. The application is written in C# and uses Server Validation controls to validate the data. The controls need to run server side because when the SUBMIT button is pushed the server needs to validate the data.
I do not want to send the data when the Credit Card Number field looses focus to the server, it is disruptive to the user but I need to determine if the card was swipped and if so pull off the Card Number, Card Holder's Name and the Expiration Date and populate the fields.
Since I'm new to JavaScript, I figured I would write something simple and hook it to my code for OnTextChange. The problem is I'm receiving the following error: Compiler Error Message: CS0117: 'ASP.WebForm1_aspx' does not contain a definition for 'isScanned'
I put my JavaScript in the head section as follows:
<HEAD><br />
<title>Merchant Charge Plus / 2004 Web - Authorization Screen</title><br />
<meta content="False" name="vs_snapToGrid"><br />
<meta content="True" name="vs_showGrid"><br />
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"><br />
<meta content="C#" name="CODE_LANGUAGE"><br />
<meta content="JavaScript" name="vs_defaultClientScript"><br />
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"><br />
<br />
<script language="javascript"><br />
function isScanned( )<br />
{<br />
var index = 0;<br />
CardNo = document.Form1.efCardNo.value;<br />
<br />
if (CardNo.subString(0, 2) == "%b" || CardNo.subString(0, 2) == "%B" <br />
|| CardNo.subString(0, 2) == "%a" || CardNo.subString(0, 2) == "%A")<br />
{<br />
window.alert("Card was scanned");<br />
}<br />
<br />
return;<br />
}<br />
</script><br />
</HEAD>
and the call for the routine is:
<br />
asp:TextBox id="efCardNo" style="Z-INDEX: 112; LEFT: 152px; POSITION: absolute; TOP: 67px" tabIndex="3" OnTextChanged="isScanned" runat="server" ToolTip="Enter the Card Holder's name as it appears on the card" Width="193"<br />
I don't see what I did wrong, I see the function. Is it because of the runat="server" and it thinks the function is on the server? If so, how do I have a client side routine and a server side?
Thanks for your help,
Glenn
|
|
|
|
|
OnTextChanged is the server side event, where as you have written the a client side event handler.
Try adding the attribute onchange="isScanned();"
which should be the client side event for a text field.
|
|
|
|
|
Hello,
I am trying to get my site to recognize Safari 1.2 as a legitimate browser. I am using the browsercaps in machine.config to test browser versions. The problem is that the site works on Safari 1.0 but not on 1.2 and I don't know why. Below is the browsercap for 1.0, what is it missing for 1.2?
Thanks in advance!
Nadya
<case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))">
browser=AppleWebKit
version=${version}
majorversion=${major}
minorversion=0.${minor}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))( \(KHTML, like Gecko\) )?(?'type'[^/\d]*)/.*$">
type=${type}
|
|
|
|
|
Image copier is the best image tool in the world developed for artists, programmers and normal users, such as company managers, office staffs.
the software contains over 5,000 images (32x32 and 16x16 pixels).
Each image is in six different styles, so totally the software equals to contain over 30,000 images.
Images can be copied to clipboard for pasting by other applications (such as Photo-shop, Corel-draw).
Images also can be saved as files (gif, jpeg, bitmap etc).
All images can be resampled from 1x1 to 96x96 pixels.
Those images are classified as different categories, such as people, animal, system, equipment ...
don't miss it!
You can download from here
Thank you
includeh10
|
|
|
|
|
In my FirstPage (HTML or ASP) I use the following code to jump to next page
<br />
<script><br />
window.open('NextPage.asp', 'PageName', 'toolbar=yes,location=no,directories=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes')<br />
</script><br />
However after jumping to next page, my FirstPage stays there and if someone using it ... it does not work properly!
Does anyone knows how to close it without affecting the jump? If I use command window.close at the end ... every thing close!
Thanks
|
|
|
|
|
You don't need to open up a new web page. Just use document.location = "NextPage.asp";
|
|
|
|
|
We have an ASP the creates an instance of a COM object (written in VB), and
invokes methods on that object. Some of these methods make calls on other
Win32 dlls (i.e., not COM objects).
When we attempt to run the ASP in PWS, we get the error :
File not found : xxxxxxx.dll
(where xxxxxxx.dll is the name of the Win32 dll).
This dll resides in \winnt\system32 folder - can anyone suggest why it can't be found ?
I have tried moving the DLL to other locations in the path as well as playing around with permissions on the DLL.. but so far no luck..
Many thanks,
Jason Jefferies
|
|
|
|
|
Your DLL depends on another DLL which is not installed in system32. There is a nice program Depends.exe which show you the dependencies of your DLL.
Dr. Joe
|
|
|
|
|
Hello all,
I have a need to change the visiblity of the bottom border of a table cell (td) dynamically (I have given my table cell an id). If you click on a botton, then the bottom border of the table cell disappears, If you click on a different button, then the bottom border of the table cell is replaced. Right now I have 2 classes set up using CSS. I simply change the class of the table cell (td) when the button is clicked. This all works fine in IE, but will not work in Netscape 6 (haven't tested in previous versions). I have even tried JavaScript to change the property, but no luck.
I tried classes like these, trying several different combinations:
.withBorder {
border-bottom-width: 1px;
border-bottom: 1px solid #000000;
}
.noBorder {
border-bottom-width: 0px;
border-bottom: 0px;
border-bottom-style: none;
}
I have tried to set this property via JavaScript with no luck:
document.getElementById(obj).borderBottom="0px";
document.getElementById(obj).borderBottomWidth="0px";
Thanks
|
|
|
|
|
I have the following declariation of how my error textarea element should look. It works only correct in Netscape Navigator. But the text color in Internet Explorer is not red. What is the problem, and how do I change it? This is how I declared it in my .css file:
TEXTAREA.ErrorTextArea {
font-family: Verdana, Geneva, Arial, helvetica, sans-serif;
font-size: 10px;
color: #FF0000;
background-color: #FFFFFF;
border-top: #FF0000 1px solid;
border-bottom: #FF0000 1px solid;
border-left: #FF0000 1px solid;
border-right: #FF0000 1px solid;
padding-left: 5px;
pading-top: 5px;
}
|
|
|
|
|
If have a section of code in my AgencyRegistrationProcess.asp page.
It does 3 additions to the database after one another.
It adds agency data to the agency table.
Then it adds the agent data to the agent table.
Then it adds the subscription data to the subscription table.
I have an error test on this that when there is a violation of the primary key then it will complain. I am doing this test on all 3 tables. Now, lets say the agency data is added to the agency table, and for some or other reason the agent and subscription details are already in the database. This will cause an error because of a primary key violation. Now how do I go one step back and delete the data that was entered into agency table. Data should only be entered if all three of them are valid.
Thanks
Brendan
|
|
|
|
|
I have a province combo, and a region combo, and an area combo. When a user selects a province, all the regions for that province must load. When the user selects a region, all the areas for that region must load. This works well. But my problem comes now. Once you have chosen the province, the region, and the area, select a different province. The new regions should load for that province, and because no region has been selected at this stage, there should be nothing loaded in the area combo. I do not know how to code this. I have been struggling and debugging for some time now. Nothing seems to work. The only way that I can get this right is if I do it in JavaScript. I want it done in ASP.
Here is my ASP code which is at the top of the page:
<%
'------------------------------------------------------------------------------------
' Variable declaration
'------------------------------------------------------------------------------------
Dim objForm
Dim intProvince: intProvince = 0 ' Default value
Dim intRegion: intRegion = 0 ' Default value
Dim intArea: intArea = 0 ' Default value
Dim boolIsPost
Dim intReferenceType, intSubscriptionType
' Connection and recordset variables goes here...
'------------------------------------------------------------------------------------
' Determine whether post is successful
'------------------------------------------------------------------------------------
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"))
Else
intRegion = 0
End If
If CInt(Request.Form("region")) > 0 Then
intArea = CInt(Request.Form("area"))
Else
intArea = 0
End If
End If
'intArea = CInt(Request.Form("area"))
intReferenceType = CInt(Request.Form("cmbReferenceType"))
intSubscriptionType = CInt(Request.Form("cmbSubscriptionType"))
%>
The code that I have in my to load each combo is below. I have a function that loads the combo depending on the parameters:
Province combo:
<%
' Define SQL statement and open it
strSQL = "SELECT ProvinceID_PK, ProvinceName " & _
"FROM tblProvince " & _
"ORDER BY ProvinceName;"
objRs.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly
' Create and instance of the form class
Set objForm = New Form
Response.Write objForm.GetList("frmAgencyReg", "province", objRs, 0, 1, intProvince, True, True, False)
Set objForm = Nothing
' Close the recordset
objRs.Close
%>
Info »
Region combo:
<%
' 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("frmAgencyReg", "region", objRs, 0, 1, intRegion, True, True, False)
Set objForm = Nothing
' Close the recordset
objRs.Close
%>
Info »
Area combo:
<%
' Define SQL statement and open it
strSQL = "SELECT AreaID_PK, AreaName " & _
"FROM tblArea " & _
"WHERE RegionID_FK = " & intRegion & " " & _
"ORDER BY AreaName;"
objRs.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly
' Create and instance of the form class
Set objForm = New Form
Response.Write objForm.GetList("frmAgencyReg", "area", objRs, 0, 1, intArea, True, False, False)
Set objForm = Nothing
' Close the recordset
objRs.Close
%>
Info »
Because I have a Request.Form for each field to retain the values when the page makes a trip to the server. How do I clear all the values when the page is refreshed?
This doesn't make much sense, so I am willing to send my files if requested.
I require help!!!
Thanks
Brendan
|
|
|
|
|
I use the vbTab string constant in a element. The data is tabbed correctly in Internet Explorer, but it does not display correct in Netscape Navigator. How do I correct this? Below is how my data is displayed:
Internet Explorer:
Name: [put your name and surname here]
Telephone: [put dialimg code and contact number here]
E-mail: [put e-mail address here]
Netscape Navigator:
Name: [put your name and surname here]
Telephone: [put dialimg code and contact number here]
E-mail: [put e-mail address here]
Below is how I write my text to the <textarea> element:
Response.Write("Name:" & Chr(9) & Chr(9) & "[put your name and surname here]" & Chr(10) & Chr(10))
Response.Write("Telephone:" & Chr(9) & "[put dialimg code and contact number here]" & Chr(10) & Chr(10))
Response.Write("E-mail:" & Chr(9) & Chr(9) & "[put e-mail address here]")
I hope some can look into this for me.
Thanks
Brendan
|
|
|
|
|
Where can I find more info on the RegExp object? I need it to check my data and confirm whether a URL is valid or not.
|
|
|
|
|
I found the following code with regards to e-mail validation. I don't really understand what is going on here. Is this a safe way of validating? Where can I find more about this topic? Also, I need to validate a URL. How will it differ from e-mail validating? Here is the code I found for validating an e-mail field:
function isValidEmail(email)
{
var validFormatRegExp = /^\w(\.?\w)*@\w(\.?[-\w])*\.([a-z]{3}(\.[a-z]{2})?|[a-z]{2}(\.[a-z]{2})?)$/i
var isValid = validFormatRegExp.test(email);
return (isValid);
}
|
|
|
|
|
I'm not good with regular expressions, but I would suggest you read up on them. This code validates the email address using a regular expression.
Glenn
|
|
|
|
|
Hi
my problem is that I need to use certificates that use different key stores as the ones that are built into windows. I have tried with little success to still use CAPICOM. My question is this - does anyone know about a good alternative when it comes to working with certificates and keystores or am I missing something with regards to CAPICOM?
thanks in advance
Gavin Jeffrey
|
|
|
|
|
hi code guys!
I wana access all the contents from loaded page in my app having Web Browser Control frame by frame.
pls tell me how to get the total frames in my app. and also how to access contents of frames.
thanks!!
|
|
|
|
|
When you save a web page[ for example http://www.microsfot.com/China] to your favorites folder, you will be saving it as a short cut with a descriptive name which goes into a folder in your computer. The format of this will be generally *.url. Now is there a way to get the original string [http://www.microsoct.com/China] from the *url [aliased] file name programmatically.
|
|
|
|
|
It's just a text file. Drop it inot notepad to see the format and you can the parse it in your own code to get the url you need.
|
|
|
|
|
this table fails to resolve properly with IE. THe top left cell is the problem -
http://mule.med.harvard.edu/test.html
here is the code:
<table width="643" height="493" border="1" cellpadding="2" cellspacing="5">
<tr>
<td width="321" height="25" bgcolor="#CCCCCC">321x25</td>
<td width="321" height="241" rowspan="2">321x241</td>
</tr>
<tr>
<td height="318" rowspan="3">321x318</td>
</tr>
<tr>
<td height="25" class="style8">321x25</td>
</tr>
<tr>
<td height="26" bgcolor="#CCCCCC" class="style7">321x25</td>
</tr>
<tr>
<td height="25" bgcolor="#CCCCCC" class="style8"><span class="style7">321x25</span></td>
<td height="202" rowspan="6">321x202</td>
</tr>
<tr>
<td height="25" bgcolor="#CCCCCC" class="style8"><span class="style7">321x25</span></td>
</tr>
<tr>
<td height="25" bgcolor="#CCCCCC" class="style8"><span class="style7">321x25</span></td>
</tr>
<tr>
<td height="25" bgcolor="#CCCCCC" class="style8"><span class="style7">321x25</span></td>
</tr>
<tr>
<td height="25" bgcolor="#CCCCCC" class="style8"><span class="style7">321x25</span></td>
</tr>
<tr>
<td height="25" bgcolor="#CCCCCC" class="style8"><span class="style7">321x25</span></td>
</tr>
</table>
end code
any idea why? It works in mozilla/firefox...
|
|
|
|
|
Whenever there is code that can be interpreted differently by two browsers, it will probably happen.
In this case, you have given the browser the task of taking something of height 343 on the LHS, and told it that it must be the same height as the RHS, which is 391.
Mozilla took one approach, which was to render the LHS correctly, and the top RHS cell incorrectly. IE took another approach, and appears to apply the cell heights proportionally. Go figure.
my blog
|
|
|
|
|
Hello,
currently I'm fighting with the problem of making ISAPI URL filter for guarding unauthorized access to the files stored in the ASP.NET site (not .aspx files). I tried to use the temporary cookie for listing the folders you could access. I access the cookie info through ALL_RAW server variable. It works well on my computer (IIS 5.0), however the solution does not work on my coleguage's XP machine (IIS 5.1). Whereas on my computer the ALL_RAW contains the asp session cookie, the asp webforms authorization ticket cookie and the special cookie with the list of directories user is authorized to access, on his computer I lack a them. The HTTP_REFERER variable is empty on his computer too.
The filter is normal ISAPI filter and the code takes effect only inside of the ASP.NET application.
Does anyone any idea why it is so? Please help, any comments appreciated.
Thanks
Vasek
Vasek
VB6, C#, MS DNA, MS.NET
Software Developer
|
|
|
|
|
Greetings,
Has anyone attempted to read and write ini files using VBScript? Several possible methods come to mind. Before I head down the trial and error path I thought I would ask if anyone else has already found a solution.
TIA,
Steve
No matter where you go, there you are.
|
|
|
|
|