Click here to Skip to main content
15,915,324 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Code for Download Pin
Vasudevan Deepak Kumar22-Oct-07 1:03
Vasudevan Deepak Kumar22-Oct-07 1:03 
AnswerRe: Code for Download Pin
Scott Dorman22-Oct-07 4:52
professionalScott Dorman22-Oct-07 4:52 
Questiondynamic dropdown list Pin
Sunil Wise19-Oct-07 22:56
professionalSunil Wise19-Oct-07 22:56 
AnswerRe: dynamic dropdown list Pin
Shog921-Oct-07 10:38
sitebuilderShog921-Oct-07 10:38 
QuestionSMS From my site Pin
Dawn Info19-Oct-07 22:50
Dawn Info19-Oct-07 22:50 
AnswerRe: SMS From my site Pin
Christian Graus21-Oct-07 12:12
protectorChristian Graus21-Oct-07 12:12 
AnswerRe: SMS From my site Pin
Vasudevan Deepak Kumar22-Oct-07 1:04
Vasudevan Deepak Kumar22-Oct-07 1:04 
QuestionType missmatch in vbscript (asp.net) [modified] Pin
alexvw19-Oct-07 7:50
alexvw19-Oct-07 7:50 
Hi everybody,

I have a script in two pages. Page1 works fine, Page2: type missmatch = "return"

Here is the vbscript

Function CatchKeys()
ix = Window.event.KeyCode
If ix <> 8 and ix <> 9 and ix <> 37 and ix <> 39 and ix <> 46 and (ix < 96 or ix > 105) then
If ix = 27 then
Window.event.srcElement.value=""
End If
CatchKeys = False
else
CatchKeys = True
End If
End Function

I use it to filter user input in a textbox I create programmatically, therefore I use the following to enable the script:
CType(iCtrl, TextBox).Attributes.Add("onKeyDown", "return CatchKeys()")

This works just fine!, but it does not in Page2.

The only difference I am aware of if that in page two the textbox is part of a template column, and therfore the assignment is in its declaration.

<asp:TextBox id=Textbox1 style="TEXT-ALIGN: right" runat="server" ForeColor="#000000" Font-Name="tahoma" Width="70px" BackColor="FloralWhite" Font-Bold="False" Text='<%# DataBinder.Eval(Container, "DataItem.Credit", "{0:n0}") %>' onKeyDown="return CatchKeys()" MaxLength="8"></asp:TextBox>

What I am not seeing?

Thanks a lot for your time and help.


Alex.




-- modified at 13:57 Friday 19th October, 2007
AnswerRe: Type missmatch in vbscript (asp.net) Pin
Christian Graus21-Oct-07 12:13
protectorChristian Graus21-Oct-07 12:13 
Generalare you looking to block firefox users ? Pin
alexvw21-Oct-07 16:33
alexvw21-Oct-07 16:33 
GeneralRe: are you looking to block firefox users ? Pin
MoustafaS21-Oct-07 16:47
MoustafaS21-Oct-07 16:47 
QuestionClick Triggers buttonclick? Pin
hifiger200419-Oct-07 7:13
hifiger200419-Oct-07 7:13 
AnswerRe: Click Triggers buttonclick? Pin
John-ph19-Oct-07 22:02
John-ph19-Oct-07 22:02 
GeneralRe: Click Triggers buttonclick? Pin
hifiger200421-Oct-07 2:59
hifiger200421-Oct-07 2:59 
QuestionASP page crashed if form field has ' and REPLACE word Pin
SABhatti19-Oct-07 4:41
SABhatti19-Oct-07 4:41 
AnswerRe: ASP page crashed if form field has ' and REPLACE word Pin
Guffa19-Oct-07 8:07
Guffa19-Oct-07 8:07 
GeneralRe: ASP page crashed if form field has ' and REPLACE word Pin
SABhatti19-Oct-07 8:26
SABhatti19-Oct-07 8:26 
AnswerRe: ASP page crashed if form field has ' and REPLACE word Pin
Guffa19-Oct-07 8:44
Guffa19-Oct-07 8:44 
GeneralRe: ASP page crashed if form field has ' and REPLACE word [modified] Pin
SABhatti19-Oct-07 8:49
SABhatti19-Oct-07 8:49 
AnswerRe: ASP page crashed if form field has ' and REPLACE word Pin
Guffa19-Oct-07 9:59
Guffa19-Oct-07 9:59 
GeneralRe: ASP page crashed if form field has ' and REPLACE word Pin
SABhatti19-Oct-07 10:24
SABhatti19-Oct-07 10:24 
AnswerRe: ASP page crashed if form field has ' and REPLACE word Pin
Guffa19-Oct-07 22:38
Guffa19-Oct-07 22:38 
GeneralRe: ASP page crashed if form field has ' and REPLACE word Pin
SABhatti22-Oct-07 9:23
SABhatti22-Oct-07 9:23 
GeneralRe: ASP page crashed if form field has ' and REPLACE word Pin
Guffa23-Oct-07 21:47
Guffa23-Oct-07 21:47 
QuestionWeb Serviece Error Pin
Navneet Hegde18-Oct-07 23:02
Navneet Hegde18-Oct-07 23:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.