• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Help ,urgent

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now i am developing a system which inputdevice is touch panel only .Its Image is like : there are several buttons ( say [Digital] [Japanese ] [English] .. etc ) in browser . when user click [Digital ] , 0-9 digital key is loaded , when user click [English] , then A-Z is loaded . When user finsihed input , click [search] , then a FORM request is sent to some servlet .Can some one tell me how can change the contents of a html by using JAVAscript :
Another question. when user clicked [japanese ] button , i want that button be highlighted with a different color . how can i do this
Thanks in advance
ZY
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you are talking about doing is using DHTML to modify your HTML document. This is a VERY broad subject, and the two specific questions that you have asked can both be accomplished in several ways.
As far as the loading of different key pads, I think I would probably create an IFRAME in my HTML document and control its src property in the onClick event of your control buttons. Maybe something like this:

As far as highlighting a button, it depends upon whether you are using graphic buttons or HTML buttons. In case of graphic buttons, you need a new GIF to show the highlight and you simply replace the image's src property. In the case of an HTML button, you can change its background color using style sheets.
[This message has been edited by Bodie Minster (edited September 18, 2001).]
 
zheng yu
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Bodie
your first idea worked.
i will make my second question more clear . Every button(It actually is a href element) has 2 gif files ( one is button press down image , the other is button up image ) , i use these 2 images to gain 3D effect( Add OnMouseDown="showImage(...)"...) . when i want to hightlight specified button , i not only change its button up image , but also want to change its MouseDown behavior on the fly . Can this be done by using javascript ?

Thanx again , specially to Bodie
ZY
 
zheng yu
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Bodie
your first idea didnot work
<HTML>
<HEAD>
<TITLE>Test</TITLE>
<SCRIPT LANGUAGE="Javascript">
function showKeyPad(keyPadType){
KeyPad.src = keyPadType + ".htm";
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME=UserSelections>
<BUTTON NAME="English" onclick="showKeyPad('kana')">English</BUTTON>
<BUTTON NAME="Japaneese" onclick="showKeyPad('kmj')">Japaneese</BUTTON
<BR><BR>
<IFRAME NAME="KeyPad" WIDTH="300" HEIGHT="300"></IFRAME>
</FORM>
</BODY>
</HTML>
Please help me
ZY
 
zheng yu
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Everntually , i have straighted it out .
Javascript function is like below :
function showKeyPad(keyPadType){
KeyPad.location.href = keyPadType + ".html" ;
}
Can some one show methe way to solve the 2nd question above
Thanks
ZY
 
reply
    Bookmark Topic Watch Topic
  • New Topic