Showing posts with label posting html javascript code. Show all posts
Showing posts with label posting html javascript code. Show all posts

Sunday, April 18, 2010

Redirect page to page on blogger use css or javascript

To Blogger Users, Want to redirect a page to another page or URL to URL..?

Look at the example script below, on red color is source of URL/page that would be to redirect , and blue color is destination url of direction where it will be addressed

Place the code after <head> tag, before <b:skin><![CDATA[/* tag

EXAMPLE 1

<b:if cond='data:blog.url == &quot;http://free-7.blogspot.com/2010/04/SOURCE.html&quot;'>
<meta http-equiv="refresh" content="0; url=http://free-7.blogspot.com/2010/04/DESTINATION.html" />
</b:if>

EXAMPLE 2

<b:if cond='data:blog.url == &quot;http://free-7.blogspot.com/2010/04/SOURCE.html&quot;'>
<meta http-equiv="refresh" content="0; url=http://WWW.GOOGLE.COM" />
</b:if>

I think the best way is to add NOINDEX meta tag , to avoid considered as SPAM by search engine spiders

EXAMPLE 3 :

<b:if cond='data:blog.url == &quot;http://free-7.blogspot.com/2010/04/SOURCE.html&quot;'>
<meta http-equiv="refresh" content="0; url=http://www.seokick7.com/" />
<meta content='NoIndex' name='Robots'/>
</b:if>

Here, you can also change the value of content="0 , for example : content="12 (12 seconds), and make an alert message on your page/blog post :

Example text on your post/page : "You will be redirected to www.themes7.net in about 12 seconds, Okay.."

Another way, use JavaScript,
Place the code after <head> tag, before <b:skin><![CDATA[/* tag , on the source blog (a blog url where use the code below will be redirect to "YOUR-DESTINATION-LINK.com" )

Example-1:

<script language='javascript' type='text/javascript'>
window.location=&quot;http://YOUR-DESTINATION-LINK.com/&quot;;
</script>

Example-2

<b:if cond='data:blog.url == &quot;http://YOUR-SOURCE-LINK.HTML&quot;'>
<meta content='NoIndex' name='Robots'/>
<script language='javascript' type='text/javascript'>
window.location=&quot;http://YOUR-DESTINATION-LINK.com/&quot;;
</script>
</b:if>

Use the redirect methods according to your purpose.

Monday, March 15, 2010

Online free web site design tools blog, HTML color picker

If you've found some online tools on my post that's not working , it was caused by. the server (pages.google.com) where I save my files has been closed.

And finally I decided to make a simple blog with free online tool, for the purposes of designing blogs / website design for your blogs or websites please. So, check out here: http://webdesigncode.themes7.net

A new blog 1 day old, while still containing :

  1. HTML Color HEX Code Generator (post)
  2. Encode JavaScript / HTML Entities Tool (post)
  3. JavaScript / HTML Encryption Tool (post)
  4. Free Bullets, icons ..

online html color code maker tool

Want to place your Adsense code within blogger posting, under post title..? , here are the easy steps:

1. Parse the code to replace special characters with HTML Entities Tool
2. Login to Blogger, go to Layout - Edit HTML - Check-list "Expand Widget Templates"
3. Search for <data:post.body/> or <p><data:post.body/></p>
4. Place your Adsense code on the line immediately above this
5. Save the template,

<div align="center">

&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-xxxxxxxxxxxx&quot;;
google_ad_host = &quot;pub-xxxxxxxxxxxxxx&quot;;
google_ad_slot = &quot;xxxxxx&quot;;
google_ad_width = 336;
google_ad_height = 280;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;

</div>
<p><data:post.body></data:post.body></p>

Placing adsense code such as above, is does not violate to TOS of adsense , because it is not make changes to the adsense code , but make changes to the template codes.

A "blog" still be prepared , there are two post :H1, H2, H3 basic guide settings to make blogspot more SEO friendly - How to make related posts appear on each posting blogger/blogspot.. (related category/label widget)
,SEO C0ntest - Webthesurfi Rugs Webdesign

Monday, December 8, 2008

Make Link Color Variations With Java Script

dodol java scriptHere's ,the way and short tutorial in making link animations with java script code to make beautiful your blog accessories. Make your visitors will become fascinated watching this link color combinations

Bring your mouse cursor to some links at my others blog here seo blog-tips , which i mean like that's
That's onmouseover function of java script , so if the mouse cursor cross over a link then will be visibleing an efect.

Ok, if you interest to use this "DODOL COLOR" with the easily way , then:

1- Insert the script below into your CSS/HTML section of your web, under the <body> tag,
Right after the tag itself, before anything else.

<script src="http://hastiantech.googlepages.com/dodol.js"></script>

After you placing the script , everyting links or anchor will be having the efects like my blog here.

2- If you'd like to add effect to other texts or paragraph (not link texts), then add the script below to the target tags:

onmouseover="dodol(this);"onmouseout="stopdodol();"

What's the tags? : "tag" is anything inside <> character , example :<p> or <span> or <div> or or others........
Below an example a text paragraph with dodol efect:

<p onmouseover="dodol(this);" onmouseout="stopdodol();" align="center">
example the paragraph with dodol efect
texample the paragraph with dodol efect
</p>

Exampleing for this usage , like at the first paragraph of this post,..please bring your mouse cursor up at that.

3- If you'd like to modifying for variations of the script, so...below the source code of "dodol script" , thats contained some description about color efects modification needed. please copy-pasting the code into notepad , then Save As with js extension , example color.js , dodol.js , mylink.js or ..others..



/************************************/
/* DODOL - COLOR SCRIPT */
/* (c) Iwan Rachmanto */
/* http://free-7.blogspot.com */
/********************************/



// begins to change variables


var rate = 27;
//====================================
// "rate" is if you change to lower this value
// will be soft progressively and if higher
// be sharply,standard of the rate
// among 0 - 255
//====================================



if (document.getElementById)
window.onerror=new Function("return true")

var objActive; // The object which event occured in
var act = 0; // Flag during the action
var elmH = 0; // Hue
var elmS = 112; // Saturation

//====================================
//var elmS is Saturation
// if you change to lower this value
// will be gloomy and if higher
// be more bright , standard of this value
// 0 to 255
//====================================

var elmV = 255; // Value
//================================================
//var elmV is the rate of RGB (red-green-blue)
// changing to lower this value will be blur
//and if higher be more contrast
//================================================


var clrOrg; // A color before the change
var TimerID; // Timer ID



//============================================
// Begins to change mouse command
//===========================================

if (document.all) {
document.onmouseover =dodollink;
document.onmouseout = stopdodollink;
}
else if (document.getElementById) {
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
document.onmouseover = Mozilla_dodollink;
document.onmouseout = Mozilla_stopdodollink;
}


//===================================================
// This function begins to change a text color.
//===================================================
function dodol(obj)
{
if (act == 0) {
act = 1;
if (obj)
objActive = obj;
else
objActive = event.srcElement;
clrOrg = objActive.style.color;
TimerID = setInterval("ChangeColor()",150);
}
}


//===================================================
// This function stops to change a color.
//===================================================
function stopdodol()
{
if (act) {
objActive.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}


//===================================================
// doRainbowAnchor
// This function begins to change a link color
//====================================================
function dodollink()
{
if (act == 0) {
var obj = event.srcElement;
while (obj.tagName != 'A' && obj.tagName != 'BODY')
{
obj = obj.parentElement;
if (obj.tagName == 'A' || obj.tagName == 'BODY')
break;
}

if (obj.tagName == 'A' && obj.href != '') {
objActive = obj;
act = 1;
clrOrg = objActive.style.color;
TimerID = setInterval("ChangeColor()",150);
}
}
}


//=======================================================
// This function stops to change a link color
//=======================================================
function stopdodollink()
{
if (act) {
if (objActive.tagName == 'A') {
objActive.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}


//=========================================================
// This function begins to change a link color
//for Netscape6 and Mozilla browser)
//=========================================================
function Mozilla_dodollink(e)
{
if (act == 0) {
obj = e.target;
while (obj.nodeName != 'A' && obj.nodeName != 'BODY')
{
obj = obj.parentNode;
if (obj.nodeName == 'A' || obj.nodeName == 'BODY'
)
break;
}

if (obj.nodeName == 'A' && obj.href != '') {
objActive = obj;
act = 1;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",150);
}
}
}


//=======================================================
// This function stops to change a link color
// (for Netscape6 and Mozilla browser)
//=======================================================
function Mozilla_stopdodollink(e)
{
if (act) {
if (objActive.nodeName == 'A') {
objActive.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}


//====================================================
// Change Color
// This function changes a color actually.
//====================================================
function ChangeColor()
{
objActive.style.color = makeColor();
}


//====================================================
// This function makes dodol colors.
// With litle mathematics calculations
// if you've didn't enough understanding the java script
// so please do experimenting ...
//====================================================
function makeColor()
{

// HSVtoRGB
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60;

if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}

elmR = Math.floor(elmR).toString(16);
elmG = Math.floor(elmG).toString(16);
elmB = Math.floor(elmB).toString(16);
if (elmR.length == 1) elmR = "0" + elmR;
if (elmG.length == 1) elmG = "0" + elmG;
if (elmB.length == 1) elmB = "0" + elmB;

elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;

return '#' + elmR + elmG + elmB;
}


Friday, August 22, 2008

How to posting HTML or Javascript codes

Hello bloggers, following is the way of , tips , and tool for blogger friends. about how to posting html or javascript codes, because sometimes you want to encode your text so that certain specials characters are preserved regardless of your user’s character set. This is done by replacing special characters with their HTML Entities. Unlike our HTML Encoder tool, this tool will change all special characters while preserving any HTML tags.

For example :
HTML code before encoding:

<a href="http://free-7.blogspot.com" alt="computer tips">
free7 blog
</a>

HTML code after encoding:

&lt;a href=&quot;http://free-7.blogspot.com&quot; alt=&quot;computer tips&quot;&gt;
free7 blog
&lt;/a&gt;


Javascript code before encoding

<FORM METHOD="post">

<INPUT TYPE="button" VALUE="Click me!"

OnClick = "hint_wnd = window.open(
'', 'hint_wnd', 'width=50, height=60, resizable=no, scrollbars=no' );
hint_wnd.document.write( 'Hello all!' );
return true;">
</FORM>


Javascript code after encoding:

&lt;FORM METHOD=&quot;post&quot;&gt;
&lt;INPUT TYPE=&quot;button&quot; VALUE=&quot;Click me!&quot;
OnClick = &quot;hint_wnd = window.open(
'', 'hint_wnd', 'width=50, height=60, resizable=no, scrollbars=no' );
hint_wnd.document.write( 'Hello all!' );
return true;&quot;&gt;
&lt;/FORM&gt;


Move to : Encode JavaScript / HTML Entities Tool