I am trying to add a keylistener to my program but run into problems referencing non-static methods from main. Here is the jist of it:
class myprogram {
respondToKey instanceofKeyresponse = new respondToKey();
class respondToKey extends keyAdapter {
dosomething;
}
public void main(){...
If I try an address a object property using a variable it does not work. For example having document.myimage.src having myimage as an image objects name is identified correctly. Substituting a variable for myimage such as newimage=myimage; document.newimage.src is not recognized as a defined...
try inserting an alert()statement in your code with the variable name in the paren's When the code executes it will pop a window with the value of the variable in it. If it says "undefined" then the variable is undefined.
sorry to be vague. Don't have a link to reference but let me be more explicit here:
/*
this script creates a navigational bar with "no_of_tabs" tabs on it. If a user clicks on a tab, all other tabs turn tabblue.gif and the active tab goes tabwhite.gif
*/
<script...
I created a set of image objects using an array. I try to reference the image object's source image by using the array name and it doesn't work in IE.
For example:
test=new Array("sample1","sample2")
<img src=url name=test[0]>
.
.
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.