School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,576 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,194 people online right now. Registration is fast and FREE... Join Now!




need help getting to work in FF

 

need help getting to work in FF

TechWar

27 Jun, 2009 - 05:15 PM
Post #1

D.I.C Regular
***

Joined: 17 Feb, 2009
Posts: 468



Thanked: 7 times
My Contributions
can someone PLEASE HELP!

CODE

function writeHeader(){ //writes header for amort Table
    var hdrDiv=document.getElementById("schedule")
    var hdrTable=document.createElement("table");
    hdrTable.id="tblHeader";
    hdrTable.setAttribute("width","100%");
    hdrTable.setAttribute("border","1");
    var hdrBody=document.createElement("tbody");
    var hdrRow=document.createElement("row");
    var hdrDate=document.createElement("td");
    var hdrPrinciple=document.createElement("td");
    var hdrPayment=document.createElement("td");
    
    hdrDate.appendChild(document.createTextNode("Date"));
    hdrPrinciple.appendChild(document.createTextNode("Principle"));
    hdrPayment.appendChild(document.createTextNode("Payment"));
    
    hdrRow.appendChild(hdrDate);
    hdrRow.appendChild(hdrPrinciple);
    hdrRow.appendChild(hdrPayment);
    
    hdrBody.appendChild(hdrRow);
    hdrTable.appendChild(hdrBody);
    hdrDiv.appendChild(hdrTable);
    
    
    
    
}
    
function PrintTable(cost,intRate, pymnt,mortDate){ //prints table for top calculator
    
    var curMonth,tblPrinciple=cost,mnthlyRate=0,curYear,YearlyDed,YearlyMth,OneTime;
    
    writeHeader();
    
    curMonth=mortDate.getMonth();
    curMonth++;
    curYear=mortDate.getFullYear();
    
    
    var newDiv=document.createElement("div");
    var ScheduleResults=document.getElementById("schedule");
    var tblBody=document.createElement("tbody");
    var newTable=document.createElement("table");
    newTable.setAttribute("width","100%");
    newTable.setAttribute("border",4);
    
    
    
    while(tblPrinciple>0){
        
            var DateData=document.createElement("td");
            var PrinData=document.createElement("td");
            var PymtData=document.createElement("td");
            var newRow=document.createElement("tr");
        
            DateData.appendChild(document.createTextNode(curMonth+"/"+curYear));
            PrinData.appendChild(document.createTextNode(formatCurrency(tblPrinciple)));
            PymtData.appendChild(document.createTextNode(formatCurrency(pymnt)));
            
            newRow.appendChild(DateData);
            newRow.appendChild(PrinData);
            newRow.appendChild(PymtData);
            
            mnthlyRate=(tblPrinciple*intRate);
            tblPrinciple=tblPrinciple-(pymnt-mnthlyRate);
            
            if (curMonth==12){
                curMonth=1;
                curYear++;
            }
            else{
                curMonth++;
            }//end if
            
            tblBody.appendChild(newRow);
    } //end while
    newTable.appendChild(tblBody);
    newDiv.appendChild(newTable);
    ScheduleResults.appendChild(newDiv);
    
}
    


User is offlineProfile CardPM
+Quote Post


PsychoCoder

RE: Need Help Getting To Work In FF

27 Jun, 2009 - 05:21 PM
Post #2

Dyslexics Untie!
Group Icon

Joined: 26 Jul, 2007
Posts: 14,714



Thanked: 501 times
Dream Kudos: 11450
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:
  • Post the code you're having problems with
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

User is offlineProfile CardPM
+Quote Post

TechWar

RE: Need Help Getting To Work In FF

27 Jun, 2009 - 05:29 PM
Post #3

D.I.C Regular
***

Joined: 17 Feb, 2009
Posts: 468



Thanked: 7 times
My Contributions
It does nothing at all. I included the functions that aren't seeming to work.
everything works great in ie, just not in ff

these are supposed to perform calculations and print a table full of values into a div

User is offlineProfile CardPM
+Quote Post

RudiVisser

RE: Need Help Getting To Work In FF

27 Jun, 2009 - 06:15 PM
Post #4

.. does not guess solutions
Group Icon

Joined: 5 Jun, 2009
Posts: 1,875



Thanked: 138 times
Dream Kudos: 125
Expert In: PHP, MySQL, HTML, CSS, C#

My Contributions
Can you give us an example webpage??

That's not too much use if we don't have a usage context.
User is online!Profile CardPM
+Quote Post

TechWar

RE: Need Help Getting To Work In FF

27 Jun, 2009 - 06:31 PM
Post #5

D.I.C Regular
***

Joined: 17 Feb, 2009
Posts: 468



Thanked: 7 times
My Contributions
click here for example

This post has been edited by TechWar: 27 Jun, 2009 - 06:33 PM
User is offlineProfile CardPM
+Quote Post

RudiVisser

RE: Need Help Getting To Work In FF

28 Jun, 2009 - 04:53 AM
Post #6

.. does not guess solutions
Group Icon

Joined: 5 Jun, 2009
Posts: 1,875



Thanked: 138 times
Dream Kudos: 125
Expert In: PHP, MySQL, HTML, CSS, C#

My Contributions
Well naturally that's Firefox being crap and uncompliant as per usual, but in your Calculate() function change the beginning to this.

CODE
function Calculate(){
    var Payment, intRate, principle, Term, interest, months, temp, rate;
    var mortgageDate = new Date();
            var frmCalc = document.getElementById('frmCalc').elements;

User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 08:17AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month