The row in the table would highlight whenever I mouse over it.
This works perfectly in HTML but I would like to convert from HTML code to Javascritp code to make it more dynamic.
<html>
<body>
<TABLE border=1>
<TR...
I have 2 arrays and I would like to compare the 2 arrays.
If an element in array 1 is NOT in array 2 then I would like to display that element.
In this case, I should only display the letter "c" but it doesn't work and I don't know why??
Here's my code:
<html><head>
<script...
I would like to call a function within a function. Is this even possible??
When I do this I get "undefined"
Here's my code:
<html>
<head>
<script type="text/javascript">
function product(a,b){
total = a*b;
display(total);
}
function display(num){
return num;
}
</script>
</head>...
How do I pass an id to a function??
Or is this even possible.
<html>
<head>
<title>
JavaScript array passing example
</title>
<script type="text/javascript">
function init(){
display(addText1);
display(addText2);
display(addText3);
display(addText4);
}
function display(var...
I would like to pass an array to a function but how does the program know which array I would like to choose from??
Lets say I have 3 arrays and I would like to pass array C, to my function.
I checked the web but they only show if you have ONLY 1 array but NOT for multiple arrays.
How would I...
I can't seem to get my innerHTML to display my content.
This works fine, if I was to put it all in one line.
document.getElementById('addedText').innerHTML = '<table><tr><td>'+"My text goes here"+'</tr></td></table>';
If I was to break it up, which I wanted then nothing seem to show up...
How do I prevent my Link from disappearing??
When I click on the link, "Click Here"
It display, "Look At Me!!" but the link, "Click Here" is GONE
Is there a way to keep my link, "Click Here" from disappearing?
So when I click on the link, "Click Here" the content, "Look At Me!!" should...
I would like to display the elements in my array but it is NOT working. Here's my code:
<HTML>
<HEAD>
<TITLE>Test Input</TITLE>
<script type="text/javascript">
function addtext() {
var openURL=new Array("http://google.com","http://yahoo.com","http://www.msn.com","http://www.bing.com")...
when a user click on a link, it would open a new window in HTML it is something like this:
<a href="http://google.com" target="_blank">click here</a>
How do I do this in Javascript? So a user would click on the link and it would open a new window. Here's my code
document.writeln('<tr><td>' +...
in HTML you can call CSS
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<tr><td class="cssHere">Display</td></tr>
can you even call CSS in javascript?
document.writeln("<tr><td class="cssHere">" + Display + "</td></tr>");
if so how do you even call the "style.css"...
I am able to incorporate CSS into the HTML, like this:
<tr><td style="background-color:#FFFF00;">test</td></tr>
How can I incorporate CSS into javascript?
document.writeln("<tr><td style="background-color:#FFFF00;">" + "test" + "</td></tr>");
The javascript code doesn't work or this is it even...
I'm sorry if this question seem very basic but I just start learning javascript. I would like to display an image but not sure why it is not working. In a nutshell, here's my code
<html>
<head></head>
<body>
<script type="text/javascript">
document.writeln("<img src=/"xMark.jpg /" width=25...
I sort of got it working, here's the code:
function addtext() {
var openURL = new Array("google.com","yahoo.com","msn.com");
for(var i=0;i<=openURL.length;i++){
if (openURL[i].substr(0,4) != 'http'){
openURL[i] = 'http://'+openURL[i];
}...
Is it possible to submit multiple links all at the same time using Javascript? I check all over the web and can't find any examples anywhere.
I would like to click on a button and submit to google, yahoo, msn, etc all at the same time. Like someone physically click on http://google.com...
I checked everyone on the web but it doesn't have javascript codes to convert a domain to an ip address but there are sites that does it for you.
How do I go about coding an nslookup using javascript.
Convert google.com to an IP address.
any comments or suggestions is greatly appreciated...
I would like to insert an image in my javascript function but it does NOT work. So it goes like this...
document.getElementById('title_' + planID).innerHTML="<a href=\"javascript:planTypeClose('" + planID + "');\">Check this out" + "</a>" + "<img src="image.jpg">";
any ideas...
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.