This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Pl Help me this error

Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator

In my website i used html form to get the input from user. the user press the button the value are passed into java applet. The result will display in applet.

my HTML coding for calling applet is

<SCRIPT LANGUAGE="JavaScript"><!--
var _info = navigator.userAgent; var _ns = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true) document.writeln('<Center><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="360" height="350" codebase=" ion=1,1,2,0"><NOEMBED><XMP>');
else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.1.2" java_CODE = "suddhi.class" name=SuddhiPanchang width="360" height="350" pluginspage="">; <NOEMBED><XMP>');
<APPLET mayscript="true" CODE = "suddhi.class" width="450" height="200" name=SuddhiPanchang ></XMP>
<PARAM NAME = CODE VALUE = "suddhi.class" >

java script code

function calculate()



var day1 = floor(document.forms[0].Day1.value);
var mon1 = floor(document.forms[0].Month1.selectedIndex) +1;
var year1 = floor(document.forms[0].Year1.value);
var day2 = floor(document.forms[0].Day2.value);
var mon2 = floor(document.forms[0].Month2.selectedIndex) +1;
var year2 = floor(document.forms[0].Year2.value);
var tzone = abs(floor(document.forms[0].ZoneHour.value));
tzone += floor(document.forms[0].ZoneMin.value)/60;

if(Math.floor(document.forms[0].ZoneHour.value)<0.0) tzone *= -1;
document.SuddhiPanchang.setStart(day1,mon1,year1,day2,mon2,year2,tzone); }

i have error in the above line
'document.SuddhiPanchang' is null or not an object

url: http:\\\panch\msuddhi.htm check this

please help me

author and iconoclast
Posts: 24203
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Report post to moderator
In this other thread, you were advised to use an OBJECT tag instead of an APPLET tag. Did you try that? It's really quite rude to start a new thread with the same question over again. I'm going to close this one; please continue the discussion in the previous thread.

Also, the JavaRanch naming policy requires that your display name include both a first and last name. You need to change yours here. Thanks.
[ April 05, 2005: Message edited by: Ernest Friedman-Hill ]
and POOF! You're gone! But look, this tiny ad is still here:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic