473,396 Members | 2,011 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,396 software developers and data experts.

button.onclick = new Function("func2()") + button.onclick

Hi
Subject says it all, how can I do this?

Also, do things like string functions belong to any object?
i.e. are they perhaps part of the window object but are a special
case? I wondering whether its possible to display all of their
names by iterating around something in the browser (suspect
their not and you can't but its worth asking)

Ta
F

Sep 25 '05 #1
2 4673
Are you trying to call your new function and also the old one? You
can't add functions together. Something like this would work:

window._oldonload = window.onload;
window.onload = function(e) { func2(); window._oldonload(); };

Really, you should be registering these event listeners with the
appropriate DOM functions.

Sep 25 '05 #2

dy************@gmail.com wrote:
Are you trying to call your new function and also the old one? You
can't add functions together. Something like this would work:

window._oldonload = window.onload;
window.onload = function(e) { func2(); window._oldonload(); };

Really, you should be registering these event listeners with the
appropriate DOM functions.


That works fine thanks

I'm trying to make development a little easier by finding ways around
some annoying javascript/visual studio problems.

(1) .js files are locked by VS while your working on them and
sometimes the breakpoints won't work, even if you set them in the
running documents. I thought a way around this is would be
to add 'debugger' on the start of the appropriate event method via
some other javascript, hacky but it works.
Also I've written a DOM parser (yes, another one), so I can do this
(nearly) relatively easily, except I fell down on the syntax.

Other things include writing functions and then missing out brackets
and having to find them manually, jslint seems to help with this,
I'm not aware of any better ways

Thanks for the reply

F

Sep 26 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matt | last post by:
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form...
2
by: Sedef | last post by:
Hi, i'm trying to create a custom Button user control which will be derived from System.Web.UI.WebControls.Button. the normal server side Button class creates some client side javascript code for...
2
by: TonyVal - MSDN News | last post by:
Hi All, Anyone know how to change color for a 3D button like this button control does? http://www.econtechvn.com/en/aquabutton_detail.htm I see it is really cool. But, don't know how to do...
4
by: tomlong | last post by:
Hi, I have a tabular form that each TR has an onclick event to edit the row. I also have a div in one of the cells on each row that is a delete button. My problem is that both onclicks are being...
2
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
5
by: plumba | last post by:
Ok, another query.... I have a checkbox at the bottom of my form which when checked unhides a <div> block which displays the submit button. The problem I have is when the clear form button is...
3
oranoos3000
by: oranoos3000 | last post by:
hi i'm a beginer javascript would you please help me i d like to findout this page has next page or previous page in history object i use this line of code if(window.history.length>0) and with...
1
by: perhapscwk | last post by:
I want to write something like below. after click the button, it will auto click the other 2 button in the same page, how i can do this? the number 14 and 17 are always different when the page...
0
by: jagdeep gupta | last post by:
what is difference between using button as command button and as push button. If i use it as PushButton and call the event OnClick and In case of Command button i call OnCommmand event and same work...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.