|
It's all about the code that you use for the key press. It also matters if you're using FF or IE. I suggest googling, there are tons of examples on the web on how to do this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Instead of calling this method in keyup event, call it in keypress event
it will not allow to you enter anything except numbers.
Regards,
kr.sasi
|
|
|
|
|
Hi Guys,
Do you know how to use MIVA for cart? Is this a third party software and where can I get it for free?
hifiger2004
|
|
|
|
|
hifiger2004 wrote: Do you know how to use MIVA for cart?
You could ask them ?
hifiger2004 wrote: where can I get it for free?
If it's for sale, you can't legally get it for free. You'll get support if you buy it, too.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
I am using the JDBC datagrid, and it works fine. I am trying to design a site where on an initial summary page ( such as orderdetails.jsp ) in the example, a row can be highlighted and clicked on, which I can then take all of the data out of that row and call a second page such as orderdetail.jsp which would be a form, where the data for a row can be manipulated. I could store the data in a list. Can you let me know if this type of design is possible with this control ? even better if anyone has an example. Thank you
Terry
tleyden@imagine.ie
|
|
|
|
|
Hi,
I have an application where on a lot of my ASP.NET pages i need to add text boxes which collect First Name, last Name, Age, Company Name etc and has a button which when clicked enters the above mentioned data into the database.It needs to be entered to the same database table all the time.No, I cannot use session info. I wanna know if it is possible to create a custom web control which does this? So I can add it to my tool box and drag and drop onto my pages as and when I need it. I havent seen instances where you can create a control which does db operation. I know you can use User controls(.ascx) but that way, it needs to be included in every project and every one can see the code and know whatz happening behind it. Help is appreciated. Samples are appreciated even more!!!
Regards
RH
|
|
|
|
|
A control can do anything. It can contain event handlers, connect to the DB, anythign you like. Of course, it really shouldn't connect to the DB, it should call middle tier methods which in turn call your data layer to do that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am trying to use the SQLDataReader to read info from a database into text boxes for editing on a form. What is the best way to cast the data, some data is missing giving me "null" problems if I do a txtbox.text = dr(0), if I do a txtbox.text = dr(0).tostring I get the type in the text box if it is empty...
|
|
|
|
|
The SQLDataReader has numerous methods for retrieving database values according to their data type - eg, GetString, GetInt32 etc. Use these in conjunction with the more generic IsDbNull function to solve your problem.
cheers
Fred
|
|
|
|
|
Thanks, but how do I use the isDbNull function when retrieving data? do I do an if/then for each one?
|
|
|
|
|
Yes, for each one; eg:
if first field is an integer and the second a string, then:
if IsDbNull( dr.GetInt32(0) ) Then
' write "" string
else
' write CStr(dr.GetInt32(0))
end if
if IsDbNull( dr.GetString(1) ) Then
' write "" string
else
' write dr.GetString(1)
end if
You can also use GetValue(index) and cast that as you like (good for date fields)
cheers
F
|
|
|
|
|
Greetings -
I'm a GIS specialist having to code a front end to a GIS application, and I've got what is probably a really simple question. If anyone can help me I would be indebted to you, and could pay you back by some GIS advice if you ever need it.
I found a cool set of scripts for Re-ordering a list box but I can't figure out if I put the Client Script into an .ASP page, how do I call the Server Script and have it return the new list order like is done in the demo?
Where do I put the Server Script, into the client script somewhere, or in its own file? If into its own file, what kind of file is it? I've tried many variations on this, and can't get it to work as the demo http://www.siteexperts.com/tips/elements/ts32/page1.asp[^] does.
thanks in advance,
LJ
****Client Script****
//Copyright 2000 InsideDHTML.com, LLC. All rights reserved.
function outputList(ar, name, size) {
var strIDs = "<SELECT SIZE=\"" + size + "\" NAME=\"ro_lst" + name + "\">"
var sel = " SELECTED"
for (var i=0;i<ar.length;i++) {
strIDs += "<OPTION " + sel + " VALUE=\"" + ar[i][0] + "\">" + ar[i][1]
sel = ""
}
strIDs+="</SELECT>"
strIDs+="<INPUT NAME=\"" + name + "\" TYPE=hidden>"
return strIDs
}
function outputButton(bDir,name,val) {
return "<INPUT TYPE=button VALUE=\"" + val + "\" ONCLICK=\"move(this.form," + bDir + ",'" + name + "')\">"
}
function move(f,bDir,sName) {
var el = f.elements["ro_lst" + sName]
var idx = el.selectedIndex
if (idx==-1)
alert("You must first select the item to reorder.")
else {
var nxidx = idx+( bDir? -1 : 1)
if (nxidx<0) nxidx=el.length-1
if (nxidx>=el.length) nxidx=0
var oldVal = el[idx].value
var oldText = el[idx].text
el[idx].value = el[nxidx].value
el[idx].text = el[nxidx].text
el[nxidx].value = oldVal
el[nxidx].text = oldText
el.selectedIndex = nxidx
}
}
function processForm(f) {
for (var i=0;i<f.length;i++) {
var el = f[i]
if (el.name.substring(0,6)=="ro_lst") {
var strIDs = ""
for (var j=0;j<f[i].options.length;j++)
strIDs += f[i].options[j].value + ", "
f.elements[f.elements[i].name.substring(6)].value = strIDs.substring(0,strIDs.length-2)
}
}
}
var arrList = new Array()
arrList[0] = new Array("1","Test Item 1")
arrList[1] = new Array("2","Test Item 2")
arrList[2] = new Array("3","Test Item 3")
arrList[3] = new Array("4","Test Item 4")
arrList[4] = new Array("5","Test Item 5")
arrList[5] = new Array("6","Test Item 6")
document.write(outputButton(true,"test","Move Up") + "<BR>")
document.write(outputList(arrList,"test",10) + "<BR>")
document.write(outputButton(false,"test","Move Down"))
****Server Script****
Dim arItems,i, strIDs
strIDs = request.form("test")
if strIDs="" then
' Initialize
strIDs = "1, 2, 3, 4, 5, 6"
else
response.write("Reordered....")
end if
arItems = split(strIDs,", ")
response.write("" & chr(13) & chr(10))
response.write("var arrList = new Array()" & chr(13) & chr(10))
for i=0 to uBound(arItems)
response.write("arrList[" & i & "] = new Array(""" & arItems(i) &
""",""Test Item " & arItems(i) & """)" & chr(13) & chr(10))
next
|
|
|
|
|
Javascript allows you to put functions in an external (.js) file. Can I do the same thing with VBScript? I tried it and started getting errors on my asp page (despite having the appropriate <script> line in the asp file.
Any help?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi John
To include VbScript for server-side code:
<script language="VBSCRIPT" src="Inc/Global.vbs" runat="Server"> </script>
or:
<!--#include file="Inc/CheckSecurity.asp" -->
To include VbScript for client-side code (but only for IE browsers:
<script src="Inc/global.vbs" language="VbScript"> </script>
Regards
Andy
|
|
|
|
|
andyharman wrote:
That one did the trick. Many thanks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Visual Studio.NET
I have formA, with an edit button, the edit button does a response.redirect as follows:
Response.Redirect("FormB.aspx?QuoteToLoad=" & selectedItem)
When I run it it tries to run the page load event of a different form (formC). Why would it do that? How can I fix it?
|
|
|
|
|
There is nothing in the code that you have shown that suggests that FormC would be loaded, so the reason has to be in some of the code that you haven't shown.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks, I found the "codeBehind" property was set to FormC, I opened teh aspx file in a text editor and changed it and all seems to be well. Not sure how it got goofed up....
|
|
|
|
|
hi there
i have a table-repeated region(php) inside a div.
i need it to show 3 records and the other ones below-scrollable
ofcourse i won't make framesets!
how will i make it scrollable??
backround:scroll or backround-attachment:scroll won't work
thanks
ninja coding
|
|
|
|
|
Set the div's style to "overflow:scroll;"
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks John it works,but how will i get rid of the horizontal scroll
that is completely useless??
ninja coding
|
|
|
|
|
As far as I know, you can't (in this case, you gotta take the good with the bad). I use the same technique to constrain my web page content so that the header/menu and footer are always displayed. The content scrolls, but the page itself does not.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Before anyone jumps in moaning bout bars they don't want, there's also an overflow-x / overflow-y....oops too late
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
thanks it works...but..there's always a but
shows perfect on mozilla ,any solution for IE5-6?
ninja coding
|
|
|
|
|
My web site works in ie and mozilla and i don't recall doing anything special to make this work in both browsers.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|