473,404 Members | 2,179 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,404 software developers and data experts.

scripting using Button

Hi Steve,

Sorry if you have seen this post before but I cant figure this one out...

Thanks for the information but now I am getting new errors:
I have used this code in the rowdatabound, how do i modify this to take 2
values?

protected void dgCustomer_RowDataBound(object sender, GridViewRowEventArgs
e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton myLink = (LinkButton)e.Row.Cells[0].Controls[0];
myLink.OnClientClick = "window.returnValue=" + e.Row.Cells[1].Text +
";window.close();return false;";

}

}
I want to return e.row.cells[2].text
I tried
myLink.OnClientClick = "window.returnValue=" + e.Row.Cells[1].Text +
"window.returnValue=" + e.Row.Cells[2].Text +
";window.close();return false;";
Thanks,
Stephen
Aug 27 '07 #1
4 1106
"stephen" <st********@hotmail.comwrote in message
news:Oc****************@TK2MSFTNGP03.phx.gbl...
Thanks for the information but now I am getting new errors:
There really is no point in saying you're getting (new) errors if you don't
actually tell the group what those (new) errors are...
myLink.OnClientClick = "window.returnValue=" + e.Row.Cells[1].Text +
";window.close();return false;";
Where are you actually opening the window...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 27 '07 #2
"stephen" <st********@hotmail.comwrote in message
news:ur**************@TK2MSFTNGP03.phx.gbl...
Now I get script errors when I click the parent page's button its giving
me
http://localhost:1679/FindCustomer.aspx?num=&name=
and ';' expected
That simply means that you have a syntax error somewhere in your
JavaScript - enable client-side debugging and step through it or, at least,
inspect the rendered JavaScript in the View Source to find out where the
error is...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 28 '07 #3
"Steve" <ln********************@gmail.comwrote in message
news:OG**************@TK2MSFTNGP02.phx.gbl...
It looks like the window.returnValue property returns only a single value,
and is only used in combination with modal dialogs, which can only return
a single value.
Yes but, like all JavaScript variables, the returnValue is a variant...
Using the modal dialog method, the only way to *effectively* return two
values is to concatenate both values, but separated with a "---" or some
other character.
I just use an array...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 28 '07 #4
Hi Mark, Steve,

Thanks for your help
I will try both.

Stephen

"stephen" <st********@hotmail.comwrote in message
news:Oc****************@TK2MSFTNGP03.phx.gbl...
Hi Steve,

Sorry if you have seen this post before but I cant figure this one out...

Thanks for the information but now I am getting new errors:
I have used this code in the rowdatabound, how do i modify this to take 2
values?

protected void dgCustomer_RowDataBound(object sender, GridViewRowEventArgs
e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton myLink = (LinkButton)e.Row.Cells[0].Controls[0];
myLink.OnClientClick = "window.returnValue=" + e.Row.Cells[1].Text +
";window.close();return false;";

}

}
I want to return e.row.cells[2].text
I tried
myLink.OnClientClick = "window.returnValue=" + e.Row.Cells[1].Text +
"window.returnValue=" + e.Row.Cells[2].Text +
";window.close();return false;";
Thanks,
Stephen

Aug 29 '07 #5

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

Similar topics

4
by: The_Incubator | last post by:
As the subject suggests, I am interested in using Python as a scripting language for a game that is primarily implemented in C++, and I am also interested in using generators in those scripts... ...
10
by: SW | last post by:
I have a Web application that uses Remote Scripting to provide dynamic data to a web page. I am testing the application in Internet Explorer 6 SP1 running on Windows XP Professional. When I use...
3
by: CJM | last post by:
I have a form where I want to be able to validate a field against a DB *before* the form has been submitted. After doing a bit of homework, it seems there are two general approaches: 1) Remote...
0
by: fiona | last post by:
Catalyst Releases Scripting Editions of SocketTools Client and server-side development for Active Server Pages and PHP. Yucca Valley, CA, May 25, 2005 - Catalyst Development Corp...
6
by: NoCopy na | last post by:
Using the following example: domiframetest.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
12
by: ShepardBerry | last post by:
This may be a dumb question, but I'm not finding anything specifically what I'm looking for. Still kind of new to .NET as well. What I'm trying to do that I know I could do in VB6.0/ASP is to...
0
by: Dan Sikorsky | last post by:
We're using Remote Scripting to update counters, or colors, displaying on a web page form at a fixed interval, and the form's submit button event handler is executed without clicking the button. I...
3
by: aspmonger | last post by:
Hello, I really believe that IE 6 has a new (intentional?) bug that severely limits the capability of dhtml and cross domain scripting. Yesterday, I read an interesting article about the subject and...
6
by: avh | last post by:
Hi, I'have been looking for a simple scripting (interpreted) language to be run within my ASP.NET pages.Syntax is of minor importance. Although I find many options, all of these seem to first...
1
by: Chris | last post by:
Hi, I have jsut started to learn ASP development and have read many articles regarding which is the best to use regarding JavaScript or VBScript. All of the learning that I have done so far has...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...

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.