- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 17
- Posts with Upvotes
- 17
- Upvoting Members
- 16
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
247 Posted Topics
Re: I am new to jsp but I would do either one of the following: 1. Set the username as a session variable and then in welcome.jsp u can use [QUOTE]<%=session.getAttribute("userName")%>[/QUOTE] 2. Send the username in the querystring when redirecting to the welcome page then just use [QUOTE]request.getParameter("userName")[/QUOTE] to display it. | |
Re: You need to put the name of the form so change the form tag to include name="quiz" like this: [CODE]<form name="quiz" action="javascript:finish();" enctype="application/x-www-form-urlencoded" method="get">[/CODE] | |
![]() | Re: I dont know much about php, but first change the submit button to a normal button [CODE]<input type="button" name="submit" VALUE="Submit" onclick="sendInfo()">[/CODE]and use the onclick property to call your ajax function, there are many examples of a simple ajax function on the internet. |
Re: Daughtry - Leave this town (album) Eminem - Relapse Sergio Mendes | |
Re: [CODE]<c:redirect url="http:www.someurl.com" />[/CODE] | |
Re: well u can submit a form from the onclick event on a button element. with the form action being the file name or serlvet, or u could have a struts action, i would go with the struts action. | |
Re: i have used none and single quotes and it works in both IE and firefox like this [code] var el = document.getElementById(obj); var butId = document.getElementById(buttonId); if ( el.style.display != 'none' ) { el.style.display = 'none'; butId.value='Show Filter'; document.getElementById("FilterResultsList").style.display = ''; }else { el.style.display = ''; butId.value='Hide Filter'; document.getElementById("FilterResultsList").style.display = … | |
Re: I dont know much about php, but I do know that you can only insert data into a database using a server side language, so you are going to have to edit your php page. | |
Re: Not sure if i m understanding u correctly but u just need to have a space " " between the quotes | |
Re: Try using setAttribute in the servlet, and then getAttribute in the jsp page. I am new to jsp and servlets as well, and i think(i could be wrong) that getParameter is normally used when getting the parameter from the url. If your url is: ...?maxvalue=5, using getParameter will display 5. | |
Re: can u provide an example of what you are doing to call this function, it could be something in your html that is causing the error, also please use code tags, makes it easier to read code. | |
Re: You are calling the function incorrectly, you should call it like this: [CODE]<input type="text" id="test" style="visibility:hidden" /> <input type="text" id="test2" onclick="myFunction('test')" />[/CODE] take note of the single quotes on the id sent into the myfunction function | |
Re: You can look in the code to see where he is writing stuff to, it should say somewhere in the code what tables he is sending information to and also what fields to populate. | |
Re: [CODE]window.open("www.google.com", "_parent")[/CODE] will make the page open in the same window. so according to your code this should work : [CODE]winslide=window.open(slidelinks[whichlink], "_parent")[/CODE] You have said u have tried, it, so from the code that u have provided i cant see what could be wrong, please provide the full html as … | |
Re: Do you want someone to code that for you? or are you stuck somewhere trying to put your plans into action? | |
Re: I tried your code out and am able to return a string which has the name and the value of the textarea field, could you provide your html, maybe something is wrong in their. | |
Re: I dont understand what is going wrong with the tabs, for me the exact code works fine, perhaps u should include the code you are using, maybe it is some style in your own code that is causing the page to jump | |
Re: Really simple error. what was happening was that your variable was never set to 10 because the function was never called. In your addfunction function change this: [CODE]myButton.onclick = addRadio;[/CODE] to [CODE]myButton.onclick = addRadio();[/CODE] | |
Re: ensure that the element that u are referring to has loaded before the "focusFunction" function is called | |
Re: do u want to validate the input field, or the actual file?, that is, did the user upload a file or just type in some random crap into the field? | |
Re: Yes this is doable using javascript, add an id parameter to the drop downs then on the javascript function call the id's, there are loads of examples to disable and enable an element on the internet to help u along as well. you can also look into using jquery, makes … | |
Re: Have u tried accessing the script directly in the browser, by calling the file in the browser? cause sometimes you are just not accessing the file, the location of the file could be incorrect. maybe it is another level up, also ensure that the file is saved the same way … | |
Re: Yip that looks like jsp/java. I dont understand why you have a method name as a value for a string, it would be much simpler for u to do: [CODE]String s="he is a good boy"; out.println("<input type=text value='"+ s + "' name=s>");[/CODE] if you wanted the words good boy to … | |
Re: There is no such thing as [CODE]<input type="image" ...>[/CODE] Change entire tag to and <img> tag something like this:[CODE]<img src="/button.gif" onclick="displaySomething('stuffToShow', 'aForm')">[/CODE] | |
Re: I dont have one, but try google, there are loads of examples out there. You can search for "sroll images script" or "image slideshow" | |
Re: Please provide some code or login details, I dont want to register just to see your error. | |
Re: Have u tried placing the site in the safe sites list, that message is standard from IE. | |
Re: One cant use client side code to get the server side code, if u try printing out the userId it should be there. what u can do is assign the userId to a hidden field then alert the value of the hidden field. | |
Re: how about putting that array in a form and submitting the form. | |
Re: check that your class is in the WEB-INF/classes folder. | |
Re: Using jquery u can do it like this: [CODE] <p id="email" >some text</p> <button id="but1" name="Collapse" value="Collapse">Collapse</button> <script type="text/javascript"> $(document).ready(function() { $("#but1").click(function(){ $("#email").slideToggle("slow", function(){ $("#but1").html($(this).is(":hidden") ? "Expand" : "Collapse"); }); }); }); </script> [/CODE] | |
Re: Can you provide the code that you are using please. | |
Re: i dont think it can be cancelled, just mark it as solved. ![]() | |
Re: where is your form submitting to, it could be that when the form submits, the element is no longer on the page or not in the same place as it is before it is submitted there it is being set to the top of the page. could u include your … | |
Re: since it is ajax, u should be able to just call the original page, the one that doesn't have any values. | |
Re: Just by reading the code I noticed that you are calling this function "GoNext()" but nowhere in the code is there such a function. Another thing you don't need to use the "javascript:" anymore, the browser will know it is a javascript function that you are referring to. | |
| |
Re: There are loads of examples on the net, google will show you the way. here is a [URL="http://cristian.nexcess.net/ajax/suggest/"]link[/URL] i found | |
Re: Why would u want to disable to back button? U can read this [URL="http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911"]http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911[/URL] | |
Hi I bought a new laptop which came with windows 7 pre-installed. I am supposed to have a 500GB HDD space, but when i view "Computer" which also displays the available size, it says i have 11GB of 40 GB left! but i have a 500GB hard drive. when i … | |
Re: this question has been asked here many times. if you do a search on this site you will definitely come across more references, here is one though, [URL="http://www.w3schools.com/Ajax/default.asp"]w3schools[/URL] | |
Re: First you have to supply the problem then we will help with a solution. We will not however complete your homework for you | |
Re: NoclassDefError, normally stems from not being able to find the class, in your case TagLibraryValidator Ensure that this class is in the lib directory of your application | |
Re: I think it is better that you give all the fields unique id's. If the fields are not going to change and not increase at any time, then you could just do a basic if else statement. If the fields are going to increase then just loop through them, first … | |
Re: You can have a look at [URL="http://www.freeaspupload.net"]freeaspupload[/URL] or [URL="http://www.webreference.com/dev/upload/index.html"]webreference.com[/URL] | |
Re: I dont know PHP, but what u can do is alert the variables before u put them inside the url variable. Also i think your ajax code is incorrect, this [CODE]request.onreadystatechange = parseResponse(request);[/CODE] should be:[CODE]request.onreadystatechange = parseResponse;[/CODE] You dont need to send the request variable to that function. also the … | |
Re: they could just be redirecting you to another page without changing the url, or they could just be using ajax, but replacing the entire pages innerhtml. | |
Re: the problem could be with the id that u are sending to the onclick function, but without seeing any code, its hard to say that is the problem. | |
Re: if you have given your td tags unique id's u can use the innerHTML attribute to get the values. Some code will be helpful so that we better understand what you are working with. |
The End.