Solutions to errors » JavaScript and jQuery


 Currently Browsing JavaScript and jQuery Errors
Q&A: Need help with a .dll error message when I start my computer? ?

Question from I Wanna Know: Need help with a .dll error message when I start my computer? ?
I hope someone can help me with this. I just added McAfee Total Protection software to my computer. Now when I restart my computer I receive the following error message: Object doesn’t support this action line: 19 misp://McRegUpd.dll::JClassFactory.js

What can I do to fix this? It’s just annoying to see this message pop up everything my computer starts.

Thanks.

Popular answer:

Answer by Jim W
it’s just a minor registry problem, try this
http://www.eusing.com/free_registry_cleaner/registry_cleaner.htm

What do you think of this error? Answer below!

Q&A: could you help me on criterias for judging in JS Prom?

Question from aaron: could you help me on criterias for judging in JS Prom?
My mother will be the MC in our JS Prom night…

She is asking what are some examples of criterias in judging…

Please, we need help…our JS Prom will be on Wednesday…

please we need your answers…

God bless you in full measure, thank you for your benevolent heart.

Popular answer:

Answer by Gayle C
I am not a judge, but I know how I would judge.

A girl whose dress does not leave her hanging out the top.
A girl who carries herself well…walking with her head up.
A girl with a pretty smile with pretty white teeth.
A girl who is genuine….you can tell.
A girl who is friendly & comfortable talking with others, not just talking with her peers.
A girl with a natural look, not all made up with makeup! Esp. eye makeup, too much of that detracts from her looks.
A girl who looks like she has pride in herself…..good complexion, good figure shows she exercises, & eats right.

Give your answer to this error below!

Q&A: javascript problem….pls help………………?

Question from Chen B: javascript problem….pls help………………?
the problem is like this, i have 3 function a a simple javascript,0ne is Upper,it have return a value (20), one is lower, have return value (10). now the last one is sum, the problem is in here:
function sum() {

total_cash = upper()
total_c = lower()

alert(total_cash + total_c)

}

how to sum up the two value?this code is return me the value in (2010).

Popular answer:

Answer by Verident
Im not sure, but try putting total_cash+total_c between ( )

alert ((total_cash+total_c))

I think the problem come from the fact that the + is also use to concatenate string in javascript

What do you think of this error? Answer below!

I am from India and I have 7+ years experience in website design, Can I get a job in Brazil?

Question from Satya: I am from India and I have 7+ years experience in website design, Can I get a job in Brazil?
I am from India and I have 7+ years experience in website design, Can I get a job in Brazil? I work in following skills/ languages:
HTML, XHTML, CSS, DIV based website, Javascript, Jquery, RSS, XLT, Ajax, Web 2.0, Browser problem, W3C standards, WAI, Photoshop, Dreamweaver, Flash, etc.

I know the English language, please suggest me the site and how I can find the job there in Brazil. Mostly I prefer to live in RECIFE.

Thanks
SATYA

Popular answer:

Answer by Steve
I highly doubt it because there are lots of Brazilians with those same skills. Also you would need to be fluent in Portuguese which is the language of Brazil.

If you have a better solution to this error, please comment below.

simple(?) javascript problem?

Question from aznsmurf8: simple(?) javascript problem?
I am currently learning javascript in school and have been assigned a problem in class that requires a number input, and the program will determine whether the number is binary or not. Here is what i have so far:

for (i = 0; i < input.length; i++){

if(input.charAt(i) != 1 && input.charAt(i) != 0){
document.BinaryForm.OutputText.value = "Invalid binary number"
validinput = false;

}else{
document.BinaryForm.OutputText.value = ""
validinput = true;}

It works... partially except when the non-binary digit goes at the end. (like 1002)
also fails on a number like 20001002000100
oops, yahoo had some issues with some of that code, but where it says OutputText, there's a .value after it, not a "..."

Popular answer:

Answer by joec_11
maybe you are not reading the last digit, should your for loop be i<= input.length

Add your own answer to this error in the comments!

How do you turn on JavaScript on using FireFox?

Question from Kristina: How do you turn on JavaScript on using FireFox?
I’ve tried going to Tools>Options>Content, but it says JavaScript is enabled and still it won’t let me watch videos. Please help. Thanks.

Popular answer:

Answer by flybishop
Then Javascript isn’t your problem. The videos are probably in flash and you don’t have the plugin installed. If so, go to adobe.com and download and install the Flash Player plugin.

The other option is that you may not be able to watch videos because the maker of the videos has block your country. There should be a message telling you that. If that’s the case then you can go to ultrareach.com and download ultrasurf and try again.

If you have a better solution to this error, please comment below.

Q&A: How do you add a percentage calculator in javascript?

Question from Shadowhack: How do you add a percentage calculator in javascript?
I am working on a shopping cart function in javascript and I want to have the shipping calculated out based on the total price of the sale. Can anyone help me write the code to place it into javascript?

Popular answer:

Answer by rragsdaleii
this is basic panel code so far still yet to complete it, it can only multiply and subtract
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

public class BasicPanel extends Panel implements ActionListener {
private TextField inputOutputField;
private String[] strButtonCaptions = {”1″, “2″, “3″, “*”, “1/x”,
“4″, “5″, “6″, “/”, “x^n”,
“7″, “8″, “9″, “+”, “+/-”,
“0″, “.”, “=”, “-”, “x!” };
private String[] strAxilaryButtonsCaptions = {”CA”, “CE”, “Round”};
private Button[] btnKeys, btnAxilaryKeys;
static double numBuffer;
//Initialize all unary operators for basic calculator
static boolean multiply = false, divide = false, addition = false, subtract = false ;
static boolean power = false;

public BasicPanel(TextField inputOutputField){
this.inputOutputField = inputOutputField;

//Set layout of panel
this.setLayout(new BorderLayout());

//Create inner panels to aid in layout of componets
Panel northPanel = new Panel();
Panel southPanel = new Panel();
northPanel.setLayout(new GridLayout(4, 5, 5, 5));
southPanel.setLayout(new GridLayout(1, 3, 5, 5));

//Set up basic calculator buttons
btnKeys = new Button[strButtonCaptions.length];
//Instinate buttons, add to southPanel, setActionCommand and register event listener
for(int count = 0; count < strButtonCaptions.length; count++){
btnKeys[count] = new Button(strButtonCaptions[count]);
northPanel.add(btnKeys[count]);
btnKeys[count].setActionCommand(strButtonCaptions[count]);
btnKeys[count].addActionListener(this);

}
btnAxilaryKeys = new Button[strAxilaryButtonsCaptions.length];
for(int count = 0; count < strAxilaryButtonsCaptions.length; count++){
btnAxilaryKeys[count] = new Button(strAxilaryButtonsCaptions[count]);
southPanel.add(btnAxilaryKeys[count]);
btnAxilaryKeys[count].addActionListener(this);
}

//Add panels to main panel
this.add(northPanel, BorderLayout.NORTH);
this.add(southPanel, BorderLayout.SOUTH);

}
public static void resetBinaryOperators(){
multiply = false;
divide = false;
addition = false;
subtract = false;
power = false;
}
public String multiply(String operand){
String result = "";
try{
result =Double.toString( (numBuffer * Double.parseDouble(operand)) );
}
catch(NumberFormatException nfe){
result = "Number format exception";
}
return result;
}
public String divide(String operand){
String result = "";
try{
result = Double.toString((numBuffer / Double.parseDouble(operand)) );
}
catch(NumberFormatException nfe){
result = "Number format exception";
}
return result;
}
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
String strBuffer = new String(); //Create string buffer to hold text from textfield

//Remove default zero from text field if present
if(inputOutputField.getText().equals("0"))
strBuffer = "";
else
strBuffer = inputOutputField.getText();
//Check to see if numeric button was pressed and append to text field
try{
if((Integer.parseInt(command) >= 0) && (Integer.parseInt(command) <= 9))
inputOutputField.setText(strBuffer += command);

}
catch(NumberFormatException nfe){
//Catch number format exception and terminate correctly
}
//Determine if binary operator has been selected and set operator to approperate state
if(command.equals("*")){
numBuffer = Double.parseDouble(strBuffer);
BasicPanel.resetBinaryOperators();
multiply = true;
inputOutputField.setText("0");

}
if(command.equals("/")){
numBuffer = Double.parseDouble(strBuffer);
BasicPanel.resetBinaryOperators();
divide = true;
inputOutputField.setText("0");
}
if(command.equals("+")){
numBuffer = Double.parseDouble(strBuffer);
BasicPanel.resetBinaryOperators();
addition = true;
}
if(command.equals("-")){
numBuffer = Double.parseDouble(strBuffer);
BasicPanel.resetBinaryOperators();
subtract = true;
}
if(command.equals("x^n")){
numBuffer = Double.parseDouble(strBuffer);
BasicPanel.resetBinaryOperators();
power = true;
}
//If equals is pressed determine which binary operator has been pressed and perform calculations
if(command.equals("=")){
if(multiply){
inputOutputField.setText( multiply(inputOutputField.getText()) );
}
if(divide){
inputOutputField.setText( divide(inputOutputField.getText()) );
}

}

}

}

Give your answer to this error below!

Q&A: Problems with JS code?

Question from mx_penguin: Problems with JS code?
ok, so here’s my code for random images to appear on refresh, but what i need now is to time that change, so every 7 seconds the picture will change, i dont know a lot about javascript, any help will be apreciated
ON HEAD:

on BODY:

Its important for the order of the pictures to load to keep random, thanks!

Popular answer:

Answer by xinno
your code got cut.
after p-1)…
and whichImage]+’…

if your code really looks like that, change to this:
p-1));
whichImage]+’”>’);

What do you think of this error? Answer below!

Q&A: How to dynamically load an external web page into a div tag from a link reside inside that div tag. Plz HELP?

Question from Hasara: How to dynamically load an external web page into a div tag from a link reside inside that div tag. Plz HELP?
I have a web page( index.html ) which contains division called “container” (i.e.

)

From the main navigation links I’m able to load an external web page into that div tag without refreshing other areas of the index.html (I use javascript together with Jquery).

MY PROBLEM SCENARIO IS….

How to load an external web-page to that div tag again from a link resides in a previously loaded web page (i.e I want to load a new page from a link in currently loaded page.).

ANY CODE PLEASE

Thanks in advance

Popular answer:

Answer by MalorieK
look at