I have simple function that I call from an alert box
alert(testScore);
It works fine. Unfortunately, I do not like the sound and Exclamation
point icon that appears. I'd like a nice message box like VBA message
box #64 to appear. I know hardly anything at all about VB or VBA.
But, I do know you can call a VB function from Javascript. How? Is it
possible to get my testScores to appear from the VB function? Is it
hard? Where do I start looking?
In the below code, the alert message returns in one instance: 'someAnimal is [Mammal "Mr. Biggles"]' I don't understand how this is possible. We pass as an argument 'Mr. Biggles' to the Mammal constructor. Then assign it to the object name property. But then it ends there. There is a function called toString which will return the alert. But the toString function is not being called like this: alert('someAnimal is '+someAnimal.toString()); If it was like how it is above, it would make sense to me but now it makes no sense to me because I don't see where that toString() is being called - I only see that it is prototyped to the Mammal object.
Code: function Mammal(name){ this.name=name; this.offspring=[]; } Mammal.prototype.haveABaby=function(){ var newBaby=new Mammal("Baby "+this.name); this.offspring.push(newBaby); [Code]....
I have a page with an iframe. The page defines some JavaScript functions in the head part. How can I access these functions from the iframe? In Firefox I can use parent.myFunction() but it doesn't work in IE.
I have a problem. I need to call a javascript function within the include html of a scriptlet. How do I do that ? Example in Main.html contain the following object tag :
<object id="dynamsg" width="100%" style="position:absolute;top:0px;left:0px" height="350" data="scriplet.html" type="text/x-scriptlet"> In scriplet.html consist of a javascript function :
<script language=javascript> function Hello() { alert('Hello World'); } </script>
Now, how can I from Main.html call the Hello() function?
I have this: Code: <a href="javascript:employeeSearch();" class="textbutton">Lookup</a> and it doesn't seem to be working with firefox? does this look right? in IE it works fine.
I am developing an ASP.NET (C#) application and need some help. I wish to call a server-side function (in the code-behind "file.aspx.cs") upon a user clicking on the "X" to close the browser window. Is there a way to postback and call a server-side function when this happens? I am aware of the browser's native "onunload" event, but am not certain that what I'm looking for is actually possible.
I have been trying to load a javascript function from the body onload html tag, but I only want the function to load the first time the page is loaded: I have investigated but haven't found anything that works.. I thought about cookies, but what if the user's disable them?
My code:
//I want to call the Toggle function below only on the 1st time the page is loaded:
<script language="javascript">
function Toggle(item) {
obj=document.getElementById(item); visible=(obj.style.display!="none") key=document.getElementById("x" + item); if (visible) { obj.style.display="none";
I have a form button with id="submit". When pressed, ClickGeocode(credentials) is called. This works fine and dandy with: $('submit").click(ClickGeocode) Despite there being no indication that the function takes an argument 'credentials'. So when I want to call the function at some point in my code, I should be able to do something like ClickGeocode(credentials) ... no? However, my issue is that credentials isn't once defined in my code - it is part of Bing Maps function... like so:
function ClickGeocode(credentials) { map.getCredentials(MakeGeocodeRequest); }
So why does it work using .click(), and how can I call the function without user interaction (simply somewhere in my code) even if 'credentials' is not defined?
I have text input such as below. What I want is that when I press submit button if the Item Name is empty then I want the error text in red shown beside the text input. I am using php how can I achieve it?
How can I create a popup message window, with a custom message, that asks a yes or no question? If they click yes, it can load another script or a page, if they click no it leaves them where they are? Can someone give me an example?
I have 2 javascript files: 1 containing generic functions for my site used sitewide and another for a particular web page containing just the javascript for that page. The page is also calling the jQuery javascript file.
What I want to do is have a javascript function in my main javascript file which uses features of jQuery such as show, hide etc. and then I want to call this javascript function from the other page specific javascript file.
[Code]...
This does not work and so was wondering if anyone can point me in the right direction as to how to achieve this or something similar.
I try to make something where you add elements, and can delete elements later by calling a simple function. I simplyfied it right here: It works only to add the paragraphs, but the delete function doesn't work. Tried already to debug with an alert message after each rule... but the problem is with this rule I guess:
i have used Div with in Div and tryed calling it from javascript, its workin fine with IE...but in firefox its not not..it says "document.getElementById has no properties for first case " n "frames has no properties for second case " in the javascript console within firefox... Code:
I am creating a little word guess game, with a random function which picks the word from an array of 10 words. The second function checks if the users' letter choice is part of the secret word. Currently, each time the checkGuess() function is called, the word is changed, probably because I am calling the wordPicker() function from within. The wordPicker randomly chooses the word, then returns that word. All I want to do is pull that word into the checkGuess function, without calling the wordPicker function as it currently does. Here is the code:
Create secret word array var wordList = new Array("stealth", "telephone", "internet", "nickel", "marine", "instantiate", "method", "function", "television", "monitor")
I am trying to write a function that is being invoked when some one clicks the submit button on the form.<form name="sectionA" action="optionpage.cfm" onSubmit="return abc()">I have three tables with initials textboxes. I want to check if they are empty and return false(stay on the same page), else go to action page.Here is what I am doing, I Created three functions tableA(), tableB(),tableC() call them from function abc(). These functions tableA(), tableB(), tableC() return false if one of the field is empty and stop furthur processing and remain in the same page. If none(errors), then go the other page.i.e if table B has empty fields, page should stop furthur processing and remain in the same page.Here is how I am doing it Can somebody please point out what I am doing wrong here.Even when there is empty field, the code moves me to the actionPage.
We have an applet that has to support the SUN VMs as well as the MS VM. The applet receives updates from a server (via tcp or http) and wraps them up as objects and passes them using the JSObject scripting context to a javascript function.
This function takes the object and reads the properties and updates a screen.
All seems simple stuff. The problem is that the MS JVM runs like a rocket, but the sun vm seems to max out our processor and also takes ages to process anything.
I have tried logging from the console using debug level 5, and it shows a lot of back and forth between the applet and the javascript when accessing methods on the object passed.
Seeing that as a possible problem, I now pass a delimited string to the front end, and then convert that into an update message purely in javascript so there is only one hit to the applet per message.
I am still seeing a massive difference between the sun and ms VMs.
Has anyone ever come across this, and is there anything I can do to help flatten out this performance?
I am designing a template for File Hosting site but the flash uploader is breaking the design
This is what it looks like
When the button (white box) is clicked it opens a file selecting box
How can i replace that box with image, i tried placing a image over it with help of wmode transparent but when clicked on image flash doesnt open up the file selection box
How this can be done?
Is there any way i can run the flash when clicked on image because this doesnt looks good.
Little detail as i am more a designer than a coder.
The javascript fails to call an embeded applet's function. In the javascript console, it shows "Error XXXX is not a function". Following are some parts of my code.
Here parent.document.cpmApplet and parent.BottomIframe.document.resultApplet are valid since I loaded both the applets with the same name using <APPLET> tag for Netscape/Mozilla and OBJECT tag for Windows.
The issue is with Netscape and Mozilla on Unix platforms only. I would appreciate if anyone could help me to solve this.
I am looking for a generic javascript function to identify the form with in which a element exists, thus developer can avoid coding like document.forms[index].submit() - where they are sure, they want the form with in which this element exists is to be submitted. This way when forms are introduced at top level the code can remain unchanged, else every form introduce above in the DOM will result in increasing the index by one.
The code is given below. While doing so i am stuck with 2 problems P1: In the code, you can see i am giving a explicit 'break' in the code. If i don't do so the code seems to be looping. Obviously i am missing some basic.
P2: I am able to pass 'this' for anchor element by name="xy" <a href="#" name="xy"
in its onclick function by which, in the javascript function i move up the DOM.
While i am unable to do that on the anchor element given below since this function is now on the href attribute.
The function setEqualHeight(columns) fires on document.ready and works well. However, in the second function (the tab function) I would like to to call the setEqualHeight function in order to recalculate the div heights again. I would like to do this in the "onclick function". How?