Divya Chandrasekhar

Greenhorn
+ Follow
since Jun 04, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Divya Chandrasekhar

No luck
Any help will be appreciated!
13 years ago
JSP
Thanks bhanu, will try it out and let you know...
13 years ago
JSP
My bad
To answer your questions:
1. I have a variable userInfo in the action form
2. I am accessing the value by doing a String str = request.getParameter("userInfo");
13 years ago
JSP
the alert prints the value "Divya"... checked this
13 years ago
JSP
Hi All,

I have an issue with setting a JavaScript variable to session. This is a string and I need to retrieve this in my Action Class and process further. I am using Struts 1.1.
I have tried setting this variable as a hidden variable however, it doesn't reach the Action Class - I get a null value.

Any suggestions on what I would need to do?

Here's the gist of what I am trying to do:

JSP:
<html>
<body>
<input type="hidden" name="userInfo" />
<input type="submit" onclick="submit();" value="Submit">
<input type="submit" onclick="cancel();" value="Cancel">

<form>
....
....
....
//make a call to foo()
</form>
<script>
function foo() {
var bar = "Divya";
document.getElementsByTagName("userInfo").value = bar;
}
</script>
</body>
</html>

13 years ago
JSP
Thanks Raj,

Will try this out!
13 years ago
JSP
Hi Raj,

A small example would help...

Thanks,
Divya
13 years ago
JSP
Hi Raj,

thanks for your reply. can you please show me an example?

Thanks,
Divya
Hi,
I have a small form, which when filled would hit a DB, fetch some data and this data needs to be populated onto a JSP page.
My questions are:
1. Since we are talking about a datagrid being displayed, can we fetch a resultset and set it to session/ request scope - I think this is a bad design choice. But how else would I display the data?
2. If I do not use the above approach, how else can I do it? Can I store the data in a collection that can be set to request scope and display from there?
Thanks,
Divya

13 years ago
JSP
Hi All,
I am fairly new to Java script.
My problem is as follows:
I need to replace one DIV with another.
The first div, "div1", is shown on page entry; "div2" is initially hidden.
"div1" contains a small form. On click of the submit in "div1", the back-end is hit and we fetch some data which then needs to be populated in "div2" when we get redirected back to this page, so I want "div1" to be replaced by "div2".
Any help will be appreciated!
Thanks,
Divya
Hey Rob,

I modified this slightly to suit my need and my code works beautifully..
Thanks once again!

Divya
13 years ago
Love this site! Congrats everyone!
13 years ago
Agree with marc, when you compile you need to do:
javac <yourfilename>.java
and while running it you just need to do:
java <yourfilename>
13 years ago
Hang in there Aashu, keep updating your resume every so often on the job portals - most companies look for recently updated resumes, even if it means that you have only added a space or a line. Also, it would help if you kept yourself in tune by studying and being prepared for any interviews, even if it is at a short notice, making sure that you are ready for any job opening that comes your way.
13 years ago
Rob, I think this looks neat and is a lot less complex than what John suggested and what I feared
Thanks for your inputs Rob and John!
13 years ago