473,246 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

can't call this function

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4.  
  5. var flag=0;
  6.  
  7. callf()
  8.  {
  9.   if(flag == 0)
  10.    {
  11.     test()
  12.      {
  13.        alert("hi from if");
  14.      }
  15.    }
  16.  
  17. else
  18.   {
  19.     alert("hi from else");
  20.   }
  21.  }
  22.  
  23.  
  24.  
  25. </script>
  26.  
  27. </head>
  28. <body>
  29.  
  30.  <input type="text" onchange="callf();">
  31.  
  32. </body>
  33. </html>
  34.  
what's wrong with this code ??
nothing happens when i type into the text box..
Apr 30 '09 #1
2 1200
Dormilich
8,658 Expert Mod 8TB
@aashishn86
check out the Error Console!

callf() is not a function. functions are defined using the function keyword.

Expand|Select|Wrap|Line Numbers
  1. function callf() { // code comes here }
  2.  
  3. // alternatively
  4. var callf = function() { // code comes here }
Apr 30 '09 #2
acoder
16,027 Expert Mod 8TB
Two other problems:
1. test() is not defined.
2. It's called onchange, so it won't fire on key presses, but after the field loses focus and there's been a change.
Apr 30 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
0
by: xixi | last post by:
hi, we are using db2 udb v8.1 on win 64 bit with fp3 with type 4 db2jcc.jar driver. when i execute this query , select id, arno01, arcd01, arno16, artx01, armo09, ardy09, arcc09, aryr09,...
4
by: Chronologic | last post by:
All, I have an issue I would like some expert help on. I understand, or so I believe, that C# does not support the concept of a "compile time macro". At least not in the sense I'm looking...
2
by: PamelaDV | last post by:
I am wondering if there is a way to disable the "X" used to close the Access application window? I know how to disable it for individual forms, but I would like to disable it for the application...
37
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.