Java Script In Xhtml Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Java Script In Xhtml Page

    can sum1 whoi knows java script help me plz. im doing a web page with java script included but the java script functions are not working. plz tell me wuts wrong with this page
    Code:
    <?php
    
    include("config.php");
    
    header("content-type: application/xhtml+xml; charset=utf-8");
    
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
    
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    
            <head>
    
    
        <title>Fun Mobile ™</title>
    
    <script language="javascript">
    
    himg1 = new Image();
    himg1.src = "images/h1.png";
    himg2 = new Image();
    himg2.src = "images/h2.png";
    
    function swapImg(el,newone)
    {
        iml = "url(&#39;"+newone+"&#39;)"
        el.style.backgroundImage = iml;
    }
    function gotourl(loc)
    {
        window.location = loc;
    }
    </script>
    
            <link rel="StyleSheet" type="text/css" href="style/1.css" />
    
            <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
    
        </head>
    
    
    
    <body link="#CC0000" vlink="#CC0000" alink="#CC0000" bgcolor="#555555" bottommargin="0" topmargin="0">
    <table width="800" border="0" bordercolor="#000000" style="border-collapse:collapse" align="center" bgcolor="#F0F0F0">
    <tr>
    <td width="800" height="150" background="images/logo.png" colspan="7">
    </td>
    
    </tr>
    
    <tr>
    
    <td width="97" height="31" background="images/1.png">
    
    </td>
    
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    
    <td width="218" height="31" background="images/1.png">
    
    </td>
    
    </tr>
    
    <tr>
    
    <td colspan="7" width="800" height="500" valign="top">
    
    <table width="780" border="0" style="border-collapse:collapse" cellspacing="0" cellpadding="0">
    
    
    </table>
    
    </td>
    
    </tr>
    
    </table>
    
                </body>
    
    
        </html>

    #2
    a error

    Code:
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    <td width="97" height="31" background="images/h1.png" style="cursor:pointer" onMouseUp="gotourl(&#39;index.php&#39;)" onMouseOver="swapImg(this,&#39;images/h2.png&#39;);return true;" onMouseOut="swapImg(this, &#39;images/h1.png&#39;);return true;"></td>
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      lol nope m8 not that. i fixed it though.

      Comment


        #4
        some fones dont have java scripting

        the ones i know has it is 6630 nokia and up
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          im making for web bro

          Comment


            #6
            Hmm Sory mate but that is for big masters not for me i dont now well all the php

            Comment


              #7
              I know a guy that does javascript,,, i copyd the txt will ask him when i see him and let you know bro,,,, if it would help

              Click here!!!

              Comment


                #8
                thank bro but i already fixed it.

                Comment


                  #9
                  thank bro but i already fixed it.[/b]

                  here is a example of your code.
                  Attached Files
                  http://ngeo.ro

                  Comment

                  Working...
                  X