129 Posted Topics
Re: In the file mystyle.css see the style [CODE] .nav-Hotels, .nav-Hotels-click { position: absolute; top: 72; left: 0px; width: 125px; height: 42px; background: url(pix/Nav.png) no-repeat -125px -72px; } [/CODE] Here top is set as top:72; Set the units for the value there. i.e top:72px; Hope this solves the issue | |
Re: Yeah you cannot use submit button as it will refresh the whole page. You will have to use a normal button. Now in the line xmlhttp.open("GET","ajax_info.txt",true); instead of "ajax_info.txt" use the url where you want to submit the form i.e. the one in the action attribute of a form and … | |
Re: java.lang.NoClassDefFoundError: com/oreilly/servlet/multipart/MultipartParser indicates that the required class/package is not in the classpath | |
Re: I dont think there is any way to get an element by its attribute. As for the second problem try following in Line no. 6 [CODE] alert(elements[i].getElementsByTagName('data')[0].childNodes[0].nodeValue); [/CODE] | |
Re: Checkout the solution at the following link that I had found sometime back to solve a similar caching issue in IE [url]http://viralpatel.net/blogs/2008/12/ajax-cache-problem-in-ie.html[/url] Hope it helps you too | |
Re: First check for the type of browser and then try to attach the event as follows [CODE] if(isIE){//If the browser is IE e3s1.onselect = new Function("checkother();"); } else{//For other browsers e3s1.setAttribute("onselect", "checkother();"); } [/CODE] | |
Re: If you are using Seam than the solution given at the link below will be helpful to you. What it does is that it periodically checks for new session through javascript timer and Seam component annotated with @WebRemote. The javascript timer is reset at every normal and AJAX request. [url]http://in.relation.to/3266.lace[/url] … | |
Re: Try this.. Put the passing of value in a function (have appropriate parameters to the function), [CODE] function putValue(){ thetextbox[0].value = pass + cmd + box.value; } [/CODE] Now first check the browser type since event handling is different in IE and other browsers. A simple way can be, [CODE] … | |
Re: Either set the styles in the css for 'divStyle' like [CODE] <STYLE> ... ... . divStyle{ ... ... visibility:hidden; ... ... } .... </STYLE> [/CODE] Or you can set it in the style attribute of the div element as [CODE] <div id="div1" class="divStyle" style="visibility:hidden;"> [/CODE] hope this helps ![]() | |
Re: Since the input element is not having any id, document.getElementById() wont work except in IE. You can use document.getElementsByName() which returns an array of elements of the given name. For e.g. if the input element with name 'WebGridBuilder$ctl04$ctl01' is the first element of that name than you can do something … | |
Re: At the given link [url]http://raibledesigns.com/rd/page/publications[/url] check for the articles 1]Comparing JSF, Spring MVC, Stripes, Struts 2, Tapestry and Wicket 2]Comparing Flex, Grails, GWT, Seam, Struts 2 and Wicket Thought they are outdated (of 2007) and each framework might have come up with enhancements, you can still use it as a … | |
Re: Since you are displaying list with [CODE] ... <td><input type=text id=qty value=0></td> ... [/CODE] All the rows will have a text element with id=qty. Same for price and total. As per the specs the id of elements must be unique. Also getElementById() will always fetch the first element with the … | |
Re: The problem is at line 17 [CODE] document.cookie[0]= "name = "+name+ " mark = "+mark; [/CODE] To store a cookie you will have to use document.cookie and not document.cookie[0] i.e. use [CODE] document.cookie= "name = "+name+ " mark = "+mark; [/CODE] If you want to have multiple names you can … | |
Re: I dont think this will be possible. Whenever you right click on a link and try to open it in new tab/window it will open with the value set to the 'href' attribute | |
Re: This is because your method signatures are static char bookseat(char array1[][]) static char reset(char array1[][]) i.e. the methods should return a variable of type 'char' but you are returning array1 which is of type 'char[][]' | |
Re: I think the image is not displayed because the image should be in <img> tag with 'src' attribute set to the image read from the database A nice tutorial at this location might help you [url]http://fdegrelle.over-blog.com/article-992927.html[/url] | |
Re: Instead of submitting form in the modal window what you can do is have a hidden element in the index.php file. Than on clicking the button in the modal window set the value in the textbox to this parent window's hidden element and than submit the parent window's form index.php … | |
Re: First of all I would suggest that you should not change 3rd party jar files as its difficult to gauge the side effects of the change. The class SharedByteArrayInputStream is part of the package javax.mail.util from javamail 1.4 There might be some other jar file in the classpath (like j2ee.jar, … | |
Re: I think the exception is caused because for each execution of the program a new private key is generated which is than used for decryption. Since decryption requires the private key it must be the same that was generated when encryption process Try this. Save the private key that was … | |
Re: Follow the points mentioned by JamesCherrill By the way your call to method FindMin is [CODE] FindMin(int[] a); [/CODE] You do not make method call with the type specifiers. Just pass the parameters to the method like, [CODE] FindMin(a); [/CODE] | |
Re: Consider that on click of a button you are calling a function that does the AJAX calls and other stuff. You can add more parameters to that function which can be ids of the elements to be validated and in onreadystatechange function process using this ids with e.g. document.getElementById(sTestId).value=""; or … | |
Re: You are having no code in the main method. The JVM is just executing the main method but nothing else. [CODE] ......... public static void main(String[] args){ } ........... [/CODE] If you want to call any method on the TicTacToe3 object you will first have to instantiate it and than … | |
Re: First there is problem in the line [CODE] var answerField = document.getElementById( "answer" ); [/CODE] You are trying to access an element with id="answer". But there is no such element on the html page. Second I would suggest you to rethink your algorithm used in the method guessANum() You might … | |
Re: You will need to pass the value of subject to show.jsp One approach could be to modify the sendData() function as shown below [CODE] function sendData(){ var sch=document.form.school.value; var cla=document.form.class_name.value; var y1=document.form.from_year.value; var y2=document.form.to_year.value; var sub="AllSubject"; //set to all subjects by default //Now check if the combo is visible. If … | |
Re: For PermGenSpace error try setting the parameters [CODE] -XX:PermSize and -XX:MaxPermSize e.g. -XX:PermSize=256m -XX:MaxPermSize=512m [/CODE] | |
Re: It is not possible you cannot control browser buttons from JSP/Javascript | |
Re: Try this code snippet, it uses the constructors and methods of the BigInteger class, [CODE] public static BigInteger pow (String strX, String strN) { BigInteger x = new BigInteger(strX); BigInteger n = new BigInteger(strN); BigInteger BigZero = new BigInteger("0"); BigInteger BigTwo = new BigInteger("2"); if (n.equals(BigZero)) return new BigInteger("1"); BigInteger … | |
Re: As per the documentation for the script at the location [url]http://www.saxobank.com/?id=660&Lan=EN&Au=1&Grp=5[/url] the maximal list of headers is 'Bid|Ask|High|Low|Pct|Net|Time'. So it seems that addition of a new column wont be possible Contact the corresponding script provider for further help in this regard | |
Re: The statement that you have given above will write the while on the server. If you want to have a option for the client to save the file than you will have to send the file on the server through the servlet response. [CODE] //First set HttpServletResponse response to tell … | |
Re: Resizing the alert and confirm dialog box is not possible but you can always create your own or use from some existing javascript frameworks e.g. You can create a resizable modal dialog box using jquery see the demo link [url]http://jqueryui.com/demos/dialog/#default[/url] | |
Re: To change the look and feel of the countdown apply the style to the <h1> element and not the <span> because this is where the countdown text is written Remove the style from the <span> tag and change [CODE] <h1 align="center"> [/CODE] to [CODE] <h1 align="center" style="font-size: 14px; font-family: Arial, … | |
Re: The flow seems fine. To read the echoed $reply in the js use the 'onreadystatechange' event of the xmlhttp object. Following code snippet in call4section.js will display the reponse text echoed in an alert box. You can process it as you wish [CODE] ......... xmlhttp.open("GET",url,true); xmlhttp.onreadystatechange = function() { if … | |
Re: Actually Javascript and JSP are completely different things. JSP is a server side language to generate dynamic content. It consists of java code in scriptlets and the web server containing the servlet-container on receiving a request translates and compiles the jsp pages and sends the generated HTML to the browser … | |
Re: In the javascript you have used getElementById() function as [CODE] document.getElementById("change") [/CODE] But the input text element is having only 'name' attribute and no 'id' attribute [CODE] <input type="text" name="change" value=0 size="10" style="font-size:12pt;" onkeyup="IsValid('change')"> [/CODE] If the id attribute is not present than getElementById() in IE uses the name attribute … | |
Re: If the .xhtml file containing the graphicImage component is in \WebContent folder than use [CODE] <h:graphicImage id="image1" value="Img/flow2.jpg" width="120" height="80" ></h:graphicImage> [/CODE] I cant see any other issue from the information you have given. | |
Re: 1] You are getting errors in validation because there are syntax errors in the code snippet. Be careful to close brackets and quotation marks in the code. There is '}' missing after 'return returnValue;' in the javascript function. Also in the line [CODE] <input type="password" name="txtUserName id="txtPassword" size="12" /> [/CODE] … | |
Re: Though this may not be the best solution, you can also achieve it as follows, [CODE]import java.util.*; class Word { private String whatWord; private int howMany; public Word(String whatWord, int howMany){ this.whatWord = whatWord; this. howMany= howMany; } public String getWhatWord() { return whatWord; } public void setWhatWord(String whatWord) { … | |
Re: There is no such command for it. You have to use Javascript and CSS to give the tree like look and feel. There are lots of readymade scripts available - both free as well as commercial ones. Just google with something like "explorer tree in javascript" | |
![]() | Re: The use of out.println() adds a newline character causing erroneous syntax of the generated output. The generated html is, [CODE] <img src="Images/Bookings.png" id="bookings0 " onmouseover="changeOn('bookingsButton','bookings0 ')" onmouseout="changeOff('bookingsButton','bookings0 ')"/> [/CODE] There is a newline character after bookings0 Use out.print() instead. Which will generate html like, [CODE] <img src="Images/Bookings.png" id="bookings0" onmouseover="changeOn('bookingsButton','bookings0')" onmouseout="changeOff('bookingsButton','bookings0')"/> … ![]() |
Re: The kind of look is called accordion layout and in the given link it is achieved using javascript You can find an example at the following link [url]http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm[/url] | |
Re: From the error it seems that [CODE] document.getElementById('email').value [/CODE] is failing. Please check if there is any missing element with id="email" in the code | |
Re: Use the onSubmit attribute in the <form> element e.g. [CODE] <form id="form1" name="form1" method="post" action="sendform.php" onSubmit="return validateForm()"> [/CODE] Now add you validation code in the js function validateForm() and return true or false. If true is returned than the form is submitted, if false is returned than the form is … | |
Re: Sometime ago had seen an example given below on some other forum. See if this can lead you to any solution [CODE] <head> <script language="JavaScript"> function iFrameHeight() { if(document.getElementById && !(document.all)) { h = document.getElementById('iframename').contentDocument.body.scrollHeight; document.getElementById('iframename').style.height = h; } else if(document.all) { h = document.frames('iframename').document.body.scrollHeight; document.all.iframename.style.height = h; } } … | |
Re: If you cant use global javascript variables than how about using a input element of type hidden. Something like [CODE] <input type ="hidden" name ="firstvalue" id="firstvalue" value=""/> <input type ="hidden" name ="operator" id="operator" value=""/> [/CODE] So when you click on any operator like '+' than you can store the screen … | |
Re: The GET method in AJAX has the same limitations of length as that of normal GET request i.e 255 characters. If you have to send large data you can always use the POST method in AJAX. Some tutorials for POST method in AJAX can be found at [url]http://www.openjs.com/articles/ajax_xmlhttp_using_post.php[/url] [url]http://www.javascriptkit.com/dhtmltutors/ajaxgetpost2.shtml[/url] | |
Re: Regarding first issue - The alert is always displayed as it is not within any condition. Adding some condition checking like the one given below can solve the issue, [CODE] function checkRadio (frmName, rbGroupName) { var queSelected = false; var radios = document[frmName].elements[rbGroupName]; for (var i=0; i <radios.length; i++) { … | |
Re: IE always creates the <tbody> in the DOM while rendering whether you have it in the code or not. So have the <tbody> tag in the html code itself like [CODE] .... <table id="tbl"> <tbody id="tblBody"> </tbody> <div id="xtra" style="display:none; visibility:hidden"> .... [/CODE] This way you will not require … | |
Re: The links in the tabs has the attribute href="#" which is causing it to go to the top of the page. Point the href to some element's id e.g. <a href="#tab-bequest" class="tablink active" id="tab-bequest" title="content-bequest"> Here the href is pointing to itself. | |
Re: Hope these points helps you 1] There is nothing wrong with the formatter. It is only formatting the output for the value in 'balance'. Check whether the formula for calculating balance is correct or not 2] For the part [CODE] //How do I step into this Loop? while ( repeat … | |
Re: You must use the transformer to save the updated DOM tree back to the file. The sample code is, [CODE] FileOutputStream myFileIO = new FileOutputStream(new File("C:\\Documents and Settings\\Administrator.APC-CT2\\Desktop\\lodewyk.xml")); TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(myFileIO); transformer.transform(source, result); myFileIO.close(); [/CODE] … |
The End.