November 23, 2013

How to Disable Mouse Right Click on a Web page using JavaScript

Sometimes web page owners want to protect data such as Text and Images to be copied by others and sometimes it is about the link on the page that must be operate on same page by clicking mouse left button because of these reasons web page owners put a JavaScript code in their web pages to disable mouse Right click.

So if you want to perform same task then just copy paste below code inside your web page's <head> tag.

 <script type="text/JavaScript">  
 var message="Right-click has been Disabled";  
 function clickIE() {  
      if (document.all) {(message);return false;}}  
 function clickNS(e) {  
      if(document.layers||(document.getElementById&&!document.all)) {  
                if (e.which==2||e.which==3) {(message);return false;}}}  
      if (document.layers)  
                     { document.captureEvents(Event.MOUSEDOWN);  
      else{ document.onmouseup=clickNS;  
 document.oncontextmenu=new Function("return false")  

When somebody will come to your web page and will click on page by mouse right button then a message will pop-up "Right Click has been Disabled".

November 5, 2013

How to show textbox value on message box with Jquery on button click

Here, we are working with textbox, button and pop up message box where we are showing textbox value in message box on same page on search button click using jquery.

put this script inside <head> tag
put this code inside <body> tag


Also Read : Jquery : Show label value on alert and browser console

How to work with History Back Button with JavaScript

In this tutorial we are working with Back Button same as History Back button of  Internet Browsers(eg. Internet Explorer, Mozilla Firefox etc.)

To understand this phenomena take an example that if you have made a search on a page(index.jsp) and you have to moved on another page(some_other_page.jsp) but you want to see previous search again then you have to back through Internet Browser Back button but you can add similar back action by coding which i am try to explain by this example with code.


script inside <head> tag

 back button code on same page inside <body> tag

March 10, 2013

Error! Problem in linking css file in jsp in Dynamic web Project with eclipse

When we have to link our css file that exists in css folder during dynamic web project in eclipse it shows problem regarding image loading or other linking problem.

Project Structure
If your project is in above structure then to solve out this problem you must specify your project name in link of css file like as below

February 26, 2013

Error in handling images and css folder with jsp page in eclipse

If you are creating a dynamic web project and you are not able to use css folder files and image files in your jsp page then you need to read below code.

Project folder structure

Linking css file internally from folder to jsp page

Linking image to jsp page from images folder

January 28, 2013

Error:Foreign Key constraints using Visual Studio with SQL Server Database

when you try to save dbo.Table2 after entry in Table2 it will show ERROR given below:

'Table1' table saved successfully
'Table2' table
- Unable to create relationship 'FK_Table2_Table1'.  
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Table2_Table1". The conflict occurred in database "~\FOREIGNKEY\APP_DATA\DATABASE.MDF", table "dbo.Table1", column 'Id'.

press ctrl+s and save dbo.Table2 first then do the data Entry in Table 2.
If you do entry in Table2 without saving it. then it will not follow Foreign Key constraints.

Error: Starting Tomcat v6.0 server at localhost has encountered a problem in eclipse

Port 8080 required by Tomcat v6.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

If Port 8080 is already in use then use another port in place of port 8080.
Double click on Tomcat Server at localhost
Next Screen is following and port in red circle is the port that is already in use.

We only need to change this port 8080 to any other valid port which is not in use by other process.

Screen after changing port 8080 to port 8081
Press Ctrl+s to Save the changes made by you and then right click over Tomcat Server and click start.

Error Project facet Java version 1.6 or 1.7 is not supported in eclipse

It can be that java 1.7 is not installed in your system then you can use java version that is already installed in your system.Following Steps could resolve this error by setting up current version in project facet

1: Right Click over your Project on Project Explorer and click on Properties.

2: Goto java build path->Libraries
 Check JRE System Library Jars and also check it is JDK 1.6 or 1.7

3: Goto Project Facet and select your current java version available.

click apply then ok

Please Comment Thanks to us if this topic is helpful :)

Error,account is locked,Warning you no longer connected to Oracle,Problem when connecting to HR account in Oracle database

Following are the Steps that how we can unlock any Database User Account(eg. HR).
Before Unlocking any user account that user must be in the Database and must be Locked and to unlock that user you need DBA(Database Administrator) Privileges that's why I firstly connected as SYSDBA.

Press win+R( For Run) and type cmd then ok.then you need to write SQLPLUS/NOLOG as shown below to reach SQL Command Line.
you can directly go to SQL Command Line
Start-> All programs-> Oracle 10g Express Edition -> Run SQL Command Line
Why we need to Unlock HR User:
When you try to work(eg. create table) with HR User First Time then you wouldn't be able to connect HR User because by default it remains Locked that's why we need to unlock it.

you can also see this error while connecting to HR Locked Account.
"Error,account is locked,Warning, you no longer connected to Oracle"
 Error,account is locked  
 warning,you no longer connected to oracle  
 user altered  
 user altered  
 user altered  

Microsoft JScript runtime error: Out of stack space

when you see this error then please check again your java script code because this is a javascript error, and it's usually happens when an recursive method called. 
That caused JavaScript to perform the unwanted Recursion. 

The stack is a working area of memory that grows and shrinks dynamically with the demands of your executing program. Its limits have been exceeded.

To correct this error(for Visual Basic)

  1. Check that procedures are not nested too deeply.
  2. Make sure recursive procedures terminate properly.
  3. If local variables require more local variable space than is available, try declaring some variables at the module level. You can also declare all variables in the procedure static by preceding the Property, Sub, or Function keyword with Static. Or you can use the Static statement to declare individual static variables within procedures.
  4. Redefine some of your fixed-length strings as variable-length strings, as fixed-length strings use more stack space than variable-length strings. You can also define the string at module level where it requires no stack space.
  5. Check the number of nested DoEvents function calls, by using the Calls dialog box to view which procedures are active on the stack.
  6. Make sure you did not cause an "event cascade" by triggering an event that calls an event procedure already on the stack. An event cascade is similar to an unterminated recursive procedure call, but it is less obvious, since the call is made by Visual Basic rather than an explicit call in the code. Use the Calls dialog box to view which procedures are active on the stack.


We shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its response or damage to your system. We do not guarantee that the integrity or security of this communication has been maintained or that this communication is free of viruses, interceptions or interferences. Anyone communicating with us by email accepts the risks involved and their consequences. We accept no liability for any damage caused by any virus transmitted by this site.