Using Javascript To Open An Application
Mar 27, 2001I 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?
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?
I just start learning javascript and sorry if the question seem basic.
In DOS, if I write a batch file it would be START notepad.exe. This will launch the notepad application. How do you launch an application in Javascript?
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?
I have been away from development for a while and I'm looking for a way to get back into it. I have two questions:
1) Is the choice of javascript framework independent of the choices of all the other application parts like the object-relational mapping layer, the app server, etc? Right now, I'm looking at JQuery, and ExtJS.
2) Does anyone know where I can get a complete sample application made of open source parts and using all the best practices that I can just copy to get started?
And I mean complete... as if a real life functioning enterprise the likes of Google just zipped up their whole open-source production and development hard drives and made it all available for people to download, unzip, and run... mysql database, bug tracking system, build system, version control, connection pooling services, web server, app server, javascript libraries, internationalization resources, configured IDE, etc. etc. All of everything configured and wrapped up in a single zip file ready to go with just a few changes to IP addresses and passwords. From that we could just change things to build our own first app.I've tried getting started with a bunch of different open source application stacks and I always get stuck. And every time it happens I wonder why I can't just copy someone's entire web development folder. It's open-source and it's just ones and zeroes. Why can't we just copy it and skip the setup process and the time of figuring out best practices on our own?
Is there any way for me to capture the DocumentBeforeSave event with an ActiveXObject("Word.Application") via Javascript in IE?
View 1 Replies View RelatedIs 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?
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?
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 ?
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.
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.
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');
}
How to open HTML combobox by means of JavaScript?
View 3 Replies View Relatedi'm using IE 6.0.2800 and in the last month no matter which site on the net each link to a javascript window opens up and crash a sec after its not the pop-up blocker i checked this out already.
View 1 Replies View Relatedthis function should open a popup showing an image automatically
adjusting browser window's height and width. It works fine with IE6 but
not with IE7. In IE7 opens popup too small. why ? Code:
I would like to include text from an external file in my html file. This is
normally done with <object> or <iframe> but in this case the style sheet and
internal links (like <a href="#positiononpage">) do not work. So I thought
of writing a little script which does the following
- open the file http://something.com/textfile.htm
- put the content of that file in variable "var"
- document.write(var)
Is this possible? (also without using activeX objects)
This is a more compact view of the "open ad" code on yahoo.
<pre>
<script language=javascript>
// these are the two links for opening and closing the ad
var lnk1='<a href="#" onclick="moveIt(Ƈ');return false">Open Ad</a>'
var lnk2='<a href="#" onclick="moveIt(Ɔ');return false">Close Ad</a>'
// these are the contents of the table, you can put anything in here
var ad1='CLOSED STATE'
var ad2='OPEN STATE'
// this function actually moves the DIV size
function moveIt(status)
{
var tout=0;
if(status == Ƈ')
{
lnkdiv.innerHTML=lnk2;
adstate.innerHTML=ad2;
if (document.all.addiv.style.pixelHeight<250)
{
document.all.addiv.style.pixelHeight=document.all.addiv.style.pixelHeight+5;
tout=setTimeout('moveIt('+status+')',1);
}
}
else
{
lnkdiv.innerHTML=lnk1;
adstate.innerHTML=ad1;
if (document.all.addiv.style.pixelHeight>=105)
{
document.all.addiv.style.pixelHeight=document.all.addiv.style.pixelHeight-5;
tout=setTimeout('moveIt('+status+')',1);
}
}
}
</script>
<table border="1"><tr><td><div id=addiv
style="position:relative;height:100;width:300;z-index:3"><div id=adstate>CLOSED
STATE</div></div></td></tr></table>
<div id=lnkdiv><a href="#" onclick="moveIt(Ƈ');return false">Open Ad</a></div>
</pre>
<script language="JavaScript">
function link () {
msgWindow=window.open('http://anylink/index.html','link','border=0,directories=no,height="100%",left=1,location=no,menubar=0,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top=1,width="100%"');}
</script>
<a href="javascript: link ()">any link</a>
The situation is: in Win2000 open OK in respect to the width & height referer in script.
But on WinXP, this link open on a litle window.
I have a form that I would like to get the values entered on the page
and go to a new page in the same window. I can make the code work to
open a new window, but I need it to open in the same window. Here is what I have:
function pass_info() {
var info = "";
info += document.form2.productWeight.value;
window.open("/page/shippingrates/calculate_shipping_before.asp"
+ "?" + "weight=" + info,");
}
I know that it is the window.open, but I have not figured out what I
need to do to get it in the same window.
I would like to have a page on my site containing links to external URLs. When I click on these links, a new window should open with the new URL and some text formatting javascript (or other language) code be applied to it. This would be like loading a new URL and then apply a bookmarklet to it. But I want to be able to do both in one shot. you click on the link, open a new window, and apply the code to the URL. Also, when you open the new window, the location bar should show the external URL, not mine. It doesn't have to necessarily be done with Javascript.
View 1 Replies View RelatedWhat I am trying to figure out but having difficulty with is opening and closing a Lightbox from JavaScript. For example, if I use this html...
<a href="#testLB" rel="testLB" class="lbOn">Test Lightbox</a>
It will display a div since I coded this div in the HTML file...
<div id="testLB" class="leightbox">
<h1>Test</h1>
<a href="javascript: test();">Change Zip</a>
</div>
What I want to be able to do is to display this div with Lightbox but do it from JavaScript. For example, from the body onLoad event I would like to call a JavaScript function that opens a Lightbox.
Then, the Lightbox is going to contain a few fields so I was going to have JavaScript validate that the user entered all the fields. If they did, I then want to close the Lightbox. If they did not, I will display an alert message. I can get all of this to work except having JavaScript close (actually, it is hiding) a Lightbox div. Can someone help me figure out how to hide the div from a JavaScript function?
What I downloaded was Lightbox Gone Wild which I think is also called Leightbox.
Here is what I wish to do:
Click on a PDF link and have it open as a full screen window - not as
a predetermined size.
Sounds simple?
I want to run the command from within the href only. I don't want to
have to create an HTML page for each PDF file.
This is the link.
<a href="pdf-PPT/05_70857_PPT30x80.pdf" target="_blank"
on=0,directories=0,status=1,titlebar=1,menubar=0,s crollbars=0,left=0,top=0,screenX=0,screenY=0');
return false;".....
Code:
<a href="#" onclick="window.location='http://YourSite.com'">click here</a>
I want to make it so that it opens a new normal browser window just like target=_blank does.
I need three tabs out of which only one is open at a time n when u open another tab, one out of the earlier closed one should open(preferably with mootools). And also the tab which is opened should come at the top of the page as well.
View 1 Replies View Relatedhow many times can open and close <script type="text/javascript"> tag
View 3 Replies View RelatedI have a static .svg file with embedded onclick="open()"'s all over.
The svg is <embed>ded in a minimal .html file.
The onclick's work fine in IE w/Adobe SVG viewer 3: click and a new
window opens with the specified URL.
But using the Adobe SVG viewer in Mozilla, neither the mouseovers or
the onclicks work, although the image itself renders.
However, the PRIMARY problem that I need to fix is that the onclick's
don't work in Safari with the Adobe viewer. The mouseovers DO work,
but the onclick's do not.
I've tried specifying window.open() instead of just open(). I've also
tried changing the onclicks to call a function openNewWindow which in
turn calls window.open. Still no luck in safari.
I've also tried defining the openNewWindow function in the html
wrapper, and specifying a3:scriptImplementation="browser". In this
case, the SVG still functions as desired in IE, but neither the
mouseovers nor the onclicks work in Safari.
To summarize, I need to get a new window with a specified URL to open
on click for Safari with the Adobe SVG viewer 3.
I need to develope a multilanguage application in javascript:
is there some particular library, or do you have some
pointer to guidelines to follows: the messages should
if possible be keeped in a separate file, one for language.
Is there some standard format?