473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using javascript function in Datagrid in runtime

I am using confirm messagebox in javascript function generated at runtime. The messagebox comes with prompt 'Are you sure you want to accept the order". But I want to make the prompt as "Are you sure you want to accept the order No.#23001" where order no. 23001 is in a variable xxx. Please suggest modifications. The code used is as follows;

if(!this.objParent.objParent.IsStartupScriptRegist ered(strScriptId))


{
if(objParent.objParent.FindControl("GridDetailLine ")==null)
objParent.objParent.RegisterHiddenField("GridDetai lLine","");
string strAcceptScript = @"<script language=""Javascript"">function " + strAcceptScriptName + "()";
strAcceptScript+="{if (confirm(\"Are you sure you want to accept the order?\")) {" ;
strAcceptScript+=" document.forms[0].GridDetailLine.value = \"" + strAcceptScriptName + "\";";
strAcceptScript+=" document.forms[0].submit();}}</script>";
objParent.objParent.RegisterStartupScript(strScrip tId,strAcceptScript);
}
Apr 10 '07 #1
0 809

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ED M. | last post by:
Hello all...I'm new to the board. I have a problem that I hope someone here might be able to solve for me. I am doing some clientside validation using Javascript. The text I am testing is...
1
by: Darkoł | last post by:
In my web aplication I recover a list of members from a DataGrid. A colum of the DataGrid is a TemplateColumn that call a javascript function that ask to the client a confirm (a simple pop up) and...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
12
by: Mark Fox | last post by:
Hello, I am attempting to do something very simple. I have a page MainPage.aspx and a popup window Popup.aspx. When users click on the linkbutton in the popup window I am looking to do some...
2
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added...
0
by: Edward | last post by:
I'm strictly a high-level programmer, so please excuse my ignorance of the inner magic of ASP etc. I have what my company calls a "builder form". It is used to maintain static lookup lists. It...
1
by: satees | last post by:
Hi, I have a textbox control in Footer Template within datagrid. I need to validate the textbox using client side javascript. When trying it, i got an error that the control not exist. I think the...
1
by: KRISHNA PRAVI | last post by:
the error is "runtime error object expected" here is the code....................................................................................... <script language="javascript"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.