SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: diff msg boxes in javascript
-
Aug 2, 2001, 17:32 #1
- Join Date
- Jul 2001
- Location
- Stockholm, Sweden
- Posts
- 52
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
diff msg boxes in javascript
hi,
i need to know how to make an inputbox( a msg box with a textfield) and a msg box with yes and no buttons (regular msg or alert boxes only have an ok button) in javascript/jscript.
i could always learn the whole language but i dont have the time see, im already learning like twenty other languages at the same time and another one would make me forget the old ones
thanks
-
Aug 5, 2001, 06:07 #2
- Join Date
- Jul 2001
- Location
- Stockholm, Sweden
- Posts
- 52
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
what ive heard the yes, no box is impossible with javascript so i have to use VBScript to accomplish this, does anyone know how to do that?
And for you who want to know, the inputbox thingy is possible and the syntax looks something like this:
inputValue = prompt( "text", "" );
-
Aug 5, 2001, 09:26 #3
- Join Date
- Dec 1999
- Posts
- 137
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Kint:
Here's the code if you want to create a Yes/No alert with VBScript:
<script language="VBScript">
msgbox "Text goes here", vbExclamation + vbYesNo, "Title goes here"
</script>
As you can see, this is normal VB code. Remember always to declare the language you are using in the script tag.
Hope that helps
-
Aug 5, 2001, 16:24 #4
- Join Date
- Jul 2001
- Location
- Stockholm, Sweden
- Posts
- 52
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks, but how do i know which button the user pushed? What does the function return?
-
Aug 5, 2001, 18:18 #5
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
heres a if clause working from a prompt box
Code:if (confirm("Are you sure you want to delete this page from the databse?")) { document.delform.submit() }else{ location.href="delpage.asp" }
Bookmarks