Submit button display text on click

D

David Richards

I don't need a submit button to submit anything. I just want to display text
when the button is clicked. How do I do that?
 
S

Steve Easton

Display it in what?
A div or layer, text in a cell, a javscript alert box?

This will get you a javascript alert box.

In the head section:

<script type="text/javascript">
function showit(){
alert("I did this");
}
</script>

In the body of the page:

<input type="button" value="Click Me" onclick="showit();">

Note: the above requires the user to click an OK button to close the alert box.

--

Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm
 
C

Chris Leeds, MVP - FrontPage

sure, it's not a problem.
you just need an image to serve as the "button" you can get an easy one by
doing: insert/ interactive button.
then you can use the layers and behaviors feature to trigger a "click" event
to show a hidden "layer".
it works OK and it's pretty easy.

HTH

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
 
D

David Richards

This is for a class assignment. I can't use javascript because the instructor
is afraid it won't work on every browser. I disagree but that is his
requirement.

I have a selection box with a submit button. I just want to display the
correct answer as text next to the button in the selection box.
 
C

Chris Leeds, MVP - FrontPage

I'm not sure if this is too much JavaScript but you could add "onclick" to
the button to create an alert window.

--
Chris Leeds
Contact: http://chrisleeds.com/contact
Have you seen ContentSeed (www.contentseed.com)?
NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top