Search Results

Search found 36369 results on 1455 pages for 'document write'.

Page 24/1455 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • WPF Open Word Document without open dialog

    - by Mitch
    I have the path to a Word document saved in an SQL Database. I am able to retrieve the path but I cannot work out the best approach to open the Word document from WPF without using the OpenFileDialog. I've given up any thoughts of embedding Word in WPF as it has too many gotchas. I just want to be able to click a button or hyperlink and using the retrieved document path, open Word.

    Read the article

  • Accessing XML file using JavaScript And ASP.net |VB code

    - by Bubba
    Am trying to read in data from an xml file but using javascript which is embedded into my asp.net|vb code. I am new to asp.net but coming from a programming background. so I declared the xml objects for the appropriate browsers, as well as the name of the local xml to read data from, I then start by appending the create the table tag and then append it to the div tag in hack5.aspx I declare the variable that will represent/ hold the xml returned data object. I then run a for loop , before creating a row tag and then appending it to the div tag in hack5.aspx I then create the a row tag and then appending it to the div tag in hack5.aspx | then create a TextNode which is passed to variable, then create a td and append to div . then lastly append the textnode to td this format is the same for creating another 13 td tags that are to hold the data. The main problem is when I run the script - I see nothing display on my screen . no errors are shown, but with your sample code runs smoothly. So the first file hack5.aspx is as follows: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="hack5.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Diplaying MessageBox from ASP.NET</title> </head> <body> <form id="form1" runat="server"> <div id="showtime" > </div> </form> </body> </html> The next file hack5.aspx.vb is as follows: Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim scriptString as String = "<script language=JavaScript> if (window.XMLHttpRequest) " scriptString += " { " scriptString += " xhttp=new XMLHttpRequest(); " scriptString += " } " scriptString += " else " scriptString += " { " scriptString += " xhttp=new ActiveXObject('Microsoft.XMLHTTP'); " scriptString += " } " scriptString += " xhttp.open('GET','yes.xml',false); " scriptString += " xhttp.send(null);" scriptString += " xmlDoc= xhttp.responseXML; " scriptString += " var table1 = document.createElement('table'); " scriptString += " document.getElementById('showtime').appendChild(table1); " scriptString += " var x=xmlDoc.getElementsByTagName('Table'); " scriptString += " for (i=0;i<x.length;i++) " scriptString += " { " scriptString += " var assessment = document.createTextNode(x[i].getElementsByTagName('Assessment')[0].childNodes[0].nodeValue);" scriptString += " var row1 = document.createElement('tr'); " scriptString += " document.getElementById('showtime').appendChild(row1); " scriptString += " var column1 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column1); " scriptString += " column1.appendChild(assessment); " scriptString += " var Issue_Date = document.createTextNode(x[i].getElementsByTagName('Issue_Date')[0].childNodes[0].nodeValue);" scriptString += " var column2 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column2); " scriptString += " column2.appendChild(Issue_Date); " scriptString += " var Due_Date = document.createTextNode(x[i].getElementsByTagName('Due_Date')[0].childNodes[0].nodeValue);" scriptString += " var column3 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column3); " scriptString += " column3.appendChild(Due_Date); " scriptString += " var Interest = document.createTextNode(x[i].getElementsByTagName('Interest')[0].childNodes[0].nodeValue);" scriptString += " var column4 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column4); " scriptString += " column4.appendChild(Interest); " scriptString += " var Summary = document.createTextNode(x[i].getElementsByTagName('Summary')[0].childNodes[0].nodeValue);" scriptString += " var column5 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column5); " scriptString += " column5.appendChild(Summary);" scriptString += " var Amount_Due= document.createTextNode(x[i].getElementsByTagName('Amount_Due')[0].childNodes[0].nodeValue);" scriptString += " var column6 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column6); " scriptString += " column6.appendChild(Amount_Due);" scriptString += " var IEduty = document.createTextNode(x[i].getElementsByTagName('IEduty')[0].childNodes[0].nodeValue);" scriptString += " var column7 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column7); " scriptString += " column7.appendChild(IEduty);" scriptString += " var LEsurtax = document.createTextNode(x[i].getElementsByTagName('LEsurtax')[0].childNodes[0].nodeValue);" scriptString += " var column8 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column8); " scriptString += " column8.appendChild(LEsurtax);" scriptString += " var CEsurtax = document.createTextNode(x[i].getElementsByTagName('CEsurtax')[0].childNodes[0].nodeValue);" scriptString += " var column9 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column9); " scriptString += " column9.appendChild(CEsurtax);" scriptString += " var EXduty = document.createTextNode(x[i].getElementsByTagName('EXduty')[0].childNodes[0].nodeValue);" scriptString += " var column10 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column10); " scriptString += " column10.appendChild(EXduty);" scriptString += " var IMvat = document.createTextNode(x[i].getElementsByTagName('IMvat')[0].childNodes[0].nodeValue);" scriptString += " var column11 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column11); " scriptString += " column11.appendChild(IMvat);" scriptString += " var SYSfee = document.createTextNode(x[i].getElementsByTagName('SYSfee')[0].childNodes[0].nodeValue);" scriptString += " var column12 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column12); " scriptString += " column12.appendChild(SYSfee);" scriptString += " var AItax = document.createTextNode(x[i].getElementsByTagName('AItax')[0].childNodes[0].nodeValue);" scriptString += " var column13 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column13); " scriptString += " column13.appendChild(AItax);" scriptString += " var Cduty = document.createTextNode(x[i].getElementsByTagName('Cduty')[0].childNodes[0].nodeValue);" scriptString += " var column14 = document.createElement('td'); " scriptString += " document.getElementById('showtime').appendChild(column14); " scriptString += " column14.appendChild(Cduty);" scriptString += " } " scriptString += " <" scriptString += "/" scriptString += "script>" If(Not ClientScript.IsStartupScriptRegistered("clientScript")) ClientScript.RegisterClientScriptBlock(Me.GetType(),"clientScript", scriptString) End If End Sub End Class And finally the xml file is as follows: <?xml version="1.0" encoding="utf-8" ?> <DataSet xmlns="http://tempuri.org/"> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Table"> <xs:complexType> <xs:sequence> <xs:element name="UserName" type="xs:string" minOccurs="0" /> <xs:element name="Password" type="xs:string" minOccurs="0" /> <xs:element name="UserLevel" type="xs:string" minOccurs="0" /> <xs:element name="FName" type="xs:string" minOccurs="0" /> <xs:element name="LName" type="xs:string" minOccurs="0" /> <xs:element name="Branch" type="xs:string" minOccurs="0" /> <xs:element name="Department" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"> <NewDataSet xmlns=""> <Table diffgr:id="Table1" msdata:rowOrder="0"> <Assessment>CHR/A157/2009</Assessment> <Issue_Date>20/10/2009</Issue_Date> <Due_Date>01/11/2009</Due_Date> <Interest>2.00</Interest> <Summary>BENTLEY 2009</Summary> <Amount_Due>28000000.00</Amount_Due> <IEduty>3000000.00</IEduty> <LEsurtax>4000000.00</LEsurtax> <CEsurtax>5000000.00</CEsurtax> <EXduty>0.00</EXduty> <IMvat>5000000.00</IMvat> <SYSfee>8000000.00</SYSfee> <AItax>2000000.00</AItax> <Cduty>1000000.00</Cduty> </Table> <Table diffgr:id="Table1" msdata:rowOrder="1"> <Assessment>CHR/A167/2009</Assessment> <Issue_Date>20/10/2009</Issue_Date> <Due_Date>01/11/2009</Due_Date> <Interest>2.00</Interest> <Summary>BENTLEY 2009</Summary> <Amount_Due>24000000.00</Amount_Due> <IEduty>3000000.00</IEduty> <LEsurtax>4000000.00</LEsurtax> <CEsurtax>5000000.00</CEsurtax> <EXduty>0.00</EXduty> <IMvat>1000000.00</IMvat> <SYSfee>8000000.00</SYSfee> <AItax>2000000.00</AItax> <Cduty>1000000.00</Cduty> </Table> <Table diffgr:id="Table1" msdata:rowOrder="2"> <Assessment>CHR/A196/2009</Assessment> <Issue_Date>11/11/2009</Issue_Date> <Due_Date>21/11/2009</Due_Date> <Interest>2.00</Interest> <Summary>BENTLEY 2009</Summary> <Amount_Due>20000000.00</Amount_Due> <IEduty>3000000.00</IEduty> <LEsurtax>4000000.00</LEsurtax> <CEsurtax>5000000.00</CEsurtax> <EXduty>0.00</EXduty> <IMvat>1000000.00</IMvat> <SYSfee>4000000.00</SYSfee> <AItax>2000000.00</AItax> <Cduty>1000000.00</Cduty> </Table> </NewDataSet> </diffgr:diffgram> </DataSet>

    Read the article

  • document.onclick settimeout function javascript help

    - by Jamex
    Hi, I have a document.onclick function that I would like to have a delay. I can't seem to get the syntax right. my original code is <script type="text/javascript"> document.onclick=check; function check(e){do something} I tried the below, but that code is incorrect, the function did not execute and nothing happened. <script type="text/javascript"> document.onclick=setTimeout("check", 1000); function check(e){do something} I tried the next set, the function got executed, but no delay. <script type="text/javascript"> setTimeout(document.onclick=check, 1000); function check(e){do something} what is the correct syntax for this code. TIA Edit: The solutions were all good, my problem was that I use the function check to obtain the id of the element being clicked on. But after the delay, there is no "memory" of what was being clicked on, so the rest of the function does not get executed. Jimr wrote the short code to preserve clicked event. The code that is working is // Delay execution of event handler function "f" by "time" ms. document.onclick = makeDelayedHandler(check, 250); function makeDelayedHandler( f, time) { return function( e ) {setTimeout(function() {f( e );}, time ); }; } function check(e){ var click = (e && e.target) || (event && event.srcElement); . . . Thank you all.

    Read the article

  • How to properly document programming languages?

    - by roydukkey
    Where can I find information on how to properly document a programming language? What I mean is that there seems to be a standard way to document code. php.net and api.jquery.com seem to document there code the a similar way. For example, the trim() description on php.net. string trim ( string $str [, string $charlist ] ) And likewise on jquery.com .animate( properties, [ duration ], [ easing ], [ callback ] ) Does anyone even know what this syntax is called?

    Read the article

  • Browser mode and document mode in IE9

    - by Ozzone
    I use the Developer Tools in IE9 to switch between IE7, 8 & 9 Browser Modes for testing markup & CSS. I use following combinations. IE7 Browser Mode + Document mode IE7 Standards IE8 Browser Mode + Document mode IE8 Standards IE9 Browser Mode + Document mode IE9 Standards But, if i use following combination, few design's position issues are occured. IE9 Browser Mode + IE7 Standards Is the above combination valid? or Does i need to change Document mode forcefully?

    Read the article

  • pthreads: reader/writer locks, upgrading read lock to write lock

    - by ScaryAardvark
    I'm using read/write locks on Linux and I've found that trying to upgrade a read locked object to a write lock deadlocks. i.e. // acquire the read lock in thread 1. pthread_rwlock_rdlock( &lock ); // make a decision to upgrade the lock in threads 1. pthread_rwlock_wrlock( &lock ); // this deadlocks as already hold read lock. I've read the man page and it's quite specific. The calling thread may deadlock if at the time the call is made it holds the read-write lock (whether a read or write lock). What is the best way to upgrade a read lock to a write lock in these circumstances.. I don't want to introduce a race on the variable I'm protecting. Presumably I can create another mutex to encompass the releasing of the read lock and the acquiring of the write lock but then I don't really see the use of read/write locks. I might as well simply use a normal mutex. Thx

    Read the article

  • Change page layout in the middle of a LaTeX document

    - by David
    I'm looking for a way to change some page layout dimensions in the middle of a LaTeX document. The reason is, I'd like to have smaller margins and longer lines in the "References" section of my report document (basically because short lines aren't so important there and I can save space). In my preamble I have (works fine): \setlength\textwidth{130mm} \setlength\oddsidemargin{14.6mm} In the document I simply try to re-set them at the right point but they're ignored. ... last paragraph ends here. \newpage \setlength\textwidth{150mm} % +20mm text width \setlength\oddsidemargin{13.6mm} % -10mm left margin (so it stays centered) References ... The geometry package is useful but only for global adjustments in the preamble, so I can't use it here. Is it not possible to change the page layout at some point in the document?

    Read the article

  • Replace Components.classesByID with document.implementation.createDocument

    - by Earl Smith
    I am not the author of this code, but it is no longer maintained. So I am trying to fix it, but I have very little experience in javascript. Since Firefox 9, Components.classesByID["{3a9cd622-264d-11d4-ba06-0060b0fc76dd}"]. has been obsolete. Instead, it is suggested that document.implementation.createDocument be used. Can someone here show me how to implement these changes? I seem to be, just banging my head with everything I have tried. The example given at Mozilla developer network is: var doc = document.implementation.createDocument ("http://www.w3.org/1999/xhtml", "html", null); var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); body.setAttribute("id", "abc"); doc.documentElement.appendChild(body); alert(doc.getElementById("abc")); // [object HTMLBodyElement] and the code in the .jsm I am trying to fix is: this.fgImageData = {}; this.fgImageData["check"] = [ " *", " **", "* ***", "** *** ", "***** ", " *** ", " * "]; this.fgImageData["radio"] = [ " **** ", "******", "******", "******", "******", " **** "]; this.fgImageData["menu-ltr"] = [ "* ", "** ", "*** ", "****", "*** ", "** ", "* "]; this.fgImageData["menu-rtl"] = [ " *", " **", " ***", "****", " ***", " **", " *"]; // I think I'm doing something slightly wrong when creating the document // but I'm not sure. It works though. *FIX* var domi = Components.classesByID["{3a9cd622-264d-11d4-ba06-0060b0fc76dd}"]. createInstance(Components.interfaces.nsIDOMDOMImplementation); this.document = domi.createDocument("http://www.w3.org/1999/xhtml", "html", null); this.canvas = this.document.createElementNS("http://www.w3.org/1999/xhtml", "html:canvas"); for(var name in this.fgImageData) { if (this.fgImageData.hasOwnProperty(name)) { var data = this.fgImageData[name]; var width = data[0].length; var height = data.length; this.canvas.width = width; this.canvas.height = height; var g = this.canvas.getContext("2d"); g.clearRect(0, 0, width, height); var idata = g.getImageData(0, 0, width, height); for(var y=0, oy=0; y<height; y++, oy+=idata.width*4) for(var x=0, ox=oy; x<width; x++, ox+=4) idata.data[ox+3] = data[y][x] == " " ? 0 : 255; this.fgImageData[name] = idata; } } },

    Read the article

  • How to make maintaince document for a website?

    - by metal-gear-solid
    How to make maintenance document for a website? I've created a site using XHTML ,CSS, jQuery etc. it's big site. Now i have to write a maintenance document for a site for if any changes comes in future related to design, content and functionality then those things will be handled by someone else. How and what should i keep in maintenance document.

    Read the article

  • word Application.AddIns.Add throws 'Word cannot open this document template'

    - by Vinay B R
    Hi, I have a template document with a simple macro to insert a file into a document. When i try to load this template file using Application.Addins.Add i am getting an error saying 'Word cannot open this document template'. wordApplication.AddIns.Add( %template file path%, ref trueObj ); This works fine on some machines. Also is there any way to make sure that we load the template file as a global Template always.

    Read the article

  • How to override JS function from a firefox extension?

    - by BruceBerry
    Hello, I am trying to intercept calls to document.write for all pages. Setting up the interception inside the page by injecting a script like function overrideDocWrite() { alert("Override called"); document.write = function(w) { return function(s) { alert("special dom"); w.call(this, wrapString(s)); }; }(document.write); alert("Override finished"); } is easy and works, but i would like my extension to setup the interception for each document object from inside the extension. I couldn't find a way to do this. I tried to listen for the "load" event and set up the interception there but it also fails. How do I hook calls to doc.write from an extension?

    Read the article

  • VB.net save opened word document!

    - by comii
    Hi! I just trying to made word add-ins that gone save opened document.I made ribbon and button on it.Below is the that i use for saving word document on certain location: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles Button1.Click Dim ThisApplication As Word.Application ThisApplication.ActiveDocument.SaveAs("C:\email") ThisApplication.Quit() ThisApplication= Nothing End Sub But when i click on this button i just made email.doc but that document does not contain any content of the opened document, it just made new doc file. What i am doing wrong? The event on this button need to just same as event on standard Word save button, so how i can do this?

    Read the article

  • Alfresco 3 Labs: Adding a thumbnail to a document

    - by Ace
    Hey guys! Any Alfresco experts out there? I have created a document type in Alfresco and am trying to associate it with an image -- Somehow. I don't really mind how it's done - an image uploader in the metadata section when saving the actual document would be nice, but I can live with having to upload the image first and then associating it somehow with the document. Any ideas..?

    Read the article

  • RenderPattern headache with WSS 3.0 Document Library

    - by Ben
    Hi All, I'm trying to define the DisplayPattern of a custom field to do as follow. It's a simple text field used in document libraries, but i want the text entered to be displayed as a link to the document in the list view. <URL Cmd="Display"> gives me the display form, but I want the link to actually download/open the document... I can't for the life of me figure this one out... Thanks for your help!

    Read the article

  • IE7 jQuery(document).ready() problem

    - by Zendog74
    I have a page that works perfectly fine in Firefox, but is throwing an error in IE. I am loading jQuery dynamically (if it is not already loaded), and then doing some stuff in the jQuery(document).ready() block. However, IE throws the dreaded "Object expected" error when it hits the jQuery(document).ready() block. You can view the full page code here: http://www.pastie.org/977767 IE is throwing the error right at jQuery(document).ready(). Any ideas as to what is going here? Again, this works perfectly fine in Firefox. It seems almost like IE thinks jQuery is loaded but it really isn't yet or that jQuery is still loading when the jQuery(document).ready() block is encountered?

    Read the article

  • Automatically POST on document creation

    - by ptikobj
    In an HTML-document, i want to have a (if possible: invisible) form that POSTs the contents of one text input field to my server as soon as the document is created or if possible within s seconds. The document is created via javascript's open. How can i do that?

    Read the article

  • How could I insert a string into the response stream anywhere I want?

    - by DM
    There may be an easy way to do this but I can't see it... I created a simple Http Module that starts a timer on the PreRequestHandler and stops the timer on the PostRequestHandler to calculate the time it took the page to load. I then create some simple html and write my results to Response.Write. Since I'm doing this in the PostRequestHandler it's adding my results after the </html> tag. That's fine for testing but I need in a scenario where the page needs to validate. I can't seem to figure out how I could manipulate the Response object to insert my results before the </body> tag. Response.Write and Response.Output.Write don't have that flexibility and I couldn't see a way to work with the Response as a string. Am I missing something easy?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >