473,807 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

msgbox

JT
im trying to use the MsgBox function in the following to display an ASP
MsgBox containing text retrieved from the db into a recordset

<%
set rsMessages= myRecordset
msg_text = rsMessages.Fiel ds("msg_text")
msgbox(msg_text )
%>

this generates a permission denied error b/c msgbox needs to run client side
so i tried the same code but used

<SCRIPT LANGUAGE="VBSCR IPT">
</SCRIPT>

in place of the <% %> tags

but now i just get an empty message box

i must be misunderstandin g something with the way the msgbox function works
in terms of client side vs server side.

any help would be much appreciated

jt


Jul 19 '05 #1
3 3137
http://www.aspfaq.com/2198

--
http://www.aspfaq.com/
(Reverse address to reply.)


"JT" <jt@nospam.co m> wrote in message
news:#L******** ******@TK2MSFTN GP10.phx.gbl...
im trying to use the MsgBox function in the following to display an ASP
MsgBox containing text retrieved from the db into a recordset

<%
set rsMessages= myRecordset
msg_text = rsMessages.Fiel ds("msg_text")
msgbox(msg_text )
%>

this generates a permission denied error b/c msgbox needs to run client side so i tried the same code but used

<SCRIPT LANGUAGE="VBSCR IPT">
</SCRIPT>

in place of the <% %> tags

but now i just get an empty message box

i must be misunderstandin g something with the way the msgbox function works in terms of client side vs server side.

any help would be much appreciated

jt

Jul 19 '05 #2
Well, you understand server-side vs. client-side. Now all you have to do is
bridge the two together. You want to use a msgbox, which MUST take place in
the client environment, but you want to display data that is available in
the server-side environment. So, you need to pass the server-side value to
something that the client can see. Here's how to do that.

<%
'''server side code
set rsMessages= myRecordset
msg_text = rsMessages.Fiel ds("msg_text")
%>

<script language="vbscr ipt">
''client side code
msgbox "<%=msg_tex t%>"
</script>

You'll notice when you load the page and view source, the client-side script
will have the literal value of msg_text the same way that it would if you
just put something like <td><%=msg_text %></td> somewhere.

BTW, client-side vbscript is pretty much ill-advised...

Ray at work

"JT" <jt@nospam.co m> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
im trying to use the MsgBox function in the following to display an ASP
MsgBox containing text retrieved from the db into a recordset

<%
set rsMessages= myRecordset
msg_text = rsMessages.Fiel ds("msg_text")
msgbox(msg_text )
%>

this generates a permission denied error b/c msgbox needs to run client
side
so i tried the same code but used

<SCRIPT LANGUAGE="VBSCR IPT">
</SCRIPT>

in place of the <% %> tags

but now i just get an empty message box

i must be misunderstandin g something with the way the msgbox function
works
in terms of client side vs server side.

any help would be much appreciated

jt

Jul 19 '05 #3
"JT" <jt@nospam.co m> wrote in
news:#L******** ******@TK2MSFTN GP10.phx.gbl:
im trying to use the MsgBox function in the following to display an
ASP MsgBox containing text retrieved from the db into a recordset

<%
set rsMessages= myRecordset
msg_text = rsMessages.Fiel ds("msg_text")
msgbox(msg_text )
%>

this generates a permission denied error b/c msgbox needs to run
client side so i tried the same code but used

<SCRIPT LANGUAGE="VBSCR IPT">
</SCRIPT>

in place of the <% %> tags

but now i just get an empty message box

i must be misunderstandin g something with the way the msgbox function
works in terms of client side vs server side.

any help would be much appreciated

jt



maybe i mis-understand you, but if you are trying to generate a msgbox
with SERVER side code (on the server), then you';ll be at it forever....
it cant be done with JUST asp.

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5356
by: Peter Bassett | last post by:
In my ASP script I call Javascript for a msgbox after the user has submitted the form of their resume information. I saw this example as a way to get a msgbox onto the client from ASP since server side scripts can't send a msgbox to a client. <% Const DQ = """" Response.Write("<script language=VBScript>" & "MsgBox " & DQ & "Your Resume Information Has Been Sent to companyname" & DQ & "</script>") %>
2
5998
by: js | last post by:
Hi all, I currently encounter a problem and it is urgent to me. After calling the MsgBox.Show(), the message box is shown with non-modal mode, what is the possible reason??? This only happen in the VB project, works fine in C# project. SystemModal and ApplicationModal MsgBoxStyle were all tried and there was no help.
4
3854
by: Lakrom | last post by:
Hi to all, how to put msgbox in this asp page, this send me a message Denied permission: 'MsgBox' <% Set Conn=server.createobject("ADODB.connection") Conn.open application("StrConRuta") set rs = Conn.Execute("select rut from encuestarutaparaiso where rut='" & rut_usuario & "'") if not rs.eof then msgbox "Gracias por tu interes pera ya has respondido esta encuesta" end if Set rs= Conn.Execute("Select * from tabladatos where rut = '" &...
6
5071
by: Lapchien | last post by:
In this bit of code provided so helpfully by Nath: Private Sub Command118_Click() Dim rs As DAO.Recordset Set db = CurrentDb Set rs = db.openrecordset("IMPORT")
8
784
by: deko | last post by:
Can I close a MsgBox with VBA Code? Something like: If IsOpen (MsgBox, "Title") Then Close(MsgBox, "Title") Run some code Else Run other code End If Can this be done in VBA? Do I need to work with an API function?
2
1481
by: Radith Silva | last post by:
I need to use the MsgBox function like I used to in VB 6.0 So all i do is: MsgBox ("Please provide Input") BUT IN .NET: The error reads "msgbox is a namespace"
4
1607
by: James | last post by:
What does this mean? 'To specify more than the first argument, you must use the MsgBox function in an expression' I'd love to see an example. Thanks!
9
3435
by: Ivan Jericevich | last post by:
In my code below at the line 'response' a blip sound is heard and the program exits the sub -- No MsgBox is displayed. What am I doing wrong? If nonNumberEntered = True Then msg = "Enter numbers only" style = MsgBoxStyle.OkOnly title = "ERROR in cast"
2
4856
by: perkykoala | last post by:
I apologize in advance for being REALLY detailed/verbose. It's the result of staring/tweaking code for too long. Using VB 2005: I need to design a multiple choice test (unfortunately, I can't use radio buttons). How it works... Pre-1) File consists of the following format: Question 1 Choice 1
0
9720
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10626
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3854
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.