Hi, using Python 2.3. Trying to write a function which will activate with
onmousedown="function()"
When I put this in the body statement of my page and load it, everything is fine, when I click on the page to activate my function I get an error. Not real specific just says object expected.
Any help is aprecciated.
Frank
3 1214
Hi, using Python 2.3. Trying to write a function which will activate with
onmousedown="function()"
When I put this in the body statement of my page and load it, everything is fine, when I click on the page to activate my function I get an error. Not real specific just says object expected.
Any help is aprecciated.
Frank
Hi Frank. Posting code will help us. I think you may be looking for this: -
def onmousedown():
-
pass # put your code here
but if this an object methond it's: -
def onmousedown(self): # the name "self" is conventional (not the required name)
-
pass # put your code here
Of course, if the is an event handler in a GUI program, there must be a binding to a widget somewhere.
So post some code and let us take a look at what's going on. Thanks,
Barton
Hi Frank. Posting code will help us. I think you may be looking for this: -
def onmousedown():
-
pass # put your code here
but if this an object methond it's: -
def onmousedown(self): # the name "self" is conventional (not the required name)
-
pass # put your code here
Of course, if the is an event handler in a GUI program, there must be a binding to a widget somewhere.
So post some code and let us take a look at what's going on. Thanks,
Barton
Hi Barton, Thanks for replying. -
def runit() :
-
server.rna_xmlrpc.invoke(session,'/interfaces/com3/rznet_peer/wellness/wellness/Boiler/HeatEnSP','set',changevalue)
This is the function. I'm trying to run it in an asp file used as a web page, with onmousedown="runit()"
Frank
Hi Barton, Thanks for replying. -
def runit() :
-
server.rna_xmlrpc.invoke(session,'/interfaces/com3/rznet_peer/wellness/wellness/Boiler/HeatEnSP','set',changevalue)
This is the function. I'm trying to run it in an asp file used as a web page, with onmousedown="runit()"
Frank
Ok, that helps. Will you also copy the whole error message here? Thanks.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: vincent wehren |
last post by:
Hi,
I'm running into trouble building Python2.3.3c1 from source on a Windows XP
machine.
I'm getting C:\Python-2.3.3c1\PC\python_nt.rc(14) : fatal error RC1015:
cannot open include file...
|
by: Scott Brady Drummonds |
last post by:
Hi, everyone,
I have a tool I've written in Python that is taking many hours to run but I
believe could be running in less than an hour with a more clever
implementation. As such, I'm trying to...
|
by: Rembrandt Q Einstein |
last post by:
I am running an external command and I need to know a) when it is done
and b) what it wrote to both stdout and stderr. After a little
searching, I found the popen2 module and used the Popen3...
|
by: Frans Englich |
last post by:
Hello all,
I have a couple of questions related to module importing.
1) When I start my Python program with `python foo.py` instead of simply
adding a interpreter comment on the first line and...
|
by: Gonzalo Monzón |
last post by:
Hi all!
I have been translating some Python custom C extension code into Python,
as I need these modules to be portable and run on a PocketPC without the
need of compile (for the purpose its a...
|
by: goetzie |
last post by:
I am using Python 2.4.1 and Numeric 23.8 and running on Windows XP. I
am passing a Numeric array of strings (objects) to a C Extension module
using the following python code:
import Numeric...
|
by: tkondal |
last post by:
Hi all.
I just started looking at Python's ctypes lib and I am having trouble
using it for a function.
For starters, here's my Python code:
from ctypes import*;
myStringDLL=...
|
by: sab |
last post by:
Hello,
I have been working on a python script to parse a continuously growing
log file on a UNIX server. The input is the standard in, piped in
from the log file. The application works well...
|
by: Gabriel Genellina |
last post by:
En Sat, 18 Oct 2008 05:52:04 -0300, Stef Mientki <stef.mientki@gmail.com>
escribió:
Why don't you let the caller tell you its own location, using __file__?
The above code is too much magic for...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |