kim pham

Greenhorn
+ Follow
since May 11, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kim pham

Thanks for your response.
in my jsp
<%
Map data = (Map) request.getAttribute("data");
Customer ed = (Customer ) data.get("defaults");
%>

ed.dataType() return int

<msg:myCustomTag tagName="tagName1" dataType= "${ed.dataType()}" /> Didn't work either.
Thanks,
9 years ago
JSP
Hi All,
Wanted to pass parameter to custom tag as below but the JSP crashed.
<msg:myCustomTag tagName="tagName1" dataType= "<%= ed.getDataType %>" />
Is that the correct syntax?
Thank in advance for the help
JP
9 years ago
JSP
Hi,
Didn't get the any exception? But it returns a null value.
Any suggestion?
KP
10 years ago
Hi all

the aes_decrypt function return null.
Anything was wrong with this aea_decrypt function.
Thanks in advance,
-K
10 years ago
Hi ,
As mentioned in previous post
Hint: request.getParameter() indicates that it needs an HttpRequest made...
No request == no java code executed.
That is not true. Java code has executed.
Thanks,
Kim
10 years ago
JSP
Sorry I am new to this post.
Here is my codes:


and here is my JSP


movie3Str is always empty even I set it in javascript.
Any idea.
Thanks,
Kim


Edited by Stefan:
Not pretty formatting. [code] tags. See?
Click the link from Bear's post above to find out more. There is even a handy little button when editing a post...
10 years ago
JSP
Hi,
Yes, It is the right place for JSP(mycode.js and mycode.jsp)
I attached both of my JSP(mycode.jsp) and JS(mycode.js) script.(See below)
In JSP I retrivied this movieIdHidden as highlight in orange color and this value is set in JS function ratingsSwitch as highlight in orange color Thanks,
Kim
10 years ago
JSP
No HTTP Request at all.
Basically if the user selects different value in the selected box the JS ratingSwitch() function will be triggered as defined below. In this FS I set the movieIdHidden = 1000 and I won't able to read it back from JSP(String movie3Str = request.getParameter("movieIdHidden"); )

function ratingsSwitch() {
var regionType = $("select[name='regiontype'] option:selected").attr("name");
$(".ratings").each(function () {
$(this).css("display", "none");
});
$("."+regionType).css("display","inline");


document.getElementById('movieIdHidden').value=1000;
}

<%
String movie3Str = request.getParameter("movieIdHidden");
%>
Is this the right way to read from JSP with the hidden value.
Thanks,
Joanne
10 years ago
JSP
Hi ,
As mentioned in previous posts I set this value in JS as
document.getElementById('movieIdHidden').value=1000;
and in JSP I read this value as
<%
String movie3Str = request.getParameter("movieIdHidden");
%>
But the movie3Str is NULL. I would like to have movie3Str is '1000' which is set in JS but this is NULL?
Have I missed anything here in JSP.
Thanks,
Kim
10 years ago
JSP
Hi ,
document.getElementById('movieIdHidden') is null when the form is reloaded again after setting this value in JavaScript with the value of 1000.
Is there any way that we can modify/set the JSP's variable in JavaScript?

I have defined movieId in the JSP and want to set this variable to different value in the JavaScript when the user selects different option in the dropbox.
Thanks,
Kim
10 years ago
JSP
I need to download the FireBug tool to debug this issue why reading the value (request.getParameter("movieIdHidden") is returned 0 instead of the value that I set in JavaScript. I will keep you posted as soon I am able to nail down the issue.
Thanks,
Kim
10 years ago
JSP
Hi,
Thanks so much for anwsering my question.
Why set in JavaScript? Why not use a value clause on the element using JSP?

I set the value in JavaScript because it is depending what the user selects in the dropdown box. The value can be different and it is not 1000 at all the time.

What do you mean by " Why not use a value clause on the element using JSP?"
Thanks again,
Kim

10 years ago
JSP
Hi All,
I have the hidden field defined as:
<form method="post" name="userform" id="userform"><input
<input type="hidden" id="movieIdHidden" name="movieIdHidden"></input>
....
When the form is reload I set this field as
document.userform.movieIdHidden.value=1000;

In the JSP I read this value as:
string strmovie3 = request.getParameter("movieIdHidden");
// convert to int
int movie3 = parseInt(strmovie3 );
Is this the right syntax to read the hidden value from the form? I think this is the right syntax to get the hidden value from JSP but
I always get the movie3 = 0 but I already set this value to 1000( document.userform.movieIdHidden.value=1000;) in
one of the JavaScript.

Thank in advance.
Kim
10 years ago
JSP