473,770 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

confirmation box question

Hi all,

i'm quite new to javascript and can't find the answer on the net, but
sorry if i'm going to ask a stupid question :-)

I am programming in PHP. The PHP code makes a message which I want to show
in a confirmation box using javascript. The message can be quite large
(about 300 characters) and thus does not fit on one line. I noticed that
although the HTML source file shows a complete text, the confirmation box
does not; the end of the text is lost.

Is it possible to automatically show the text on multiple lines, or should
I manually add newline characters (how?) ?

thanks a lot in advance,

Martin
Jul 20 '05 #1
2 7566
Martin Herrman wrote:
Is it possible to automatically show the text on multiple lines, or should
I manually add newline characters (how?) ?


Just use the \n special character:

confirm("This is the first line\nand this is the second one.");

--
| Marek A. Stepien | marcoos dot org | Linux user #153004 |
| Powered by Mozilla Thunderbird. Your mail, your way. |

Jul 20 '05 #2
Martin Herrman <m.*******@stud ent.tue.nl> wrote in message news:<pa******* *************** ******@student. tue.nl>...

I am programming in PHP. The PHP code makes a message which I want to show
in a confirmation box using javascript. The message can be quite large
(about 300 characters) and thus does not fit on one line. I noticed that
although the HTML source file shows a complete text, the confirmation box
does not; the end of the text is lost.

Is it possible to automatically show the text on multiple lines, or should
I manually add newline characters (how?) ?


confirm("line one\nline two")
Jul 20 '05 #3

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

Similar topics

3
1979
by: Dennis Allen | last post by:
Hi. On my online ordering form I use browser cookies to keep track of user items. My confirmation page reads: "If any of this information is incorrect, please go back to the order form and change it. We thank you for your patronage.". Question. At what point will I be able to delete my cookies? If I delete them before posting the online form, then they won't be available if customers from the confirmation page.
13
8106
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send data was received by the socket on the remote end? Can I count on that? Do I understand TCP correctly in that, it gives confirmation ? I do not expect, that a .Net based receiver got that data when socket.Send() terminates!
6
3709
by: Nedu N | last post by:
Hi, I want to have confirmation(Yes/No) on a button of the webform in which there are many validation controls. I want all the validation controls to be triggered first and then Yes/No confirmation message. By adding just an confirm attribute for 'onclick' event of the button doesn't work with validation controls. Is there any short way to go around this. Thanks Nedu
4
4039
by: Ron Clarke | last post by:
I have a small web app that displays data from a SQL Server database. Using a DataGrid control on a page, the user can delete a row from the database. This works fine. But I want to prompt the user for confirmation ("Are you sure...") before deleting the record. How can I do this from the ASP.NET code? Since the C# code is server-side, is there a way to display a Yes/No type of message box and only take action if the users clicks the "Yes"...
0
2271
by: Suzanne | last post by:
I'd like to know how can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key? I have found this code on a windows forms FAQ site : Public Class DataGrid_Custom Inherits DataGrid Private Const WM_KEYDOWN = &H100
2
2027
by: bienwell | last post by:
Hi all, I still have a problem when using Confirmation box in ASP.NET program. I need to get the value return of YES or NO from confirmation box in Sub function of VB program to do some tasks. For example, I have 2 text boxes and one button. The button will call On_Click event . Sub btnSelect_OnClick(ByVal sender As Object, ByVal e As EventArgs) Dim X as double = CDBL(txtbox1.text) Dim Y as double = CDBL(txtbox2.text)
3
2257
by: zek2005 | last post by:
Hi folks! I need help with the following. I made a form so the user can make a question and that question has to be inserted in my database, but before the question (and other information of the user such as email, country, etc) is inserted in the database, I want that the user confirm that he/she has made the question, so I need to send an email to the user and he/she has to reply the email to confirm it. Once I receive the email I...
1
1617
by: sweetpotatop | last post by:
Hi, I have an asp.net project written in C# It has a list of records for users to delete and select. When user click the "Delete" button, I would like to ask the user to confirm before I proceed. And I have something like this in my code button1.Attributes.Add("onClick", "return confirm('Some Prompt');");
2
2239
by: kaka | last post by:
I am developping a sns site. I was wondering if i send user's email addresses as a part of confirmation link so that when a user receives the confirmation email, he can just click on the link to login to our site without punching in the password.
0
9617
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
10099
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...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
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
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.