• Post Reply 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

InterApplet Communication

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends...
I have 2 applets in a browser and i want
to share the same datas between the 2 applets
for that wat should i do..any one knows can help me
advance thansss
bye
manik
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I think you want to send data from one applet to another.
If so here is a method.
You can use JavaScripts for that. Use the following code
//--------- html ----
< applet code=Applet01.class width=400 height=250>< /applet>
< applet code=Applet02.class width=400 height=250>< /applet>
// --------------------
// -----JavaScript-----
val01=document.applets[0].fun01();
document.applets[1].fun02(val01);
// --------------------
Let's say the 'Applet01' has afunction 'fun01' and it returns a string value. so, that value get stored to the variable 'val01'. And to pass the value of 'val01' to the second applet call 'Applet02' use the second line.
I guess that helps you.
best Regards

[This message has been edited by Jim Yingst (edited December 27, 2000).]
 
Ranjith Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I think you want to send data from one applet to another.
If so here is a method.
You can use JavaScripts for that. Use the following code
//--------- html ----
< !-- applet code=Applet01.class width=400 height=250></applet -->
< !-- applet code=Applet02.class width=400 height=250></applet -->
// --------------------
// -----JavaScript-----
val01=document.applets[0].fun01();
document.applets[1].fun02(val01);
// --------------------
Let's say the 'Applet01' has afunction 'fun01' and it returns a string value. so, that value get stored to the variable 'val01'. And to pass the value of 'val01' to the second applet call 'Applet02' use the second line.
I guess that helps you.
best Regards
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic