473,385 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Accessing JS file from JAR

I am new to Java Development. Hence this is a basic question. herez what I am doing

1. I have Apache 6, JDK 1.6, & Eclipse 3.3
2. I am trying to work with the DWR samples.
3. I am trying to access the engine.js from the dwr.jar
4. dwr.jar is placed in the lib directly of the root/web-inf/lib

In the Eclipse Project properties I have given the reference to the dwr.jar, but I am just not able to access the JS. Below is the HTML code that I am using.

Please let me know what am I doing wrong.

[HTML]<html>
<head>
<script src="/org/directwebremoting/engine.js"> </script> //this is the path as per the JAR
<script type="text/javascript">
function updateValue(){
alert("First line");
var name = dwr.util.getValue("Name"); // This code is not working
// content.sayHello(name, loadinfo);
}
</script>
</head>
<body>
<input type="text" id="Name"/>
<input type="button" value="Click" onClick="updateValue()"/>
<br>
Reply : <Span id="DisplayValue"></Span>
</body>
</html>[/HTML]
Sep 24 '07 #1
3 3258
acoder
16,027 Expert Mod 8TB
Remember to use code tags when posting code:
[CODE=javascript]
Javascript code here...
[/code]

You're using incorrect syntax. Try:
Expand|Select|Wrap|Line Numbers
  1. var name = document.getElementById("Name").value;
Form elements should have a name attribute.
Sep 24 '07 #2
while using DWR the Standard JAvascript syntax is not required. dwr.util.getvalue()
is available in the engine.js provided by DWR

Thats where the problem is I am not able to access the JS file which is in the JAR
Sep 25 '07 #3
acoder
16,027 Expert Mod 8TB
Can you show the code for engine.js?

Do you get any errors? If so, what's the error?
Sep 25 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: TJRobertsJob | last post by:
Was wondering if someone could help. Over the last month I've been developing a small database application, using Access 2000, for use in a friends shop. Everything was going well until about a...
3
by: N. Graves | last post by:
Hello, I don't understand this error message." Error accessing File. Network Connection may have been lost." I'm not using any network connection for the database. In the VBA editor is goes...
3
by: Pete Atkins | last post by:
Help!!!!!!!! This may have been posted bfore, but i cannot find it. Have written a db in access 2003, opened in access 2000, saved, re-opened,etc - all was fine. Added some new forms /...
1
by: jim | last post by:
Hi Ng I have got a hughes problem. I have got a file which I have been working on for quite a while. But now suddently no matter what button I am pressing there comes an error saying: Error...
5
by: Rosa | last post by:
Hi, I'm experiencing a bit of a problem with security and file access from within a ASP.Net application... Locally (from an XP client) I manage to get any file or folder on my machine with...
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
3
by: Gerhard | last post by:
I have an application that needs to be able to upload documents that can latter be accessed and opened by a hyperlink. I can do this easliy if I store the files in a subdirectory in the...
2
by: Vincent | last post by:
I have been trying to find some API routines that will allow me to determine the name of the computer that is accessing a file on a server. I have found the NetFileEnum call (returns the names of...
2
by: GCM | last post by:
I have a database which was created from another parent database by combining some fields into one field for clerification purposes. When I create a for with the following command I get this error:...
1
by: riyaz.shaikh | last post by:
Hi All.... I am having a web site which runs under Windows Authentication. the requirement is this application should write files to a folder share. but the problem is this folder share is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.