DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 22 May 2007 08:23:25 -0500,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    Brett Wesoloski
          2    Scott M. am


using javascript with datagrid   
I can not seem to figure this out, but really haven't work a lot with 
javascrip and .NET.

I have a data grid and I want to put a button in it and when the button is 
pressed it will call my javascript.  Now the grid is in a .ascx file.  The 
other kicker is I want to also use the databinder property to get a value as 
the grid is loading and use that in my java script.

Here is what I have so far as for getting the javascript to do what I want. 
the file variable is what needs to use databinder.  I guess that is the part 
I don't understand.  Any help would be greatly appreciated.

TIA,
Brett

<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!-- Enable Stealth Mode
   // Variable Definitions
   var nameSpace = null;
   var mailFolder = null;
   var mailItem = null;
   var tempDoc = null;
   var outlookApp = null;
   var file = null;
   var filename = null;
   function OpenOutlookDoc(whatform)
   {
      try
      {
      file = '\\\\planadmininc.com\\Shareddata\\4most\\proposals\\M\\ABC 
Company, Inc. Safe Harbor 401(k) PS Plan_2.pdf'; (THIS IS WHAT NEEDS TO USE 
THE DATABINDER)
      filename = 'myfile';
      outlookApp = new ActiveXObject("Outlook.Application");
      nameSpace = outlookApp.getNameSpace("MAPI");
      mailFolder = nameSpace.getDefaultFolder(6);
      mailItem = mailFolder.Items.add(whatform);
      mailItem.To = "brwesoloski@pai.com";
      mailItem.Subject = 'test subject';
      mailItem.Body = 'test body';
      mailItem.Attachments.Add(file);
      mailItem.Display(0)
      }
      catch(e)
      {
      // act on any error that you get
      }
      }
      // Disable Stealth Mode -->
</script>
</head>
<body>
<form>
<input type=button value="Send Email" NAME="OutlookOpen1" 
OnClick="OpenOutlookDoc('IPM.NOte.FormA')"><br><br>
</form>
</body>
</html>
Date:Tue, 22 May 2007 08:23:25 -0500   Author:  

Re: using javascript with datagrid   
What does the code you've supplied have to do with a DataGrid or server-side 
code?



"Brett Wesoloski"  wrote in message 
news:OXEQiRHnHHA.3544@TK2MSFTNGP03.phx.gbl...

>I can not seem to figure this out, but really haven't work a lot with 
>javascrip and .NET.
>
> I have a data grid and I want to put a button in it and when the button is 
> pressed it will call my javascript.  Now the grid is in a .ascx file.  The 
> other kicker is I want to also use the databinder property to get a value 
> as the grid is loading and use that in my java script.
>
> Here is what I have so far as for getting the javascript to do what I 
> want. the file variable is what needs to use databinder.  I guess that is 
> the part I don't understand.  Any help would be greatly appreciated.
>
> TIA,
> Brett
>
> <html>
> <head>
> <script language="JavaScript" type="text/JavaScript">
> <!-- Enable Stealth Mode
>   // Variable Definitions
>   var nameSpace = null;
>   var mailFolder = null;
>   var mailItem = null;
>   var tempDoc = null;
>   var outlookApp = null;
>   var file = null;
>   var filename = null;
>   function OpenOutlookDoc(whatform)
>   {
>      try
>      {
>      file = '\\\\planadmininc.com\\Shareddata\\4most\\proposals\\M\\ABC 
> Company, Inc. Safe Harbor 401(k) PS Plan_2.pdf'; (THIS IS WHAT NEEDS TO 
> USE THE DATABINDER)
>      filename = 'myfile';
>      outlookApp = new ActiveXObject("Outlook.Application");
>      nameSpace = outlookApp.getNameSpace("MAPI");
>      mailFolder = nameSpace.getDefaultFolder(6);
>      mailItem = mailFolder.Items.add(whatform);
>      mailItem.To = "brwesoloski@pai.com";
>      mailItem.Subject = 'test subject';
>      mailItem.Body = 'test body';
>      mailItem.Attachments.Add(file);
>      mailItem.Display(0)
>      }
>      catch(e)
>      {
>      // act on any error that you get
>      }
>      }
>      // Disable Stealth Mode -->
> </script>
> </head>
> <body>
> <form>
> <input type=button value="Send Email" NAME="OutlookOpen1" 
> OnClick="OpenOutlookDoc('IPM.NOte.FormA')"><br><br>
> </form>
> </body>
> </html>
>
>
>
>
>
> 
Date:Fri, 25 May 2007 08:00:52 -0400   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us