Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message boxes and Forms

Status
Not open for further replies.

danmoss

Programmer
Feb 14, 2001
42
GB
I'm having a really bad thickie moment.

What I have is a drop-down menu with a number of options in it, next to this I have a button (which is not a submit button at the moment). This is part of a much bigger form which has a submit button at the bottom.
What I'm trying to acheive is to get a message box to pop up when the button is clicked that will have different contents depending on which option is selected in the drop-down. Ideally I don't want the page to re-load each time a user does this (it's a sort of help option on the form).
I'm sure this is really simple, but my addled brain can't come up with anything as yet and it's starting to annoy me :)

Any help would be much appreciated.
Cheers,
Dan Moss
Person who's been lumbered with a lovely project.
 
the msgbox function is not available for use in ASP so you will need to combine the use of javascript and your ASP to obtain this functionality. Just use a conditional statement to gain the correct message in the dialog you want.
example
<% Dim ifst
ifst = &quot;ok&quot;
if ifst = &quot;ok&quot; then %>
<script>{alert(&quot;the condition was met&quot;);}</script>
<%else%>
<script>{alert(&quot;the condition was not met&quot;);}</script>
<%end if%>

hope that helps A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top