Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

How to Prepare for interview of PHP developer?

As we have received many requests for writing article for How to Prepare for interview of PHP developer?

We can not give complete guidance in one article here but we will try to give enough information regarding How to Prepare for interview of PHP developer.




To become PHP developer means to get a job as a PHP developer or PHP programmer or Web Developer you must have at least bachelor degree. Many companies prefer the Qualification criteria as:
BCA, BSC-IT, BSC-Computers, MCA, MCM, BE-IT.

If you are not having any of the above degree but you are having enough practical knowledge of PHP then some of the small companies can hire you as a PHP Developer.

Coming to the preparation for the PHP Developer Job  ( How to get a job as PHP Developer )
 First and most important part is Build your Resume properly. Resume is the entry point for you. If your Resume is not good then you may loss the opportunity to enter into IT industry.

So, what means Good Resume?
Here we provide Best Resume Tips for Freshers.
Please go through the following links to build a best Resume:
Resume Tips For Freshers - 1

Resume Tips For Freshers - 2

Next, Prepare for PHP Interview Questions.
You must have basic knowledge of all the basic concepts of PHP.




Here I am providing some of them:

What is WAMP / XAMPP?

PHP Variables - 1
PHP Variables - 2

GET method and POST method in PHP

How to Include File in PHP

Arrays in PHP

Types of array in PHP

Array functions in PHP

For Loop in PHP with Example

Errors in PHP, Types of Errors in PHP

String Functions in PHP

Form attributes

How to upload file in PHP?

File Operations in PHP?

Session and Cookies in PHP

Difference between unlink and unset in PHP

How to send mail using PHP?

explode function in php

MySQL functions to create connection, insert , update, delete.

Database connection using PHP MySqli


Basic Concepts of Javascript

Basic PHP programs in PHP:
PHP program to check whether the given number is palindrome or not
PHP program to check whether the given number is prime or not

Here we are providing all PHP Interview Questions with Answers
PHP Interview Questions with Answers
All PHP Interview Questions with Answers
Important PHP Interview Questions with Answers

Here we are providing some important HR interview questions with Answers:
Tell me about Yourself
How long would you stay with us? HR Interview Question


In this way we have tried our best to give you a guidance regarding How to Preppare for interview of PHP developer.

We will be writing most important content on this blog for BCA Freshers and MCA freshers regarding Resume Tips, Interview Questions, Technical Concepts explanation with very easy language.




Share this Post with your Friends.
Help people, people will help you!

Related Post - Top PHP frameworks used for Web Development

How to Go Back Page using Javascript


If You want to go on previous page on button click then following information will help you:

What you need to do is just write the code: 

javascript:window.history.back();

on OnClick event of HTML button.


<html>
<body>

<button onclick="javascript:window.history.back();">Go Back</button>

</body>
</html>

This is the same as clicking the "Back button" in your browser
The back() method loads the previous URL in the history list.

Almost all browsers support this code.







How to make Radio Button Checked By Default?




This small article will explain you,about, Assign an initial value to radio button as checked.

code:
<input type="radio" name="r1"  value=""  /> male
<input type="radio" name="r1"  value=""  /> female

now with using above code two radio buttons get created.
(By default no one is selected)

Now, we are going to code for By default set as checked.

See Code:

<input type="radio" name="r1"  value="" checked /> male
<input type="radio" name="r1"  value=""  /> female


Now result of this code is: By default "male" radio button is checked.

Thats All.

How to submit form using Javascript?




If HTML form have the attributes method="post" and action="someprocess.php", and in the form if there is button like,
<input type="submit" value="submit"> , then form will get submitted on that button click.

But if we want to submit the form on any link i.e <a>  tag or any event other than submit button, then we have to use javascript.

How ?
 See,
Here is the code to submit a form when a hyperlink is clicked:

<form name="myform" action="process.php">
Text Field: <input type='text' name='text1' />
<a href="javascript: submitform()">Search</a>
</form>

<script type="text/javascript">
function submitform()
{
  document.myform.submit();
}
</script>


Javascript submit is same as HTML submit.
You can submit form on events like: onChange, onClick,....etc.

I think its enough to understand the concept.

I would like to hear from you...!!!


Multi-line alert in Javascript

How do you put in a new line into a JavaScript alert box?

Answer:

alert("Hello again! This is how we" +"\\n" +"add line breaks to an alert box!");



How to print particular Div using Javascript






While working in a web page, we were required to print only one section (say a div content) of a page.
There is a single line Javascript code to do printing:

"window.print();"

However, this function would print the whole page content, which is not what we want.


Solution:-
Example:
<!-- HTML CODE-->

<html><head><title>print</title> </head><body>


<div id="divPrint">

    <h1>This is content to print</h1>

</div>
<a onClick="javascript:printDiv()">Print</a>


<div id="notPrint">

    <h1>No need to print</h1>
</div>


   
</body></html>


<!--END HTML CODE-->


<!--javascript code to print perticular div-->


<script>

function printDiv()
        {
            var divElements = document.getElementById('divPrint').innerHTML;
                    var oldPage = document.body.innerHTML;

                    document.body.innerHTML ="<html><head><title>print</title> </head><body>"+divElements+"</body></html>" ;

                    window.print();

                    document.body.innerHTML = oldPage;

            }
</script>

<!-- END javascript code to print perticular div-->






Explaination:

<a onClick="javascript:printDiv()">Print</a>
when we click on Print link (hyperlink) javascript printDiv function will called and print window will opened.

printDiv() :
Use this function where ever you want the function to print the part of the page.

var divElements:
In this example, divElements, oldPage are variables.
JavaScript variables are containers for storing data values.

getElementById():
The getElementById() method returns the element that has the ID attribute with the specified value.
This method is one of the most common methods in the HTML DOM, and is used almost every time you want to manipulate, or get info from, an element on your document.
Returns null if no elements with the specified ID exists.


innerHTML:
The innerHTML property sets or returns the HTML content (inner HTML) of an element.
An ID should be unique within a page. However, if more than one element with the specified ID exists, the getElementById() method returns the first element in the source code.

window.print():
Prints the current page.
The print() method prints the contents of the current window.
The print() method opens the Print Dialog Box, which lets the user to select preferred printing options.





JavaScript

JavaScript is:-

-a lightweight, interpreted programming language
-Designed for creating network-centric applications
-Complementary to and integrated with Java
-Complementary to and integrated with HTML
-Open and cross-platform

Advantages of JavaScript:-

-Less server interaction: You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
-Immediate feedback to the visitors: They don't have to wait for a page reload to see if they have forgotten to enter something.


JavaScript Syntax:-
A JavaScript consists of JavaScript statements that are placed within the <script>... </script> HTML tags in a web page.

Your First JavaScript Script:-
Let us write our class example to print out "Hello World".

<html>
<body>
<script language="javascript" type="text/javascript">
   document.write("Hello World!")
</script>
</body>
</html>


The script tag takes two important attributes:

language: This attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.

type: This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript".
we call a function document.write which writes a string into our HTML document. This function can be used to write text, HTML, or both. So above code will display following result:

Hello World!










How to disable F12 key in Browser?




When user press F12 key, browsers developer tool bar will open in the below portion of the browser. By using the developer tool bar user can see the design, javascript code and corresponding css applied to the controls in the page. To prevent the user to do that we will hide the developer tool bar.

You can use the below code to do that. 

Write the below code in the head section of the page.

<script type="text/javascript">

document.onkeydown = function (event)
{
     event = (event || window.event);
     if (event.keyCode == 123 || event.keyCode == 18)
     {
           alert("This function is disabled here");
           return false;
     }
}
</script>

In this way you can disable F12 key using the above javascript code.

Also Read: 

Latest Interview questions with Answers - Javascript


If you are Technology Lover and want to know more about Tech Trends then please visit - TechnoVans.com