Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Javascript-Java
- From: raaj.mishra@xxxxxxxxxxxxx (Rajendra Mishra)
- Subject: Javascript-Java
- Date: Fri, 29 Oct 1999 12:12:27 -0400
I am using 4.61. What could be a possible way out here other than removing
the quotes from the database? Put a delimiter which I understand and convert
it back to a quote etc?
Also, here is the cde where i am calling the java fn from javascript. I
tried using Applet instead of JApplet but it doesn;t work("object oes not
support property/method" error). It works fine if the base class is applet.
Any help here would be appreciated.
Raaj.
HTML code
<HTML>
<HEAD>
<TITLE>Autogenerated HTML</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function someFunc()
{
alert()
document.applets.oneapplet.SomeFunc()
}
file://-->
</SCRIPT>
</HEAD>
<BODY onLoad="javascript:someFunc()">
<APPLET name = "oneapplet" CODE="Applet1.class" WIDTH=426
HEIGHT=266></APPLET>
</BODY>
</HTML>
----------------------------------------------------------------------------
------------
Java code
import javax.swing.*;
public class Applet1 extends JApplet
{
public void init()
{
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and
initializes
// the components. To modify the code, only use code syntax that
matches
// what Visual Cafe can generate, or Visual Cafe may be unable to
back
// parse your Java file into its visual environment.
file://{{INIT_CONTROLS
setLayout(null);
setSize(426,266);
button1.setLabel("button");
add(button1);
button1.setBackground(java.awt.Color.lightGray);
button1.setBounds(0,0,121,63);
button1.setLabel("button");
file://}}
}
public String SomeFunc()
{
return "junk";
}
file://{{DECLARE_CONTROLS
java.awt.Button button1 = new java.awt.Button();
file://}}
}
----- Original Message -----
From: Mishkin, Ernest <ernest.Mishkin@xxxxxxxxx>
To: Rajendra Mishra <raaj.mishra@xxxxxxxxxxxxx>
Cc: advanced java <advanced-java@xxxxxxxxxxxxxxxx>
Sent: Friday, October 29, 1999 7:36 AM
Subject: RE: Javascript-Java
> Hmm...
>
> Though I'm not M$ fan, not at all, but I also prefer IE to Communicator
;-)
>
> We know that in JavaScript string literals can be terminated
> with either of " or ' ...
>
> But I'm passing ints, so I haven't come across this issue.
> Which version of Communicator are you using ?
>
> Regards,
> Ernest
>
> >-----Original Message-----
> >From: Rajendra Mishra [mailto:raaj.mishra@xxxxxxxxxxxxx]
> >Sent: Thursday, October 28, 1999 8:47 PM
> >To: Mishkin, Ernest
> >Cc: advanced java
> >Subject: Javascript-Java
> >
> >
> >Hi,
> > I think I found a Netscape bug.
> > While calling a Javascript fn from Java, I am passing it a
> >string which
> >has got a single apostophe. I had assumed that this would
> >cause errors. This
> >is what I found out.
> > IE successfully called the Javascript fn but Netscape could not.
> >
> > I am happy that I am still a Microsoft-fan even after
> >doing intensive
> >Java stuff lately.
>
> ---
> To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
>
---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Javascript-Java
- From: Robert B. Weeks
- Javascript-Java
- References:
- Javascript-Java
- From: Mishkin, Ernest
- Javascript-Java
- Prev by Date: good debugger for java code
- Next by Date: good debugger for java code
- Previous by thread: Javascript-Java
- Next by thread: Javascript-Java
- Index(es):