Sunday, 30 September 2012

Change Browser Title & Get The Current page URL Using Java Script

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Girfa......</title>
    <script language=javascript>
        function tit()
        {

            top.document.title=document.forms[0].t1.value;       
        }
        function geturl()
        {
            alert(document.URL);          
        }
       
        function tmp()
        {
            alert();           
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
   
        Enter Title :
        <input type="text" id="t1" />
        <input type=button value="Change Title " onclick="tit()" />
        <br />
        <br />
         <input type=button value="Get URL " onclick="geturl()" />                   
    </form>
</body>
</html>

Picture Gallery Using Java Script With Fade Effect Change

Picture Gallery is use to show picture on a website.When there are
more than one picture has to be show then we use picture gallery
Which change pictures automatically.I'm here make a picture
gallery which change automatically with fade effect.I have save
my all picture on my current project and renamed them 1,2,3.....n
I want give credit of this gallery to http://www.cryer.co.uk

HTML Code...

<html >
<head >
    <title>Girfa Photo Gallery Demo</title>
    <script type="text/javascript">


Picture Album Auto Change Using Java script

Picture album is very important part of the web development
mostly developer  attached their organization picture on website.We see these pictures change
automatically.I always want to do this,after searching many website i got a simple
solution to  make it. Their are many standard way to achieve it. But my solution is tricky..
If you have fix number of image on your site then my code is useful for you, I renamed all my image
into serial number 1,2....... n
I used Timer on every tick of timer i changed the image's relative path
HTML Code...
 <html >
<head >
    <title>Girfa Album Timer Demo</title>

Web Page History Using Java Script

history Object

Contains information about the URLs visited by the client.
For security reasons, the history object does not expose the actual URLs in the browser history. It does allow navigation through the browser history by exposing the back, forward, and go methods. A particular document in the browser history can be identified as an index relative to the current page. For example, specifying -1 as a parameter for the go method is the equivalent of clicking the Back button.

 <a href='javascript:history.go(-1)'>Back to the previous page</a>

Jump one page back according to history  

<script language=javascript>
        function goForward()
        {
            history.go(1)
        }
    </script>

<input id="Button1" type="button" value="Next" onclick="goForward()" />

Act as forward button