FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Java script





Ali_karimi
Code:

<a href="javascript:adClick('http://forum.p30world.com', 'http://frihost.com/');">Click here to visit P30WORLD and Frihost</a>
<script language="JavaScript">
<!-- Begin
function adClick(ad, site) {
window.open(ad);
window.location = site;
}
//  End -->
</script>

I thing it is good script for web designer o Advertiser
budazz
are you planning to create a link using this script?... Cool
Ali_karimi
Dear budazz With this Script you can open 2 link by one click!!!
budazz
ok i see nice script...you mean it can open two links at the same time?... Very Happy
Ali_karimi
Yes My Dear [budazz].
I think If It easy To change it ...
Do you About Java script?
[Excuse me With my poor En Embarassed ]
SystemWisdom
Here is an example of a simpler function that can open as many windows as you like...

Code:

<html>
<head>
<script language="JavaScript"><!--
function OpenWindows()
{
    for( var i = 0; i < arguments.length; i++ )
        window.open( arguments[i] );
}
//--></script>
</head>
<body>

<!-- opens 1 window: -->
<br /><a href="javascript:OpenWindows( 'http://www.msn.com' )">Open 1 Window</a>

<!-- opens 2 windows: -->
<br /><a href="javascript:OpenWindows( 'http://www.msn.com', 'http://www.hotmail.com' )">Open 2 Windows</a>

<!-- opens 3 windows: -->
<br /><a href="javascript:OpenWindows( 'http://www.msn.com', 'http://www.hotmail.com', 'http://www.microsoft.com' )">Open 3 Windows</a>

</body>
</html>


If you look at each example link, they all pass a different number of pages (arguments) to open, and each respective page is accessed in the JavaScript function using the built-in 'arguments' object (available since JS 1.3)

I hope that helps!
Ali_karimi
dear SystemWisdom
I think this Code Open pop up !!!
I am true?
-------
threezeroone
I hate pop-up windows when a page is loaded. Very annoying.
z1k1
1. Many times people will link to your site and keep your pages within their own frames so that the surfer can get back to their own page. This script prevents that from occuring.

Code:

<script>
<!--
/*
Break-out-of-frames script
By Website Abstraction (http://wsabstract.com)
and Java-Scripts.net (http://www.java-scripts.net)
*/

if (window!= top)
top.location.href=location.href
// -->
</script>


2. Have your own message scroll across the status bar.

Code:

<script language="Javascript">
<!--
//This credit line must stay intact
//Status Scrolling script
//For this script, visit java-scripts.net

myMsg = "I hope you enjoy visiting Java-scripts.net!                 "

i=0

function scrollMsg() {
    frontPart = myMsg.substring(i,myMsg.length)
    backPart = myMsg.substring(0,i)
    window.status = frontPart + backPart

    if (i < myMsg.length) {
        i++
    }
    else {
        i = 0
    }

    setTimeout("scrollMsg()",50)

}

window.onload=scrollMsg
//-->
</script>


Source: Java-Scripts.net
Related topics
[Java] Top-Down Menu bar tweak.
How do I make a simple slideshow?(RESOLVED)
Java Script / Pomoc
Need this script
Java Script City
want to learn java scrpit
Help with php and java script
problem with java script file
java script checking page
A little change color script required
java script search engine..
java script popup tool tip
java script help please!!!
Java script error
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.