Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript/HTML Problem: Works great in Safari and opera, but not in Firefox

    Hey guys, so im using innerHTML function to change text in a page without actually changing the entire page and i ran across some helpful code on the internet, it works great on safari and opera but when i click the "button" (which is just text) in firefox nothing happens at all, i checked the error console in firefox and it says "hu is not define". can you guys help me out, here is my code

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>index.jpg</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <style type="text/css">
    td img {display: block;}body {
    	background-color: #000;
    	font-family: Verdana, Geneva, sans-serif;
    	color: #FFF;
    	font-size: 12px;
    }
    #text1 {
    	font-weight: bold;
    }
    .c {
    	color: #FFF;
    	font-family: "Lucida Console", Monaco, monospace;
    }
    .c {
    	font-size: 9px;
    }
    .c {
    	font-size: 12px;
    }
    .c {
    	font-family: Verdana, Geneva, sans-serif;
    }
    .j {
    	color: #993;
    }
    .a {
    	color: #FFF;
    	font-family: Verdana, Geneva, sans-serif;
    }
    .Black {
    	color: #000;
    	font-family: Verdana, Geneva, sans-serif;
    }
    .Banner {
    	font-size: 24px;
    	color: #FFF;
    	font-family: Georgia, "Times New Roman", Times, serif;
    }
    .White {
    	color: #FFF;
    	text-decoration: none;
    }
    td img {display: block;}body {
    	background-color: #000;
    	font-family: Verdana, Geneva, sans-serif;
    	color: #FFF;
    	font-size: 12px;
    }
    #text1 {
    	font-weight: bold;
    }
    .c {
    	color: #FFF;
    	font-family: "Lucida Console", Monaco, monospace;
    }
    .c {
    	font-size: 9px;
    }
    .c {
    	font-size: 12px;
    }
    .c {
    	font-family: Verdana, Geneva, sans-serif;
    }
    .j {
    	color: #993;
    }
    .a {
    	color: #FFF;
    	font-family: Verdana, Geneva, sans-serif;
    }
    .Black {
    	color: #000;
    	font-family: Verdana, Geneva, sans-serif;
    }
    .Banner {
    	font-size: 24px;
    	color: #FFF;
    	font-family: Georgia, "Times New Roman", Times, serif;
    }
    .White {
    	color: #FFF;
    	text-decoration: none;
    }
    
    .small {
    	font-size: 8px;
    }
    </style>
    <!--Fireworks CS3 Dreamweaver CS3 target.  Created Tue Jan 05 05:43:14 GMT+0000 (GMT) 2010-->
    </head>
    <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="00" marginheight="0">
    <center>
    <script type="text/javascript">
    function changeText2(){
    	document.getElementById('text1').innerHTML = 'Fred Flinstone';
    }
    function changeText(){
    	document.getElementById('text1').innerHTML = 'P.Krama provides a comprehensive conveyancing service whether you are selling, buying or re-mortgaging your property, we are here to help. The difference with P.rama as opposed to other solicitors is that you get a high quality, hassle free service with a team of solicitors that you know you can trust. So, if your thinking of moving into your dream home without all the hassle and stress then contact us. 2';
    }
    </script>
    
    <script type="text/javascript">
    function goHo() {
    hu.innerHTML="P.Krama provides a comprehensive conveyancing service whether you are selling, buying or re-mortgaging your property, we are here to help. The difference with P.rama as opposed to other solicitors is that you get a high quality, hassle free service with a team of solicitors that you know you can trust. So, if your thinking of moving into your dream home without all the hassle and stress then contact us.";
    }
    function goBo() {
    hu.innerHTML="P.Krama's litigation team offers expert assistance on the matters listed below. Our Litigation Department can offer a comprehensive services for all commercial and civil disputes.<br><br>-Debt recovery<br>-Insolvency proceedings<br>-Contract disputes<br>-Appeals to the High Court<br>-Other<br><br>We recognise the importance of speed and efficiency and seek at all times to provide clear advice and, where necessary, prompt action. We also recognise the need where appropriate for mediation or alternative dispute resolution approaches.<br><br>P.Krama understands how complex litigation matters can be that’s why we keep you updated all the time.";
    }
    
     	
    function goFo() {
    hu.innerHTML="P.Krama offers highly competent and cost effective representation In all areas of family and matrimonial law, acting for Husbands and Wives, Male and Female partners in non- married relationships. We can help you with:<br><br>-Divorce, Judicial Separation & Nullity<br>-Injunctions<br>-Civil Partnerships<br>-Same Sex Couples<br>-Domestic Violence<br>-Pre-nuptial Agreements<br>Adoption<br>-Separation Agreements<br>-Maintenance<br>-Financial Settlements on Divorce, separation etc<br>-Inheritance claims<br><br>Family proceedings are stressful. We aim to reduce that stress by dealing with your case quickly and sensitively and by keeping you fully informed at all times. We also aim to keep your costs as low as possible.<br><br>With P.Krama Family Solutions you can place your trust in us to deal with your case sensitively, cost-effectively and quickly."
    }
    
    
    function goIo() {
    hu.innerHTML="At P.Krama we have a strong team of solicitors specialising in all aspects of immigration and nationality law. Our expert team offers both businesses and individuals effective and client-focused advice in all commercial and personal immigration matters. The service we provide is based upon a thorough knowledge of the law and immigration procedures, enabling us to guide our clients through the immigration maze. We enjoy a high level of success and have earned a reputation in providing high quality legal services for our clients. Below is a list of some of the immigration matters we consider:<br>For Employers:<br>-Work Permits<br>-TWES<br>-Business Applications<br>-Business Visitors<br>-Immigration planning for UK starts ups<br>For Individuals:<br>-Highly Skilled Migrant ProgrammeEC association agreements<br>-Innovators<br>-Investors<br>-Working Holiday makers<br>-Students<br>-Retired persons of independent means<br>-Fiancé, spouse, unmarried partners<br>-British Citizenship<br>-Dependency applications<br>-VISA’S"
    }
    
    function goWo() {
    hu.innerHTML="For your peace of mind and to ensure that your loved ones are catered for you need to have your own will. We have the specialist knowledge to prepare tailored wills to suit your circumstances.<br><br>After a death it is important for those who are left behind that the estate is administered with sympathy as well as with efficiency.  It involves obtaining valuations of all the assets of the estate, agreeing the tax liability, applying for the Grant of Probate (or Letters of Administration in the event that there is no Will) and then with that authority gathering in the assets of the estate and administering them according to the Will or according to intestacy laws as the case may be.<br><br>As an income provider or parent it is even more important to plan for the eventualities following death in order to minimise the distress and worry for loved ones.<br><br>P.Krama also provide tailored, general, specific or enduring powers of attorney."
    }
     	
    
    function goPo() {
    hu.innerHTML="Problems can often arise in relation to your property, whether it is owned or rented. Very often these involve highly charged emotional issues and we recognise this. Solicitors at P.Krama who deal with property disputes are senior and experienced solicitors.  They will give your case the sympathy and understanding it deserves, while at the same time taking a step back from the emotional issues before giving you best legal and pragmatic advice.<br><br>-Boundary disputes<br>-Ownership issues<br>-Problems with neighbours or neighbouring land<br>-Issues concerning covenants and their interpretation<br>-Trespass<br>-Building disputes<br>-Rights of way (public and private)<br>-Issues with mortgages<br>-Tenancy agreements and their interpretation<br>-Your liability under various health & safety regulations<br>-Dealing with rent arrears and tenancy problems<br><br>We have a strong reputation and experience in dealing with issues that arise from residential tenancies and if you are a landlord we can advise and guide you through the letting process."
    }
    
    function goEo() {
    hu.innerHTML="Employment law is continually evolving presenting new challenges to employers and employees alike. We advise on all aspects of employment law and act for employers and employees alike.<br><br>We give practical advice on protecting interests and formulating clear strategies according to the size and needs of a particular business or employee.<br><br>Our Employment Department specialises in:<br>-Producing company handbooks and grievance procedures<br>-Representation at Employment Tribunals and appeals<br>-Restrictive covenants and restraint of trade clauses<br>-Unfair Dismissals<br>-Sex, race, disability and other forms of workplace discrimination<br>-Workplace bullying cases<br>-Boardroom disputes<br>-Sexual harassment<br>-Compromise Agreements<br><br>Employment law is complicated, challenging and ever-changing for employers and employees alike, P.Krama has the expertise to act for both. You can expect P.Krama to use its expertise to give you a successful outcome."
    }
    </script>
    
    <table border="0" cellpadding="0" cellspacing="0" width="979">
    <!-- fwtable fwsrc="Law2.png" fwpage="Page 1" fwbase="index.jpg" fwstyle="Dreamweaver" fwdocid = "852343071" fwnested="0" -->
      <tr>
       <td><img src="images/spacer.gif" width="284" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="35" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="77" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="112" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="112" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="112" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="112" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="111" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="24" height="1" border="0" alt="" /></td>
       <td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
    </tr>
    
      <tr>
       <td colspan="9"><img name="index_r1_c1" src="images/index_r1_c1.jpg" width="979" height="36" border="0" id="index_r1_c1" alt="" /></td>
       <td><img src="images/spacer.gif" width="1" height="36" border="0" alt="" /></td>
      </tr>
      <tr>
       <td colspan="9"><img name="index_r2_c1" src="images/index_r2_c1.jpg" width="979" height="92" border="0" id="index_r2_c1" alt="" /></td>
       <td><img src="images/spacer.gif" width="1" height="92" border="0" alt="" /></td>
      </tr>
      <tr>
       <td><img name="index_r3_c1" src="images/index_r3_c1.jpg" width="284" height="49" border="0" id="index_r3_c1" alt="" /></td>
       <td colspan="2" align="center" background="images/index_r3_c2.jpg" class="Black" ><a STYLE="text-decoration:none" href="index.html"><font color="#000000" >Practices</font></a></td>
       <td align="center" background="images/index_r3_c4.jpg" class="White"><A STYLE="text-decoration:none" HREF="about.html"><font color="#FFFFFFF" >About Us</font></A></td>
       <td align="center" background="images/index_r3_c5.jpg" class="White"><A STYLE="text-decoration:none" HREF="accre.html"><font color="#FFFFFF" >Accreditation</font></A></td>
       <td align="center" background="images/index_r3_c6.jpg" class="White"><A STYLE="text-decoration:none" HREF="sol.html"><font color="#FFFFFF" >Solicitors</font></A></td>
       <td align="center" background="images/index_r3_c7.jpg" class="White"><A STYLE="text-decoration:none" HREF="loc.html"><font color="#FFFFFF" >Location</font></A></td>
       <td align="center" background="images/index_r3_c8.jpg" class="White"><A STYLE="text-decoration:none" HREF="contact.html"><font color="#FFFFFF" >Contact Us</font></A></td>
       <td background="images/index_r3_c9.jpg"></td>
       <td><img src="images/spacer.gif" width="0" height="49" border="0" alt="" /></td>
      </tr>
      <tr>
       <td colspan="9"><img name="index_r4_c1" src="images/index_r4_c1.jpg" width="979" height="254" border="0" id="index_r4_c1" alt="" /></td>
       <td>&nbsp;</td>
      </tr>
      <tr>
       <td colspan="2" align="right" background="images/index_r5_c1.jpg" class="Banner">Practices&nbsp;</td>
       <td rowspan="2" colspan="7"><img name="index_r5_c3" src="images/index_r5_c3.jpg" width="660" height="83" border="0" id="index_r5_c3" alt="" /></td>
       <td><img src="images/spacer.gif" width="1" height="58" border="0" alt="" /></td>
      </tr>
      <tr>
       <td colspan="2"><img name="index_r6_c1" src="images/index_r6_c1.jpg" width="319" height="25" border="0" id="index_r6_c1" alt="" /></td>
       <td><img src="images/spacer.gif" width="1" height="25" border="0" alt="" /></td>
      </tr>
      <tr>
       <td colspan="9" align="left" valign="top" bgcolor="#2E2220">
       
    <!-- <input type='button' onclick='changeText()' value='Conveyancing'/>
    <input type='button' onclick='changeText2()' value='Change Text'/> 
       <p class="c"><b id='text1'>Welcome to the Services</p> -->
        
    <a href="#" class="a" onClick="goHo()" ">Conveyancing</a>&nbsp;  
    <a href="#" class="a" onClick="goBo()" ">Litigation</a>&nbsp;
    <a href="#" class="a" onClick="goFo()" ">Family</a>&nbsp;
    <a href="#" class="a" onClick="goIo()" ">Immigration</a>&nbsp;
    <a href="#" class="a" onClick="goWo()" ">Wills and Probate</a>&nbsp; 
    <a href="#" class="a" onClick="goPo()" ">Property Disputes</a>&nbsp;
    <a href="#" class="a" onClick="goEo()" ">Employment</a>&nbsp;
    
    <p id="hu">Please Choose A Service</p>
    
       </td>
       <td><img src="images/spacer.gif" width="1" height="50" border="0" alt="" /></td>
      </tr>
      <tr>
       <td colspan="9" align="right" valign="middle" Background="images/index_r8_c1.jpg" class="small"><A HREF="Privacy.html" class="White" STYLE="text-decoration:none"><font color="#FFFFFFF" >Privacy</a> || <A HREF="contact.html" class="White" STYLE="text-decoration:none"><font color="#FFFFFF" >Contact Us&nbsp;&nbsp;&nbsp;</a></a></td>
       <td><img src="images/spacer.gif" width="1" height="32" border="0" alt="" /></td>
      </tr>
    </table>
    </center>
    </body>
    </html>
    Thanks in advance!

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    <a href="#" class="a" onClick="goHo()" ">Conveyancing</a>&nbsp;
    <a href="#" class="a" onClick="goBo()" ">Litigation</a>&nbsp;
    <a href="#" class="a" onClick="goFo()" ">Family</a>&nbsp;
    <a href="#" class="a" onClick="goIo()" ">Immigration</a>&nbsp;
    <a href="#" class="a" onClick="goWo()" ">Wills and Probate</a>&nbsp;
    <a href="#" class="a" onClick="goPo()" ">Property Disputes</a>&nbsp;
    <a href="#" class="a" onClick="goEo()" ">Employment</a>&nbsp;
    Have you heard about progressive enhancement? The idea is to make a web page which can serve all the basic functionalities for all users, including those who have no javascript support in their browser. Search engines also comes under this category.

    The best method is to make a single page and load the text/contents using some server-side code like PHP.

    PS: Know, why using tables for layout is stupid!
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •