Wrox Programmer Forums
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 22nd, 2005, 03:15 PM
Friend of Wrox
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default On calling javascript function only one value pops

Please help me here I want to pass the values from the asp to the java script function, only one value is passed instead of three on calling javascript. I will appreciate your help
  <td><input type="text" Name="DateFromOld(i)" value="<%=strDateFrom%>" size="12" maxlength="10" onclick="checkOldFromToDate();"></td>
  <td><input type="text" Name="DateToOld(i)" value="<%=strDateUntil%>" size="12" maxlength="10" onclick="checkOldFromToDate();"></td>
  <td><input type="text" Name="HourlyRateOld(i)" value="<%=intHourlyRate%>"></td><td><img type="button" name="btnDelete" src="images/xDel1.gif" onClick="javascript:DeleteConfirm('<%=strDateFrom% >','<%=strDateUntil%>','<%=intHourlyRate%>');"></td>

function DeleteConfirm(dt1, dt2, dt3){


  var Msg=("Do want to delete the record" );
 if (confirm(Msg)){


   return true;
  else {
   alert("Records not Deleted");
    return false;

Old April 23rd, 2005, 02:09 AM
Friend of Wrox
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts

I see aproblem in the code;

alert(dt1,dt2,dt3) will show only the first one,

change to


Is this your issue?

Let me know.

Old April 23rd, 2005, 03:48 AM
Authorized User
Join Date: Apr 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to EricJ

Looking at your code I somewhat agree with Prashant, but look carefully at what you are sending through in your javascript...


Now if I'm not mistaken you are trying to return 3 seperate string values. This won't be possible by using comma's but will be possible by using the assignment-operator ("+"), so try using the following

alert(dt1 + " " + dt2 + " " + dt3)

This would return something like Value1 Value2 Value3

Old April 24th, 2005, 11:38 AM
Friend of Wrox
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts

 I got three values on calling javascript function. When I hit delete button of the particular record. It deletes all record in the database, I just want to delete that particular record to which I hit the delete button. Any suggestions please

Old April 24th, 2005, 06:07 PM
Friend of Wrox
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

;;;I got three values on calling javascript function
I assume EricJ solved your initial problem solved?

Your second problem sounds like it needs a where condition in your Delete statement.

BTW Neither of these two questions fit into the components area of the forum. Constructivly - For the best solutions post your problems in the correct area(s) of the forum.

Wind is your friend

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling VBScript Function from javascript arnabghosh Classic ASP Professional 1 July 13th, 2007 08:32 AM
Calling javascript function from with in ASP kawal.singh Classic ASP Basics 1 July 4th, 2007 05:17 AM
Calling a javascript function from C# SebFr C# 0 November 3rd, 2006 12:05 PM
Calling a .NET function from javascript jainnid General .NET 6 June 8th, 2005 04:54 AM
Calling SQLPLUS Procedure from javascript function rnesti Javascript 3 January 28th, 2005 05:55 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.