OmniX commented: saved me when no one else could! Thankyou so much! +1
I figured out the problem, had to add some extra stuff in the MessageResources.properties file
I was working through an client side struts from the internet, everything worked fine, until the alert came up displaying "???en_GB.errors.required???" instead of the values from the MessageResource.properties file.
Does anyone know what the problem could be?
can u post your code, because i tried it and it works perfectly.
i could be wrong but i think u have to use session.getAttribute
I think i got it to work, i changed a function in the dynlayer.js file
function DynLayer(id,nestref,frame) {
if (!is.ns5 && !DynLayer.set && !frame) DynLayerInit()
this.frame = frame || self
if (is.ns) {
if (is.ns4) {
if (!frame) {
if (!nestref) var nestref = DynLayer.nestRefArray[id]
if (!DynLayerTest(id,nestref)) return
this.css = (nestref)? eval("document."+nestref+".document."+id) : document.layers[id]
}
else this.css = (nestref)? eval("frame.document."+nestref+".document."+id) : frame.document.layers[id]
this.elm = this.event = this.css
this.doc = this.css.document
}
else if (is.ns5) {
this.elm = document.getElementById(id)
this.css = this.elm.style
this.doc = document
}
//this.x = this.css.left
//this.y = this.css.top
this.x = this.elm.offsetLeft
this.y = this.elm.offsetTop
this.w = this.css.clip.width
this.h = this.css.clip.height
}
else if (is.ie) {
this.elm = this.event = this.frame.document.all[id]
this.css = this.frame.document.all[id].style
this.doc = document
this.x = this.elm.offsetLeft
this.y = this.elm.offsetTop
this.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidth
this.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeight
}
this.id = id
this.nestref = nestref
this.obj = id + "DynLayer"
eval(this.obj + "=this")
}
the change is highighted in red
I think u could create a function and in that function set the variable something like this:
function updateVar(){
mysample = 3;
}
and then the button would look like this:
<input type="button" id="sample0" onclick="updateVar()" />
It seems it cannot be done as yet, i have requested a change for that, lets hope they do change the way the class files are displayed.
u have an onMouseDown and other onmouse methods on the buttons so the href doesnt matter, it was also opening new windows for me, in both IE and FF.
Can u give a further explanantion, i dont understand what u want to do.
My apologies for breaking your code in IE :) Hope i dont break it further
Good news, i got the code to work in IE (i m using ie6 though) again, bad news it will not work in FF, i think it has a problem getting the height of the div using this.window.h from miniscroll.js
this.window.h returns an integer in IE and returns an undefined in FF.
I took the source from your site and made some changes in the html file and one in the miniscroll.js, changes are highlighted in red:
<HTML>
<HEAD>
<TITLE></TITLE>
<style>
A:link {text-decoration: none; cursor: hand;}
A:visited {text-decoration: none; cursor: hand;}
A:text{text-decoration: none; text-align: justify; cursor: hand;}
</style>
<base target="home">
<LINK REL="Stylesheet" TITLE="Main Stylesheet" MEDIA="Screen" HREF="innerspace.css">
<script language="JavaScript" SRC="dynlayer.js">
</SCRIPT>
<script language="JavaScript" SRC="miniscroll.js">
</SCRIPT>
<script language="JavaScript">
<!--
function init() {
DynLayerInit()
myscroll = new MiniScroll(scrollWindow,scrollContent)
}
//-->
</SCRIPT>
<STYLE TYPE="text/css">
<!--
#scrollWindowDiv {position:absolute; left:0; top:5; width:400; height:250; clip:rect(0,400,250,0);}
#scrollContentDiv {position:absolute; left:0; top:5; width:400;}
#scrollbtnDiv {position:absolute; left:400; top:5; width:30;}-->
</STYLE>
<script language="JavaScript">
<!--
preloadwh1 = new Image();
preloadwh1.src = "up.gif";
preloadwh2 = new Image();
preloadwh2.src = "down.gif";
preloadlogo = new Image();
preloadlogo.src = "logo.jpg";// -->
</script>
</HEAD>
<body onLoad="init()" text="#000000" vlink="#6699FF" link="#6699FF" alink="#000000" bgcolor="#FFFFFF" topmargin="10" leftmargin="0" marginwidth="0" marginheight="0">
<DIV ID="scrollWindowDiv">
<DIV ID="scrollContentDiv">
<table border="0" cellspacing="0" cellpadding="5" width="400">
<tr>
<td background="title.jpg" class="title"><b><font size=3 color=000000>Message</font></b></td>
</tr>
<tr>
<td class="normal">
<img align="right" src="logo.jpg" alt="" width="100" height="83">
A soft mechanical voice calls out to you. <br>
<br>"Greetings mortals and welcome... to Innerspace..."<br> …
I could be wrong but i think u have to put the quotation marks in
<input type="text" readonly name=MemberNommer id=MemberNommer value="<?php echo $MemberNommer ?>" />
I dont know php, so i m not sure if the double quotes will break the php code.
I think u are in the wrong forum, but your jsp file is giving the errors, teh first one tells u that u need a catch or finally when using the try statement.
Another thing u shouldnt be using those statements in a jsp file, put them in a servlet, jsp is only used for display purposes.
i understand what u need to do, but what have u done, can we look at some code that u have done.
In the miniscroll.js replace the following lines
this.contentHeight = (is.ns)? this.content.doc.height : this.content.elm.scrollHeight
this.contentWidth = (is.ns)? this.content.doc.width : this.content.elm.scrollWidth
with this
this.contentHeight = (is.ns)? this.content.scrollHeight : this.content.scrollHeight
this.contentWidth = (is.ns)? this.content.scrollWidth : this.content.scrollWidth
I tried to test it on my side with some of your code from the site, and no error is shown.
well u can submit a form from the onclick event on a button element.
with the form action being the file name or serlvet, or u could have a struts action, i would go with the struts action.
The problem is that in firefox it is not finding the div tags in the body of your file.
The function that has the problem is located in the dynlayer.js file
function DynLayerInit(nestref) {
if (!DynLayer.set) DynLayer.set = true
if (is.ns) {
if (nestref) ref = eval('document.'+nestref+'.document')
else {nestref = ''; ref = document;}
for (var i=0; i<document.getElementsByTagName("div").length; i++) {
var divname = document.getElementsByTagName("div")[i].id
var index = divname.indexOf("Div")
if (index > 0) {
eval(divname.substr(0,index)+' = new DynLayer("'+divname+'")')
}
}
if (DynLayer.refArray.i < DynLayer.refArray.length) {
DynLayerInit(DynLayer.refArray[DynLayer.refArray.i++])
}
}
else if (is.ie) {
for (var i=0; i<document.all.tags("DIV").length; i++) {
var divname = document.all.tags("DIV")[i].id
var index = divname.indexOf("Div")
if (index > 0) {
eval(divname.substr(0,index)+' = new DynLayer("'+divname+'")')
}
}
}
return true
}
U can replace that function with this one, i hope it will work for u.
I know u dont need the help, I quoted u, cause u had already asked what i wanted to and he/she didnt answer that question. As vish_1x1 pointed out, he is new to java, and what might be obvious to one person is not always obvious to another person.
What would be interesting to know is how do you start this whole thing?
Are u going directly to your jsp page or your servlet first
I suggest calling your servlet which will then redirect to the jsp page, then your array should be filled.
Have u tried using firebug?
Have u tried using firefox's firebug?
I copied the code u provided and it doesnt work because DynLayerInit is undefined, i suspect it is in the dynlayer.js file. which u havent provided.
Please provide the other js files as well, it would help alot.
Can u post your code, coz i tested mine, and it works in IE6 and FF3, doesnt allow any non numeric character input at any point, event after u have inserted some numbers.
u could disable the field, but then if someone makes a mistake with the numbers they cant change the numbers.
@Thirusha
request.getParameter()
in a JSP page can be used for both GET(the one you mentioned) and POST requests.
thanx stephen84s.
Hi Sunita,
Can you please clear your requirement. What actually you want?
As well as some of your own code.
can u provide the screen shot of how it is looking in ie7, i just cant understand what u want it to look like, i think the cold here in SA has frozen my brain.
Have u tried google?
Try this link http://www.bigwebmaster.com/JavaScript/Scripts_and_Programs/Image_Galleries/
My pleasure, glad to help. :)
your id/name is just for use in your form dosent suit any purpose for the validation I gather?
I tend to always put the id and name attributes in, whether i use them or not, but for the example it was used in the submission of the form.
I hope it works for u :)
It is available higher up on this thread but here it is again:
<table>
<tr>
<td>Display Limit:</td>
<td><input type="text" maxlength="5" style="width:95px;" name="displayLimit" onkeyup="checkNumeric(this)" id="displayLimit" value="100" /></td>
</tr>
</table>
Try google, there are loads of examples and articles there, u can read this too www.elated.com/articles/javascript-and-cookies/
Try using setAttribute in the servlet, and then getAttribute in the jsp page.
I am new to jsp and servlets as well, and i think(i could be wrong) that getParameter is normally used when getting the parameter from the url. If your url is: ...?maxvalue=5, using getParameter will display 5.
I have tested it on a button like this: (it works both in IE6 and FF3)
<input type="button" name="tbutton" id="tbutton" value="testbutton" onclick="javascript: if(!confirm('Confirm delete?')) return false;" />
It then pops up a confirmation box.
Can u provide your code, maybe something else is breaking first and thats why that part doesnt work.
I dont see any problems with the snippet of code.
Are u getting any errors?
I dont see any place where u are calling the javascript function that will do the validation.
U could have a button that will call that function then the validation might work.
your javascript in your browser has been turned off or disabled, u can enable it in firefox by going to tools -- options -- content then make sure teh enable javascript checkbox is checked
Does anyone know how to change the look of the java files that are listed when you expand the java folder in the tree structure of the database?
i have these numbers infront of the class file, but have no clue what they are, they are not there in toad(i checked on someone elses computer). Also some of the classes names have been cut off.
Any thoughts on what they are, e.g:
/d56a3e7f_TestClass
Thanx,
T
I think this is in the incorrect forum.
The java files are visible in the latest release version 1.5
But now i have these numbers infront of the class file, but have no clue what they are, they are not there in toad(i checked on someone elses computer). Also some of the classes names have been cut off.
Any thoughts on what they are, e.g:
/d56a3e7f_TestClass
U could either used frames, or ajax.
I would go the ajax route.
Well i dont think so, i could be wrong since i m not a genius asp programmer, but from what i understand, asp is server side code, and needs to be parsed by the server, so u have to create an asp page, that will have your asp code in it, and u can put html tags in that asp page, but not the other way around.
You could try this link:
http://www.asp-counter.co.uk/counting-active-visitors.asp
Is this what u are looking for;
<input type="text" name="testField" id="testField" value="<%=someVar%>" />
Thanx for replying jwenting, but i dont see any thing on my side regarding category of items, i m using oracle sql developer 1.0
Does anyone know how i can get a list of the java stored procedures that are inside the oracle database using oracle sql developer?
If anyone has used Toad, i m referring to the list of java classes that comes up when u click the Java tab in Toad.
Thanx.
I am not yet an expert in jsp, but i think u have to submit the page before any of your parameters are set.
I'm going to feel really stupid if I'm wrong but is this even Javascript? It looks like ASP or something.
I dont think u are cause it definitely does not look anything like javascript, it is java scriptlets, which should not be used at all.
so u want to know if someone chooses a value in box, how to get that value?
if a user selects a value, u can use the onchange event and pass this.value to a function, that will give u the value of the oprion that was selected.
I think u should provide some code on what u are trying to do, i dont understand what u want to do with those values.
can u provide some more information on your problem like what u trying to do with the combo, or if u are trying to create it using javascript?
Hi
can u please paste some code, or elaborate on your problem.