Archive for November, 2009

How to change a Javascript File (.js file) with external values?

Wednesday, November 11th, 2009

I need the code for the Javascript file that would enable it to be change with out chaning the JS file like Google adsense goes.
I just need it to change the background colour.

Example Code:

<SCRIPT language="JavaScript">
bg_color = "#FFFFFF";
</SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="http://www2.domainname.com/file/file.js"></SCRIPT>

Thanks, Chris

<!– Paste this code into an external JavaScript file named: colorChange.js –>

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com

var sixteen;
var one;
var red;
var green;
var blue;
var colorCode;
var inputType = "dec";

var ralpha = "0123456789ABCDEF";
var temppos;
var rnumber;
hexArray = new Array();
hexArray[0] = "0";
hexArray[1] = "1";
hexArray[2] = "2";
hexArray[3] = "3";
hexArray[4] = "4";
hexArray[5] = "5";
hexArray[6] = "6";
hexArray[7] = "7";
hexArray[8] = "8";
hexArray[9] = "9";
hexArray[10] = "A";
hexArray[11] = "B";
hexArray[12] = "C";
hexArray[13] = "D";
hexArray[14] = "E";
hexArray[15] = "F";

rhexArray = new Array();
rhexArray[0] = "F";
rhexArray[1] = "E";
rhexArray[2] = "D";
rhexArray[3] = "C";
rhexArray[4] = "B";
rhexArray[5] = "A";
rhexArray[6] = "9";
rhexArray[7] = "8";
rhexArray[8] = "7";
rhexArray[9] = "6";
rhexArray[10] = "5";
rhexArray[11] = "4";
rhexArray[12] = "3";
rhexArray[13] = "2";
rhexArray[14] = "1";
rhexArray[15] = "0";

function d2h(number) { //converts a decimal number to hexadecimal
sixteen = Math.floor(number/16); //value in the 16s position
one = Math.floor(number-(sixteen*16)); //value in the 1s position
sixteen = hexArray[sixteen]; //hex representation of the value in the 16s position
one = hexArray[one]; //hex respresentation of the value in the 1s position
number = sixteen + one; //concatenate string values of hex digits
return number;
}

function h2d(number) { //converts hexadecimal numbers to decimal equivalents
if(number.substring(0,1) == "F") {
sixteen = 15;
} else if(number.substring(0,1) == "E") {
sixteen = 14;
} else if(number.substring(0,1) == "D") {
sixteen = 13;
} else if(number.substring(0,1) == "C") {
sixteen = 12;
} else if(number.substring(0,1) == "B") {
sixteen = 11;
} else if(number.substring(0,1) == "A") {
sixteen = 10;
} else {
sixteen = eval(number.substring(0,1));
}
sixteen = sixteen * 16;
if(number.substring(1,2) == "F") {
one = 15;
} else if(number.substring(1,2) == "E") {
one = 14;
} else if(number.substring(1,2) == "D") {
one = 13;
} else if(number.substring(1,2) == "C") {
one = 12;
} else if(number.substring(1,2) == "B") {
one = 11
} else if(number.substring(1,2) == "A") {
one = 10;
} else {
one = eval(number.substring(1,2));
}
return sixteen + one; //return sum of these decimal numbers
}

function changeFgColor(number) { //this function receives the background’s hexadecimal color code
//as a parameter, and then returns a suitable font color that would
//be visible on that background color
rnumber = "";
for(i=0; i <= number.length-1; i++) {
temppos = ralpha.indexOf(number.charAt(i));
rnumber = rnumber + rhexArray[temppos];
}
return rnumber;
}

function changeBgColor() { //this function reads in values from the text fields, parses the text
//as a color code, and then changes the background color
if(inputType == "hex") { //if user has changed the hexadecimal field
document.colorform.hextext.value = document.colorform.hextext.value.toUpperCase();
if(document.colorform.hextext.value.substring(0,1) == "#") { //if user placed "#" in front of hex color code
colorCode = document.colorform.hextext.value.substring(1,7);
} else {
colorCode = document.colorform.hextext.value.substring(0,6);
}
document.colorform.redtext.value = h2d(colorCode.substring(0,2)); //converts to red’s decimal value
document.colorform.greentext.value = h2d(colorCode.substring(2,4)); //converts to red’s decimal value
document.colorform.bluetext.value = h2d(colorCode.substring(4,6)); //converts to red’s decimal value
document.bgColor = colorCode; //change background color
document.fgColor = changeFgColor(colorCode); //change font color to something readable
return false; //exit function
}

//if program reaches this point, the color code is to be based on inputted decimal values,
//as opposed to hexadecimal values

//check red’s value range
if (eval(document.colorform.redtext.value) > 255 || eval(document.colorform.redtext.value) < 0) {
alert("All values must be and less than or equal to 255 and greater than or equal to 0.");
return false;
}
//check green’s value range
if (eval(document.colorform.greentext.value) > 255 || eval(document.colorform.greentext.value) < 0) {
alert("All values must be and less than or equal to 255 and greater than or equal to 0.");
return false;
}
//check blue’s value range
if (eval(document.colorform.bluetext.value) > 255 || eval(document.colorform.bluetext.value) < 0) {
alert("All values must be and less than or equal to 255 and greater than or equal to 0.");
return false;
}

red = d2h(eval(document.colorform.redtext.value)); //convert red’s decimal value to hex
green = d2h(eval(document.colorform.greentext.value));//convert green’s decimal value to hex
blue = d2h(eval(document.colorform.bluetext.value)); //convert blue’s decimal value to hex

colorCode = red + green + blue; //create hexadecimal color code
document.bgColor = colorCode; //set background color
document.fgColor = changeFgColor(colorCode); //change font color to something readable
document.colorform.hextext.value = "#" + colorCode; //rewrite hex’s text field with new color code
}

function changeInput(type) {
inputType = type; //inputType is to determine whether the user is changing the decimal text fields,
//or the hexadecimal text fields
}

function instruct() { //alerts user with instructions
alert("Enter a Red, Green, or Blue value of 0 to 255 \nor enter a 6 digit Hex Color Code using numbers 0-9\nand letters A-F then click Change Background.");
}

_________________________________________________________

<!– Paste this code into the HEAD section of your HTML document.
You may need to change the path of the file. –>

<script type="text/javascript" src="colorChange.js"></script>
_________________________________________________________

<!– Paste this code into the BODY section of your HTML document –>

<div style="width: 300px; margin-left: 30%; background-color: #fff; color: #00009C; text-align: center; line-height: 1.5em; ">
<form name="colorform" onSubmit="changeBgColor(); return false;">
Red: <input type="text" name="redtext" size="3" value="255" onfocus="changeInput(’dec’)">
Green: <input type="text" name="greentext" size="3" value="255" onfocus="changeInput(’dec’)">
Blue: <input type="text" name="bluetext" size="3" value="255" onfocus="changeInput(’dec’)">
<br>
Hex Code: <input type="text" name="hextext" size="7" value="#FFFFFF" onfocus="changeInput(’hex’)">
<br>
<input type="submit" value="Change Background" style="background-color: #00009C; color: #fff;">
<br>
<input type="button" value="Instructions" onclick="instruct()" style="background-color: #00009C; color: #fff;">
</form>
</div>

I have questions regarding my specific domain name registration and forwarding on yahoo. Who can I talk to?

Sunday, November 8th, 2009

I couldn’t find my answers on the website.

It appears that the question period has expired. If you have received an answer that meets your needs, _please_ choose one of those as a ‘best answer’ as soon as you can; otherwise, this question will go to an automatic vote. If you haven’t received a good answer for your question, you may want to consider the following,

1) Remove this version of your question and re-post your question. Newer questions get more activity on Yahoo! Answers than old ones.
2) If you do re-post your question, consider why it wasn’t answered the first time. Could it be more specific? Could it be worded better? Were there grammatical or spelling errors? Was it in the best category? Can you provide more helpful details?

If it doesn’t seem likely that re-posting your question will help you, then here’s a listing of my favorite ‘answer sites’. Maybe one of them will help you.

Answers.com http://www.answers.com/
Bartleby http://www.bartleby.com/
Yahoo Reference http://education.yahoo.com/reference/…
HowStuffWorks http://www.howstuffworks.com/
Wikipedia http://en.wikipedia.org/wiki/main_page…

Since I really haven’t answered your question, it is not necessary to give me any points. Regards.

What’s a good free web host that I can use for my current domain registered with Yahoo?

Sunday, November 8th, 2009

I already purchased a domain with Yahoo. but I didn’t realize it would ask me for more money just to put up my own template. Can anyone suggest a free web host that works with Yahoo domains?

You can get a free hosting from 000webhost.com. However, dont expect too much from free hosting. Suggest get your own hosting since the hosting cost nowadays is cheap.

If you need some coupon code, you can get it from http://blogbloging.blogspot.com/search/label/domain

What is the cheapest site on which I can register a new domain name? Also what is the cheapest hosting site?

Sunday, November 8th, 2009


I recommend one of these: http://www.hosttell.com/

Powweb is on a 50% sale - $3.88/month ($46.56/year), and you get a free domain from them.

Godaddy doesn’t offer a free domain, but you can get one for $2.19 if you’re buying hosting from them, plus they also have a 20% sale at the moment. (They don’t advertise it anywhere on their site). Use their coupon code at http://www.hosttell.com/

can we do web hosting from home, i read sites of googlehotcash are scams, how to go about web hosting then?

Sunday, November 8th, 2009

I read that googlehotcash etc., websites are scam in YAHOO INDIA ANSWERS. The answer even mentions that they are not sponsered by yahoo and google. Then are there really sponsered jobs of web hosting we can carry out from home?

You can do the sponsored with yourself, some of the web hosting companies offered the free affiliate program and you can join their program. In my opinion, you should have a website with yourself, even you don’t have a website, you can start a free blog to earn the sponsor money.

Check

http://www.webhost4lifereview.com/top-10-web-hosting

If I own the DOMAIN NAMES 2007worldnews.com and 2007-world-news.com and 2006-2007.net why dont i show topp 10-

Sunday, November 8th, 2009

I OWN 2006-2007.NET 2006INFO.COM 2006WORLDNEWS.COM 2007WORLDNEWS.COM 2007-WORLD-NEWS.COM WHY IS IT WHEN EVER I GET A GOOD DOMAIN NAME I AM HID AT THE BOTTOM OF RESULTS BUT WHEN I GET A DOMAINNAME LIKE 2006TOPPS I AM AT THE TOPP

Maybe you have no content on those pages? Or you are using cheap SEO tricks that will make your site blocked by search engines.

cheapest way to buy a domain name…?

Friday, November 6th, 2009

I have a blogger account. I just wanted to buy a domain name so I can redirect my blog to that domain.

I would recommend registering with JordanSoft, http://www.JordanSoft.com; it is a Wild West Domain reseller similar to GoDaddy. This reseller is cheaper than GoDaddy for most of the same products. Buying from http://www.JordanSoft.com or GoDaddy makes no difference in service, but you can compare prices to save you a few bucks.

For Domain Name registration:

.COM: $9.99/year on GoDaddy, $7.99/year on http://www.JordanSoft.com

.NET: $12.99/year on GoDaddy, $6.49/year on http://www.JordanSoft.com

.ORG: $14.99/year on GoDaddy, $7.99/year on http://www.JordanSoft.com

And you will have everything you need to get started online for free, you get the following FREE with every domain:

. Free Forwarding/Masking

. Free E-Mail Account: Free Fraud, spam and virus protected email that includes 1 GB of total storage

. Free Ad-Supported Hosting: Reliable and backed by 24/7 support, includes 10 GB of Disk Space, 150 GB of Transfer, Windows or Linux, FTP Access, and much more.

. Total DNS Control

. Free Photo Album

. Free Blog

What is the best domain register center?

Friday, November 6th, 2009

Hi, please tell me what is the best domain register center? (Such as www.onlinenic.com, www.tucows.com, etc.)

http://www.LocoDomains.com has the best deals and service

a free domain name registration and web hosting company?

Friday, November 6th, 2009

i desire to host a site for school club. and i am no financial okay. please give me info about any site that host freely

http://www.freeservers.com/ for FREE web hosting.
http://www.dot.tk for FREE domain

http://smallbusiness.yahoo.com Domains only 2.99 Dollars per YEAR!

Can I register a Domain name for free? w/o going to a hosting party but through the ICANN?

Friday, November 6th, 2009


Hello John!
You cannot get domain for free. I suggest this site for reliable and easy domain hosting >>>>>>> http://miempresaenlinea.com/hosting.aspx .
Also you can get here domain hosting in affordable price and i suggest to you paid hosting is always best than free hosting.