HTML Application - Can Javascript Write To A Local Database?
Jul 23, 2005
IE 6.0 (not interested in other browsers at the moment)
I have looked everywhere I can find to look and googled until I am
cross-eyed and am hoping somebody knows what I'm doing wrong.
I have an HTML application (.hta) working fine, except one thing. I'm
trying to write to a local database from a .htm window (opened from
the main .hta window) and it doesn't work with any of the combinations
I've tried (and I admit to having tried a lot).
Here is one method I've tried:
strSQL = "Update myTable SET myField = 'myValue' WHERE myID = 12;"
var db = new ActiveXObject("ADODB.Connection");
db.Provider = "Microsoft.Jet.OLEDB.4.0";0
db.ConnectionString = "Data Source='c:myDirectorymyDatabase.mdb'";
db.Open;
db.execute(strSQL);
I can easily access the information in the myDatabase.mdb and display
it on the screen.
I can ask for updated information to be input on the screen.
But stuffing that updated information back into the database is the
problem.
Since I'm stuck in an .htm window, I don't have VBScript available, do
I? If VBScript isn't available and it isn't physically possible with
Javascript, then I'll have to revert to .hta windows, where I know I
have VBScript available. But I'd rather do it all in Javascript
within the .htm so as to avoid the security message that pops up when
the .hta opens a new .hta. For various reasons I don't think it is
possible for me to do this whole project within a single .hta.
View 9 Replies
ADVERTISEMENT
Apr 7, 2010
I know what your first reactiopn is going to be> "You shouldn't be doing that". I know this, but my work wants it done for a locally installed html.
Is there anyway to control this onload? It will be launched from an icon(shortcut) on a desktop.
View 1 Replies
View Related
Jan 11, 2007
For a project I am working on, I need to retrieve links from html
documents. The easy part is to obtain 'plain' links like <A
HREF="http://site/path/document">, but when those links are
javascript'ized, the only robust solution needs to load the javascript
and dom document representation in the same way that browsers do. For
example, links in the form:
<A HREF="javascript:function_declared_before("arguments"));>
First I though that using spidermonkey (the mozilla javascript
interpreter) should be enough, but in that case, I dont have the
document structure elements (like document, window, document.history,
document.form.element, etc), so I tried parsing the document using a
library to build a tree representation of it, but that leads me to the
same problem again, that is, I have to represent all tree nodes as
javascript entities.
Anybody here have worked on a similar problem? What tools do you
think I should take a look?
View 3 Replies
View Related
Oct 6, 2005
I'm trying to output an HTML page from a simple XML file, but I need to offer this as a service from a website, so users can browse and find the XML file on their local hard drives, and then generate an HTML page.
I think there are some security issues with HTTP not being able to access local files (ie. C: emp.xml) because it doesn't work when I browse to a local file from the website (files on servers work fine). Is there any other way to pass an XML file from local to a website?
I'm using the following javascript to load the XML file.
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load(filepath)
View 1 Replies
View Related
Apr 27, 2006
I want to make a database which I can put on my USB flash drive, with a html interface, and maybe an xml database. Will I be able to do that?
View 1 Replies
View Related
Dec 1, 2007
Basically, I have a button which when clicked, should write some html to the page at a specific location. Here's the html currently in the page Code:
View 8 Replies
View Related
Jul 20, 2005
javascript:
can I write to a local .txt File
as exaple:
open() ....writel(() ...close()..... ....save as ... c: est.txt
View 5 Replies
View Related
Jul 27, 2010
I am totally new to jQuery and no good knowledge on javascript. However, I was assigned a task, to convert a javascript program to jQuery due to compatibility problem on browsers like Chrome and Safari. My program originally use javascript xmlDoc.load('....') to read XML file, and then use document.write statement to write html tables on client side. Something like this (the sample below may got lots of syntax problem as I jut want to show the major part):
Code:
document.write('<TABLE >');
var y=x[0].getElementsByTagName('NoOfRows');
for (i=0; i<=noofrows-1 && i<=y.length-1; i++){
document.write(' <TD>');
document.write(z[j].getElementsByTagName('RecordDetails')[0].childNodes[0].nodeValue;
}
Now I changed to use jQuery, I can read the XML file elements. However, when I try to write the table, it failed:
[Code]...
View 1 Replies
View Related
Jan 11, 2011
Can i use single jquery and html to do some database manipulation i.e. database transaction.
View 1 Replies
View Related
Oct 6, 2005
I know its primary function is to request information from the server, but can it also submit information? For example I have a page in which the user can drag and drop objects around (using DHTML) and I'd like to be able to dynamically store the coordinates of where they place the objects in the database without them having to click a "Save Changes" button ......
View 2 Replies
View Related
Feb 19, 2007
two possibilities or the attribute type of script:
text/javascript (the one i usually use) application/x-javascript
what are the differencies between both?
depends on the html content?
for example html 4.0.1 versus xhtml 1.1?
View 12 Replies
View Related
Feb 8, 2010
How to write a program that will auto suggest or auto complete a search word from a MSAccess database using PHP and Ajax.
View 1 Replies
View Related
Aug 8, 2008
I am attempting to create an Access database connection from within an HTML page. I am using Javascript to make the connection and then test a basic UPDATE statement.
The following code is throwing back an error 'UPDATE statment syntax incorrect'
Code:
I thought the syntax was correct, but maybe it is something else?
View 4 Replies
View Related
Jul 23, 2005
Is there any way for me to capture the DocumentBeforeSave event with an ActiveXObject("Word.Application") via Javascript in IE?
View 1 Replies
View Related
Sep 29, 2005
Is there any way to debug javascript in a web application? When I
develop JSP pages, and it has the javascript code in it. The problem is
the debugger in Java IDE (WSAD in my case) can only debug Java code but
not Javascript code.
What should I do to debug javascript code?
View 2 Replies
View Related
Mar 27, 2001
I need to have a way to create a link that opens a specific word document.
How can I write a javascript function to do that?
View 6 Replies
View Related
Sep 8, 2006
My work is putting in a large application that is basically split up
between 30 or so Javascript files. I have some security concerns about
this application.
Basic security concerns is:
1. Possible SQL injection and other forms of injection attacks on URLS
of various server side components javascript accesses.
2. possible client side database access.
3. Incorrect use of http get for operations with possible side effects.
The security problems are probably relatively harmless. Mainly because
the application should be running behind firewall.
However I would like to have an analysis tool that can go over the
javascript code and allow me to see what urls are being called with
what parameters.
Javascript that writes new javascript into page (so I can get all
javascript files of application for analysis)
I know there are various javascript profilers and the like, anything
out there that helps in the analysis of this kind of application?
View 3 Replies
View Related
May 4, 2007
I have an application in the form of "*.exe" file and i need to
execute this and evaluate the returned values within Javascript.
Is this possible ?
View 4 Replies
View Related
Jul 23, 2005
I am writing a java application as a mozilla extension.
Because mozilla uses javascript for the frontend,
i need the javascript to call my external java application
and pass one parameter to it.
View 1 Replies
View Related
Apr 22, 2010
I have web application and i need functionality like client have certain pdf file on his/her local system. I want to use html/javascrpit to print these pdf files without opening.
View 4 Replies
View Related
Dec 11, 2006
I am trying to use the Goto method of the Word ActiveX object. I am
trying to open a document and go to a named bookmark. If I use this
code in VB it works, so I'm sure the approach is possible, I just can't
get JavaScript to work with it.
Here is the code I am using, the error I get from IE is Object
Expected:
Hope someone can help! Any help would be much appreciated
function PageLoad()
{
var WordApp = new ActiveXObject('Word.Application');
WordApp.Visible = true;
var documentlocation = crmForm.all.new_documentlocation.DataValue;
var wd = WordApp.Documents.Open(documentlocation);
wd.Select();
var Name = 'TestFred'
var wr = wd.Selection.GoTo(What : Word.WdGoToItem.wdGoToBookmark,Name :
'TestFred');
}
View 6 Replies
View Related
Dec 1, 2010
I need to be able to search through an xml located on my local machine with an html page. Here's the thing: this whole system (html files, xml file) will always be on my local machine. Because it's a class project it won't be on a server. So here's the scenario: I navigate to where my files are located (say C:) and I double click my index.html page and this page opens in my browser and from this page I need to be able to search my xml file which is at the same location. I've tried xmlhttprequest and it won't open the xml file I'm guessing because I don't need an http request.
Here's what I have so far:
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} xmlhttp.open("GET","C:MovieDB.xml",false);
xmlhttp.send(); xmlDoc=xmlhttp.responseXML;
function searchDB() {
if(!xmlDoc){
alert("error")
} var keyword = $('#txtBox').val();
var searchVal = $('#basicCategory :selected').text();
var allitems = xmlDoc.getElementsByTagName("Movie");
for(var i=0;i<allitems.length;i++){
alert(allitems[i].getElementsByTagName(searchVal[0].
childNodes[0].nodeValue);
} }
The code doesn't make it past the xmlhttp.send() line.
View 1 Replies
View Related
Nov 17, 2006
We have a directory of files on our ftp server. Is there a javacript to
make a connection to the ftp server and compare files on a local drive
and on the server? Files that have been changed or added need to be
copied across from the ftp server to the local drive.
View 4 Replies
View Related
May 11, 2009
I want to save a bit of bandwidth and trouble by linking to scriptaculous and prototype on Google, a la:
CODE:
BUT, I would like to be able to specify a local copy of the scripts as a fail-safe alternative. Is there a simple HTML way to specify an alternate src property?
And I've tried searching, but "alternate script source" and various permutations just lead to useless HTML basics. ...and not the kind of basic HTML.
View 4 Replies
View Related
Nov 13, 2002
I use NETSCAPE established a catalog page in XML, which uses Javascript-DOM to add, remove and sort the products by their prices. But which Javascript function should I use in order to save the modified page into local hard disk? to sort products as well.
View 1 Replies
View Related
Jun 9, 2009
I have data in the div box. Now i want to create the hyperlink so that when user click on it my only DIV data opens in new window so that user can print it.
Is it also possible that i can have the pre-define template for the html file so that only main content gets inside that template when clicked on link
View 2 Replies
View Related