- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
34 Posted Topics
How to display text string with Javascript on screen? This is my test page: [CODE]<html> test <script type="text/javascript"> docwrite(1); document.write('hi'); docwrite('hello'); </script> docwrite(2); <script type="text/javascript"> function docwrite(x) { document.write(x); } </script> </html> [/CODE] I saw only "test docwrite(2);". I want to see "test 1 hi hello docwrite(2);" with " 1 … | |
This SQL operation will get the desired Proposal_ID. [CODE]SELECT P.Proposal_ID, AVG(c.Task_Good_Idea) AS Average FROM proposals P, proposal_appraisal c LEFT OUTER JOIN users b ON (c.Evaluator_ID = b.User_ID) LEFT OUTER JOIN submission_status d ON (c.Primary_Evaluation_Status_ID = d.submission_status_ID) WHERE (P.Proposal_ID = c.Proposal_ID) AND P.Proposal_ID >= 931 AND d.Submission_Status_ID = 2 GROUP BY … | |
Given the following two SQL operations: [CODE]select prod_Id, P.proposal_id, P.institution_Name from proposals P group by P.proposal_ID having mark >= 50 order by P.proposal_id desc select prod_id, P.proposal_id, PA.evaluator_ID, U.user_Given_Name, U.user_surname from users U, proposals P LEFT outer JOIN proposal_appraisal PA ON (P.proposal_Id = PA.proposal_id) where PA.evaluator_ID = U.user_id group by … | |
How to calculate an average and use that average to select some data? e.g. for this query and its result. [CODE]select Proposal_ID, Mark, AVG(Mark) AS Average from proposal where (Proposal_ID >= 931) GROUP BY Proposal_ID 931 20 22.2222 935 30 22.2222 936 30 21.1111 967 30 25.5556 968 30 20.0000 … | |
I print the following webpage with Firefox & Chrome: [url]http://en.wikipedia.org/wiki/Final_(Java[/url]) Both hardcopies of the long line "public static final double PI = 3.141592653589793; // this is essentially a constant" is cut off. i.e. the line does not wrap around. Both Firefox & Chrome display that line on screen in one … | |
Re: [QUOTE=WASDted;1218196]DaniWeb plans to interview Bjarne Stroustrup, the designer and original implementer of C++ and the author of many books on C++. This is truly a treat and rare opportunity for us as a community to talk to the father of C++. As the new editor-in-chief of DaniWeb's News and Reviews … | |
I want to optimize the following small integer program in speed. My g++ compiler version is 4.3.4 on 32 bit linux. Please suggest or comment the following ideas. Some ideas are: 1. use compile flag such as -O3 2. rewrite the bigger function with function object [CODE]#include <algorithm> #include <cstdlib> … | |
Pressing the enter key of the following page (created by JSP) submit page more than once. Both alert popup boxes appear as expected: alert('i ' + i + ' elem[i].checked ' + elem[i].checked); alert('alarmgroup ' + alarmgroup + ' rowsPerPage ' + rowsPerPage); appear. However, then this alert appear again, … | |
Pressing the enter key at the jsp page receive extra invalid data at the ProdController.java. The alertgroupStr receive "unack" as expected. However, I do not understand why alertgroupStr receive the extra invalid "null" later. Debug log: 11:14:52,187 DEBUG com.systems.monitoring.war.ProdController:54 - alertgroupStr unack ... 11:14:52,187 DEBUG com.systems.monitoring.war.ProdController:54 - alertgroupStr null ProdController.java: … | |
My javascript function setHw is not called by pressing the return key in all of the following pages. Please help. [CODE]<div id="rowPerPageDiv"> <form name="tagform" action="Hw.htm" method="post"> <input type="hidden" name="currPage" value="0"/> Rows Per Page<input type="text" name="rowsPerPage" id="rowsPerPage" value="20" onsubmit="return setHw()"/> <input type="button" value="Apply" onClick="setHw()"><br> </form> </div>[/CODE] [CODE]<div id="rowPerPageDiv"> <form name="tagform"> <input … ![]() | |
I want to implement JavaScript Internationalization. However, JavaScript does not have the property file mechanism (which is available in Java). I am thinking of using the Java property file mechanism in Javascript. Is it possible? I had implemented Java Internationalization with the Spring framework message. e.g. [CODE]<spring:message code="menu.administration"/>[/CODE] How do … | |
My program should display '*' when entering a password to a text box by a user. How to do that? | |
How do I recursively remove all the directories and files which begin with '.'? My test program rmdir.py does not do the job yet. Please help. Code: #!c:/Python31/python.exe -u import os from shutil import * root = "C:\\test\\com.comp.hw.prod.proj.war\\bin" for curdir, dirs, files in os.walk(root): print (curdir) print (dirs) for d … | |
I want to walk a directory and ignore all the files or directories which names begin in '.' (e.g. '.svn'). Then I will process all the files. My test program walknodot.py does not do the job yet. Please help. [CODE]#!c:/Python31/python.exe -u import os path = "C:\\test\\com.comp.hw.prod.proj.war\\bin" for dirpath, dirs, files … | |
I want to call a C++ program from PHP with apache server on Fedora 12 linux. testprog is put in the same directory of the test php program. I see the output of exec('ls -lrt') but not exec("testprog"). Please help. The following are my php and cpp test programs. [CODE]<html> … | |
How to recursively walk directory & rename files & directories with Python 3.1 on windows? [CODE]#!c:/Python31/python.exe -u import os path = "test" for (path, dirs, files) in os.walk(path): print (path) print ("-----------------") if "monitoring" in path: dst = path.replace("monitoring", "managing", 10) print (dst) os.rename(path, dst) print ("path----") for file in … | |
The group button in my form is set to "unack". The Spring HwController receive the correct group "unack" when the "apply" button is clicked. However, the HwController receive the null group when the cursor is moved to the text box and press the <Enter> key. Only the data from the … | |
My controller.java encounter an input string: "undefined". Please help. [CODE]public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { int rowsPerPage = 20; String rowsPerPageStr = request.getParameter("rowsPerPage"); logger.info("rowsPerPageStr " + rowsPerPageStr); if (rowsPerPageStr != null) { rowsPerPage = Integer.parseInt(rowsPerPageStr); }[/CODE] My jsp page use javascript as follows: [CODE]window.location = "hwdisplay?rowsPerPage=" + … | |
I want to keep the value of the user input (e.g. text box value) displayed after page refresh by a javascript. The following test web page is used. The alerts appear before and after the page refresh as expected on all browsers (FF, Chrome, Opera & IE). The input value … | |
How to store variables in the jsp page scope with the spring 2.5.x framework? This has compile errors. [CODE]import javax.servlet.jsp.PageContext; @Override public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { PageContext pageContext; Object o = pageContext.getAttribute("com.mycompany.pageId");[/CODE] Description Resource Path Location Type The local variable pageContext may not have been initialized … | |
Why the following code has the error: 'document.mainform.unknownHw' is null or not an object? function setUnknownHw(unknownHw) { document.mainform.unknownHw.checked = unknownHw; } <div class="special"> <form name="mainform" id="mainform" action="display.htm" method="post"> <br><br><input type="checkbox" name="unknownHw" onClick="setdbUnknownHw(this)">Unknown Hw <input type="submit" value="Apply" onClick="setdbRowsPerPage()"><br> </form> </div> | |
How to use "c:if" to test for the boolean true? These does not work: [CODE]<c:if test="${model.value == 'true' }"> <c:if test="${model.value == "true" }"> <c:if test="${model.value == true }">[/CODE] | |
After the apply button is clicked, the data entered by the user disappeared in the text form. How to keep the data appearing on the text form? The server use jsp and the Spring framework and the client use the Prototype javascript library. | |
I like to have a sleep or delay function in javascript. The Prototype library 1.6.1 has a delay function. It is working well in Firefox or Chrome but not IE 7 on windows XP. Please help (I cannot use newer version of windows). [CODE]function sleep() { } sleep.delay(0.1);[/CODE] | |
To ensure my program keep the client preference after page refresh, do I do this: [CODE]var value = Cookie.get('key'); if (value == null) { // get the client preference // ... // save the client preference Cookie.set('key', 'uservalue'); } // use the client preference[/CODE] | |
My table columns are sorted by the Tablekit library (millstream.com.au/upload/code/tablekit/). The user can click the columns to toggle the sort order either ascendingly or descendingly. I can save the current sort order (preference) in the server. After the page is refreshed, the web page is sorted by the original sort … | |
After clicking the checkbox, I like to get the value of the checkbox submitted. Why the following page always get the value "20" for checkboxChoice and checkboxvalue no matter which checkbox I clicked? Please help. [CODE] <tr> <td> <div class='fg1'> <input type="checkbox" name="checkboxChoice" value="20" checked onclick="submit()"> Choice </div> <input type="hidden" … | |
How to store some strings at the client side for firefox, chrome & IE? This code works on firefox & chrome but does not work on IE - no alert window appears. [CODE] var key = "localorder"; localStorage.setItem(key, 'asc'); alert('localorder ' + localStorage.getItem(key)); [/CODE] This code does not work on … | |
I use the Tablekit library and Prototype javascript framework on firefox, chrome & IE8. The columns in this table can be sorted by the Tablekit library. [CODE]<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/tablekit.js"></script> <body> <div id="mainmenu"> ... </div> <div id="content"> <table class="sortable resizable"> <thead><tr> <th class="sortfirstdesc">ID</th> <th>Date</th> <th>Time</th> </tr></thead> </table> </div> … | |
I want to set the value to <td><div class='urg5'>High</div></td> in JTSL. [CODE]I tried <c:set var="ack" value="<div class='urg5'>High</div>"/> <c:out value="${ack}"/> Page source of the JSP web page is <div class='urg5'>High</div></td> i.e. special characters appear. instead of <div class='urg5'>High</div>[/CODE] | |
A "Confirm" window pop up for Firefox, IE but not Chrome for my web page with auto refresh every 10 seconds by javascript. Attached is the screen shot. How to stop this "Confirm" window from popping up? | |
How to auto refresh my web page every 10 seconds without resetting all the checkboxes? This will auto refresh my web page every 10 seconds but will reset (uncheck) all the checkboxes [CODE] <body onload="timedRefresh(10000);"> <script type="text/javaScript"> function timedRefresh(timeoutPeriod) { setTimeout("window.location.reload(true);",timeoutPeriod); } </script> [/CODE] | |
My JSP web page has many checkboxes. What is web page source code look like when clicking one checkbox will submit only one checkbox value (not the whole form) immediately? i.e. toggling one checkbox will send the info that only that checkbox is toggled. This does not work because clicking … | |
I downloaded the tablekit javascript library and put it in the js directory which is in the jsp directory. i.e. the directory is C:\workspace\com.mycomp.data.war\WEB-INF\jsp\js The jsp page is as follows and display correctly with FF and chrome on Windows Vista. However, the column of the page is not sorted by … |
The End.