Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Java Help

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

Java Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-2006, 09:51 PM
thunderbucks thunderbucks is offline
Newbie
 
Join Date: Oct 2006
Posts: 8
Credits: 0
Rep Power: 0
thunderbucks is on a distinguished road
Default Scripting Conflict Help

I know absolutely nothing about javascript.
Can Someone help me.

I have two scripts
1 in the Head:<script type="text/javascript" src="budget.js"></script>
1 in the Body: <script language="JavaScript" src="header.js"></script>

When I remove the header.js, my calculator works
When I remove the budget.js, my header works

Can someone tell me how I can change the code so the they both work?
Thank You,
Michele
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 10-17-2006, 08:41 AM
thunderbucks thunderbucks is offline
Newbie
 
Join Date: Oct 2006
Posts: 8
Credits: 0
Rep Power: 0
thunderbucks is on a distinguished road
Default Source codes for java clash

Calculator Source Code:

Code:
// This Calculator generated by the
// Budget Calculator Generator Javascript
// at http://javascript.about.com/library/blbudget.htm
function stripBlanks(fld) {var result = "";var c = 0;for (i=0; i < 
fld.length; i++) {if (fld.charAt(i) != " " || c > 0){  result += 
fld.charAt(i); if (fld.charAt(i) != " ") c = result.length;}} return 
result.substr(0,c);}
function budget(thisform) {
var result = 0;
var in1 = stripBlanks(thisform.in1.value);
if (in1 != '' && in1 != parseFloat(in1)) {alert("Income must 
be numeric");thisform.in1.focus();return false;}
result += Number(in1);
var in2 = stripBlanks(thisform.in2.value);
if (in2 != '' && in2 != parseFloat(in2)) {alert("Other Income must be 
numeric");thisform.in2.focus();return false;}
result += Number(in2);
var ex01 = stripBlanks(thisform.ex01.value);
if (ex01 != '' && ex01 != parseFloat(ex01)) {alert("Rent/Mortgage must be 
numeric");thisform.ex01.focus();return false;}
result -= Number(ex01);
var ex02 = stripBlanks(thisform.ex02.value);
if (ex02 != '' && ex02 != parseFloat(ex02)) {alert("Property Tax/Ins 
must be numeric");thisform.ex02.focus();return false;}
result -= Number(ex02);
var ex03 = stripBlanks(thisform.ex03.value);
if (ex03 != '' && ex03 != parseFloat(ex03)) {alert("Electricity/Gas must be 
numeric");thisform.ex03.focus();return false;}
result -= Number(ex03);
var ex04 = stripBlanks(thisform.ex04.value);
if (ex04 != '' && ex04 != parseFloat(ex04)) {alert("Water/Trash must be 
numeric");thisform.ex04.focus();return false;}
result -= Number(ex04);
var ex05 = stripBlanks(thisform.ex05.value);
if (ex05 != '' && ex05 != parseFloat(ex05)) {alert("Food must be 
numeric");thisform.ex05.focus();return false;}
result -= Number(ex05);
var ex06 = stripBlanks(thisform.ex06.value);
if (ex06 != '' && ex06 != parseFloat(ex06)) {alert("Alcohol/Tobacco must be 
numeric");thisform.ex06.focus();return false;}
result -= Number(ex06);
var ex07 = stripBlanks(thisform.ex07.value);
if (ex07 != '' && ex07 != parseFloat(ex07)) {alert("Entertainment must be 
numeric");thisform.ex07.focus();return false;}
result -= Number(ex07);
var ex08 = stripBlanks(thisform.ex08.value);
if (ex08 != '' && ex08 != parseFloat(ex08)) {alert("Child Care 
must be numeric");thisform.ex08.focus();return false;}
result -= Number(ex08);
var ex09 = stripBlanks(thisform.ex09.value);
if (ex09 != '' && ex09 != parseFloat(ex09)) {alert("Child Support 
must be numeric");thisform.ex09.focus();return false;}
result -= Number(ex09);
var ex10 = stripBlanks(thisform.ex10.value);
if (ex10 != '' && ex10 != parseFloat(ex10)) {alert("Life/Health Ins 
must be numeric");thisform.ex10.focus();return false;}
result -= Number(ex10);
var ex11 = stripBlanks(thisform.ex11.value);
if (ex11 != '' && ex11 != parseFloat(ex11)) {alert("Car Loan must be 
numeric");thisform.ex11.focus();return false;}
result -= Number(ex11);
var ex12 = stripBlanks(thisform.ex12.value);
if (ex12 != '' && ex12 != parseFloat(ex12)) {alert("Auto Insurance must be 
numeric");thisform.ex12.focus();return false;}
result -= Number(ex12);
var ex13 = stripBlanks(thisform.ex13.value);
if (ex13 != '' && ex13 != parseFloat(ex13)) {alert("Transportation must be 
numeric");thisform.ex13.focus();return false;}
result -= Number(ex13);
var ex14 = stripBlanks(thisform.ex14.value);
if (ex14 != '' && ex14 != parseFloat(ex14)) {alert("Credit Card Pmts must be 
numeric");thisform.ex14.focus();return false;}
result -= Number(ex14);
var ex15 = stripBlanks(thisform.ex15.value);
if (ex15 != '' && ex15 != parseFloat(ex15)) {alert("Installment Loans must 
be numeric");thisform.ex15.focus();return false;}
result -= Number(ex15);
var ex16 = stripBlanks(thisform.ex16.value);
if (ex16 != '' && ex16 != parseFloat(ex16)) {alert("Miscellaneous must be 
numeric");thisform.ex16.focus();return false;}
result -= Number(ex16);
var ex17 = stripBlanks(thisform.ex17.value);
if (ex17 != '' && ex17 != parseFloat(ex17)) {alert("Telephone/Cell must be 
numeric");thisform.ex17.focus();return false;}
result -= Number(ex17);
var ex18 = stripBlanks(thisform.ex18.value);
if (ex18 != '' && ex18 != parseFloat(ex18)) {alert("Cable must be 
numeric");thisform.ex18.focus();return false;}
result -= Number(ex18);
var ex19 = stripBlanks(thisform.ex19.value);
if (ex19 != '' && ex19 != parseFloat(ex19)) {alert("Computer/Internet must 
be numeric");thisform.ex19.focus();return false;}
result -= Number(ex19);
var ex20 = stripBlanks(thisform.ex20.value);
if (ex20 != '' && ex20 != parseFloat(ex20)) {alert("Savings must be 
numeric");thisform.ex20.focus();return false;}
result -= Number(ex20);
thisform.res.value = result;}

Header Source Code: 
do***ent.write('<nobr><img src="picts/top_bar.jpg" width="305" height="60" vspace="3"><a href="http://prosperonline.us/"><img src="picts/banner.jpg" width="468" height="60" border="0" vspace="3"></a></nobr><br>');
do***ent.write('<!-- TB 1 -->');
do***ent.write('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>');
do***ent.write('<td width="278" height="78">');
do***ent.write('<table border="0" cellspacing="12" cellpadding="0" width="283" height="78" bgcolor="000000" background="picts/logo.gif"><tr><td valign="center" align="left">');

do***ent.write('<a href="index.html" cl***="logo">Virtual Lending Group</a><br>');

do***ent.write('<SPAN CL***="slogan">"Helping Borrowers Make It Happen"<br><br>');

do***ent.write('</td></tr></table>');

do***ent.write('</td><td align="right" valign="top" background="picts/top-background.gif">');
do***ent.write('<!-- LINK TABLE-->');
do***ent.write('<table border="0" cellspacing="0" cellpadding="2"><tr><td colspan="6">');
do***ent.write('<img src="picts/spacer.gif" width="50" height="9"><br>');

do***ent.write('</td></tr><form action="index.html"><tr><td>');
do***ent.write('<input type="submit" value="Home" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="borrow.html"><td>');
do***ent.write('<input type="submit" value="Borrow" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="lend.html"><td>');
do***ent.write('<input type="submit" value="Lend" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="listing.html"><td>');
do***ent.write('<input type="submit" value="Listings" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="Budget.html"><td>');
do***ent.write('<input type="submit" value="Calculator" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="contact.html"><td>');
do***ent.write('<input type="submit" value="Contact" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></tr></table>');
do***ent.write('<!-- LINK TABLE-->');
do***ent.write('</td><td align="right" width="15">');
do***ent.write('<img src="picts/top-end.gif" width="15" height="78"><br>');
do***ent.write('</td></tr></table>');
do***ent.write('<!-- TB 1 -->');

Last edited by Jordan; 10-17-2006 at 09:23 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-17-2006, 09:24 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,330
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

Can you post the header.js source code as well and possibly a link to the webpage where it isn't working?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-17-2006, 09:32 AM
thunderbucks thunderbucks is offline
Newbie
 
Join Date: Oct 2006
Posts: 8
Credits: 0
Rep Power: 0
thunderbucks is on a distinguished road
Default Thank U for any input....Michele

I just uploaded the HTML to web site.....the site is not live yet:
http://www.prosperonline.us/budgetoriginal.html
Thank You,
Michele

Code:
do***ent.write('<nobr><img src="picts/top_bar.jpg" width="305" height="60" vspace="3"><a href="http://prosperonline.us/"><img src="picts/banner.jpg" width="468" height="60" border="0" vspace="3"></a></nobr><br>');
do***ent.write('<!-- TB 1 -->');
do***ent.write('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>');
do***ent.write('<td width="278" height="78">');
do***ent.write('<table border="0" cellspacing="12" cellpadding="0" width="283" height="78" bgcolor="000000" background="picts/logo.gif"><tr><td valign="center" align="left">');

do***ent.write('<a href="index.html" cl***="logo">Virtual Lending Group</a><br>');

do***ent.write('<SPAN CL***="slogan">"Helping Borrowers Make It Happen"<br><br>');

do***ent.write('</td></tr></table>');

do***ent.write('</td><td align="right" valign="top" background="picts/top-background.gif">');
do***ent.write('<!-- LINK TABLE-->');
do***ent.write('<table border="0" cellspacing="0" cellpadding="2"><tr><td colspan="6">');
do***ent.write('<img src="picts/spacer.gif" width="50" height="9"><br>');

do***ent.write('</td></tr><form action="index.html"><tr><td>');
do***ent.write('<input type="submit" value="Home" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="borrow.html"><td>');
do***ent.write('<input type="submit" value="Borrow" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="lend.html"><td>');
do***ent.write('<input type="submit" value="Lend" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="listing.html"><td>');
do***ent.write('<input type="submit" value="Listings" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="Budget.html"><td>');
do***ent.write('<input type="submit" value="Calculator" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></form><form action="contact.html"><td>');
do***ent.write('<input type="submit" value="Contact" onmouseover="this.cl***Name=\'buttonon\'" onmouseout="this.cl***Name=\'button\'" cl***="button"><br>');

do***ent.write('</td></tr></table>');
do***ent.write('<!-- LINK TABLE-->');
do***ent.write('</td><td align="right" width="15">');
do***ent.write('<img src="picts/top-end.gif" width="15" height="78"><br>');
do***ent.write('</td></tr></table>');
do***ent.write('<!-- TB 1 -->');

Last edited by Jordan; 10-17-2006 at 05:41 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-17-2006, 06:39 PM
Saint Saint is offline
Learning Programmer
 
Join Date: Aug 2006
Posts: 63
Credits: 0
Rep Power: 9
Saint is on a distinguished road
Default

So the header.js is only outputting html? Why even have a header.js then?
__________________
Hi >> Saint
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 10-17-2006, 07:54 PM
thunderbucks thunderbucks is offline
Newbie
 
Join Date: Oct 2006
Posts: 8
Credits: 0
Rep Power: 0
thunderbucks is on a distinguished road
Default

That's an excellent question. It came with the kit. I could remove the header and set all the pages up. Honestly, I never though of that...Thank You.....Michele
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-17-2006, 08:31 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,330
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

Its possible the header was created to just use as an include. If that is the case you can just simply use ssi or PHP to include the header.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-17-2006, 09:24 PM
thunderbucks thunderbucks is offline
Newbie
 
Join Date: Oct 2006
Posts: 8
Credits: 0
Rep Power: 0
thunderbucks is on a distinguished road
Default

Thank U Jordan, Which one would you recommend? Michele Remember, I have very little experience......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-18-2006, 03:22 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,330
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

PHP

Here is a thread about including in PHP
http://forum.codecall.net/tutorials-...p-include.html
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-18-2006, 03:55 PM
thunderbucks thunderbucks is offline
Newbie
 
Join Date: Oct 2006
Posts: 8
Credits: 0
Rep Power: 0
thunderbucks is on a distinguished road
Default

Thank you, I didn't know what ssi was, duh....I thought you means social security...so I looked it up and it looks fairly simple.....thank you for all your help....I will try the PHP tonight.......Michele
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
World in Conflict Trailer Onur Video Game Talk 0 08-14-2007 05:59 AM
Shell Scripting NeedHelp General Programming 9 04-16-2007 11:04 AM
Shell Scripting Problem Chan General Programming 3 03-22-2007 11:59 AM
Processor Conflict??? xXHalfSliceXx Computer Software/OS 3 12-01-2006 12:10 PM


All times are GMT -5. The time now is 08:15 PM.

Contest Stats

Xav ........ 1322.18
MeTh0Dz|Reb0rn ........ 1053.7
morefood2001 ........ 879.43
John ........ 877.37
marwex89 ........ 869.98
WingedPanther ........ 830.24
Brandon W ........ 735.07
chili5 ........ 309.39
Steve.L ........ 236.23
dcs ........ 216.02

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 82%

Ads