javascript « Struts « JSP-Servlet Q&A





1. Alternative for JavaScript onUnload    stackoverflow.com

there is an alternative to the Javascript onUnload? I use JSP Jakarta Struts framework with a Servlets. I must know, when is window closing, because not everyone clicks on Logout button.
How ...

2. How can recognize user selected which ones?    stackoverflow.com

I have two list on my request on jsp. First one is productGroupName, and the second is products. Now, I show these like below.

<html:form action="/priceOrder"> <table width="100%" id="tableStyle" style="font: message-box;padding: 20px;">
  ...

3. struts validator client side, alertbox without message    stackoverflow.com

I use commons-validator v1.2 specification-version : 1.0 whereas my spec-version for struts is : 1.1. Although everything works fine except the message display in the alert box. The alert box display ...

4. Inserting Struts Tiles attribute into a JavaScript function    stackoverflow.com

I'm trying to insert a Struts Tiles attribute into a JavaScript function. The JS function is called on load and certain JSP pages should be allowed to append additional code to ...

5. handling strings with apostrophes passed to javascript generated by jsp and struts 2    stackoverflow.com

in jsp i have

<a href="javascript:toggle('<s:property value="company.name"/>')">
company names containing apostrophes are generated like so:
<a href="javascript:toggle('apostrophe's company')"/>
single quotes around names cause problems for company names with the apostrophes. i'd like to get double ...

6. setting a javascript variable to a struts property map value    stackoverflow.com

basically I want to do the following.

var myvar = '<s:property value="myMap['mapKey'].mapObjectValue" />'
but that fails. I've tried several variations of quotes and can't quite get it to work correctly. any ...

7. jsp in javascript    stackoverflow.com

I've created a jsp page. In that when i select 1 check-box or both check-box or none, the corresponding text-boxes and list-box must be displayed in the same page. For that i ...

8. new JSP in a parent window closing a popup child JSP page    stackoverflow.com

I am learning Apache Struts, JSP and building a simple web application. Now, I would like to see the feasibility of the below functionality. Clicking a button on parent JSP page, ...

9. How to take control/cursor to another text box    stackoverflow.com

I have a page where you enter customer-id first and hit submit. That point it will validate the customer and if valid, comes back to the same page to enter quote ...





10. how to hide a text box based on the value selected    stackoverflow.com

I have a code like this to display account number in a dropdown with an option of "Other". user can select any account from the list or can select "Other" and ...

11. Returning to the search pagination page from another jsp    stackoverflow.com

Can someone please help me on this, I have a page where a user can make a search and the result will come back with pagination. The user has the option of clicking ...

12. Simple JSON example using Struts 2.2.x?    stackoverflow.com

I’m having trouble getting JSON results working with Struts 2.2.1.1. Does anyone have a simple working example that returns a JSON result to a JSP using Struts 2.2.1.1 and ...

13. Returning JSON response from Servlet to Javascript/JSP page    stackoverflow.com

I think (actually I KNOW!) I'm doing something wrong here I am trying to populate some values into HashMap and add each hasmap to a list which will be added to ...

14. JavaScript Popup Calendar not working with Struts 1 tag    stackoverflow.com

I am designing a website using "Struts1" framework, but am not able to populate my form's date field using pop up calendar(it's js file http://pastebin.com/jMK2dVne ) My JSP Code:

<html:form ...

15. Struts tag in Javascript call    stackoverflow.com

I have a JSP page where I want to say something like:

<... onclick="alert('<bean:message key="msg.oops" />')" ... />
This does not work. The page is not rendered. It works fine if I ...

16. What's wrong with this function ...?    stackoverflow.com

I have made this function for calling action from one jsp. I am using struts 1.2 my .jsp code is like this

    function addVehicleDetails()
       ...





17. Struts Multiple Select Box Selections    stackoverflow.com

<html:select property="fields" multiple="true" style='width:200px;'>
    <html:options property='fieldsOptions'/>
</html:select>
fields is a String[] and fieldsOptions is an ArrayList I populate. When I do:
var selected = document.forms[0].fields; 
It returns an array that has ...

18. How to Pass html:text value with html:link in struts 1.2    stackoverflow.com

My jsp page display a list using logic iterate. every row displayed has a edit link too. when edit linked clicked Name will be changed to textbox so it can be ...

19. selecting s:select value using javascript    stackoverflow.com

I have an iterator in jsp and the iterator contains 2 lists:

<s:iterator value="reportNamesList">
     <s:select name="hour" listKey="codeDesc" listValue="code" list="hourList" />
     <s:select name="minute" listKey="codeDesc" listValue="code" ...

20. popualte textbox from values on screen with javascript    stackoverflow.com

how can I use the values from the code below:

 <html:select property="state" > 

 <html:option value="0">Select State</html:option> 

 <html:optionsCollection name="InputForm" property="stateList" label="label" value="value" /> 

 </html:select>
to populate a textbox with whatever ...

21. close pop up window and redirect to parent window in struts2    stackoverflow.com

I have pop up window , in which to upload an excel file of adding new users. After clicking the button and successfully added the users into DB, I want to close ...

22. How to remove single quotes in Struts?    stackoverflow.com

I am passing a Struts property to my JavaScript function as follows:

facemode('<s:property value="caseemailnumber" />');
I am getting the emailnumber as 'abc@gmail.com'. I want to remove the single quotes. How can I do ...

23. Action is triggered thrice on a single event    stackoverflow.com

This is kind of simple (I know) but yet I cant figure it out. What is happening: I have a jsp on which a button triggers an action (which deletes a particular record ...

24. call javascript from jsp    struts.1045723.n5.nabble.com

hello all

25. Help with JSP and javascript    struts.1045723.n5.nabble.com

There is a way to escape quotes in OGNL... I thought I had a sample sitting around somewhere but I am not finding it. Check google. I would guess that you could just escape the single quotes you need and the rest will fall into place. -Wes On Friday 10 July 2009 14:54:30 Security Management wrote: > OK, thanks Wes, I'm ...

26. How do you refactor JSP, HTML, JavaScript, CSS, etc?    struts.1045723.n5.nabble.com

I'm using Eclipse and the current solution (which I dislike) is to "Search/Replace". This is error prone solution. Do you now any better approach to refactor non Java resources in big apps? Or do you use any cool refactoring tool? P.S. Maybe this topic does not relate to Struts directly, but Struts is about webdev, isn't it?

27. Java Script in JSP pages    struts.1045723.n5.nabble.com

Hi, yes, you can, what is the issue you are facing? just add the tag inside your page and write your javascript code there and just use them in your page. Thanks, Nuwan On Jan 23, 2008 2:10 PM, naveen k <[hidden email]> wrote: > Hi, > > I am in a development of struts web ...

28. javascript in returned jsp through xhr    struts.1045723.n5.nabble.com

Hi, I am a little stuck here. A action loads a jsp into a div. For this I use the ajax theme (dojo) and a form submit with target. Works fine. The Problem ist, that the jsp returned by the action has javascript in it. Its the jcalendar. Having this jsp load normally the calendar works fine, but not in div. ...

29. Struts2/Javascript: Action class cannot get property from jsp    struts.1045723.n5.nabble.com

Hi all, I'm new to Struts and struggling with Struts2/Javascript. I have a jsp website with a search form (textfield and submit button). Submitting the button calls the Struts action "SearchAction". "SearchAction" gets the property "searchInput" from the jsp website and does something with it. This works. But now: I have some (Dojo-)Javascript on my ...

30. xhtml valid javascript in struts    coderanch.com

31. can i pass a variable through javascript function to another struts jsp page?    coderanch.com

I have two jsp pages P1 and P2 . When P1 is invoked it picks the details from the database and displays on the page. The details are displayed in the form of a table with each row having a radio button. When any radio button is checked and then particular link is pressed say "Preview and Announce Party" then the ...

32. Problem with my javascript included in jsp with struts    forums.oracle.com

Hi, Using JavaScript I need dynamic years of dropdown from current to 10 years. One more thing the selected year should be submitted always when I click submit. I tried like this but, when I select some year even it is populating current month only??????..