الخميس، 5 ديسمبر 2013


1. Java was developed by the company

A) Sun Micro systems
Image representing Sun Microsystems as depicte...
Sun Micro systems Image CrunchBase

B) Microsoft

C) Micro tech

D) IBM



2. What is the file extension of compiled java program?

A) .class

B) .java

C) .css

D) .html



3. .................. keyword is used to invoke the current object.

A) New

B) That

C) This

D) Me



4. Which of the function is used to convert string to Number in java program?

A) to Number()

B) conString()

C) valueOf()

D) toString()


5. What are the part in executing a Java program and their purposes?

A) Java Compiler

B) Java Interpreter

C) Java Pre-processor

D) Directive Pre-processor


6. Method overloading is one of the way that Java supports ............

A) encapsulation

B) class

C) inheritence

D) polymorphism


7. Java support RMI. What does this RMI stands for?

A) Random Memory Interface

B) Remote Method Invocation

C) Random Method Invocation

D) Remote Memory Interface


8. Which of the following represent legal flow control statements?

A) break;

B) break();

C) continue(inner);

D) exit();


9. The keywords reserved but used in the initial version of Java are

A) union

B) const

C) inner

D) goto


10. What is the default return type of main() ..

A) void

B) double

C) float

D) int



Answers:



1. Java was developed by the company

A) Sun Micro systems

2. What is the file extension of compiled java program?

A) .class

3. .................. keyword is used to invoke the current object.

C) This

4. Which of the function is used to convert string to Number in java program?

C) valueOf()

5. What are the part in executing a Java program and their purposes?

A) Java Compiler

6. Method overloading is one of the way that Java supports ............

D) polymorphism

7. Java support RMI. What does this RMI stands for?

B) Remote Method Invocation

8. Which of the following represent legal flow control statements?

A) break;

9. The keywords reserved but used in the initial version of Java are

A) union

10. What is the default return type of main() ..

D) int


Related Posts


Java MCQ Interview Questions With Answers set-10

Posted at  9:25 م - by mego almasry 0


1. Java was developed by the company

A) Sun Micro systems
Image representing Sun Microsystems as depicte...
Sun Micro systems Image CrunchBase

B) Microsoft

C) Micro tech

D) IBM



2. What is the file extension of compiled java program?

A) .class

B) .java

C) .css

D) .html



3. .................. keyword is used to invoke the current object.

A) New

B) That

C) This

D) Me



4. Which of the function is used to convert string to Number in java program?

A) to Number()

B) conString()

C) valueOf()

D) toString()


5. What are the part in executing a Java program and their purposes?

A) Java Compiler

B) Java Interpreter

C) Java Pre-processor

D) Directive Pre-processor


6. Method overloading is one of the way that Java supports ............

A) encapsulation

B) class

C) inheritence

D) polymorphism


7. Java support RMI. What does this RMI stands for?

A) Random Memory Interface

B) Remote Method Invocation

C) Random Method Invocation

D) Remote Memory Interface


8. Which of the following represent legal flow control statements?

A) break;

B) break();

C) continue(inner);

D) exit();


9. The keywords reserved but used in the initial version of Java are

A) union

B) const

C) inner

D) goto


10. What is the default return type of main() ..

A) void

B) double

C) float

D) int



Answers:



1. Java was developed by the company

A) Sun Micro systems

2. What is the file extension of compiled java program?

A) .class

3. .................. keyword is used to invoke the current object.

C) This

4. Which of the function is used to convert string to Number in java program?

C) valueOf()

5. What are the part in executing a Java program and their purposes?

A) Java Compiler

6. Method overloading is one of the way that Java supports ............

D) polymorphism

7. Java support RMI. What does this RMI stands for?

B) Remote Method Invocation

8. Which of the following represent legal flow control statements?

A) break;

9. The keywords reserved but used in the initial version of Java are

A) union

10. What is the default return type of main() ..

D) int


Related Posts


الأربعاء، 4 ديسمبر 2013


1. In java a ....................... is a sequence of characters.

Java Objective Questions with Answers
Schema of the general architecture of a program running in a Java Virtual Machine (Photo credit: Wikipedia)

A) string

B) arrayChar

C) groupChar

D) collection



2. Java programs perform I/O through ...........

A) I/O methods

B) I/O package

C) streams

D) compiler



3. What is byte code in the context of Java?

A) The type of code generated by a Java compiler

B) The type of code generated by a Java Virtual Machine

C) It is another name for Java source file

D) It is the code written within the instance methods of a class



4. Which of the following statements about abstract methods/classes in Java is true?

A) An abstract class cannot be instantiated.

B) Constructors can be abstract.

C) A subclass of an abstract class must defined the abstract methods.

D) Static methods may be declared abstract.



5. Which of the following statement is false?

A) The sleep() method should be enclosed in try ......... catch block

B) The yield() method should be enclosed in try ......... catch block.

C) A thread can be temporarily suspended from running by using the wait() method.

D) A suspended thread using suspend() method can be revived using the resume() method.



6. The new operator dynamically allocates ..............for an object and returns a reference to it.

A) classes

B) variables

C) memory

D) none of the above



7. Which of the following statements correctly describes an interface?

A) It's a concrete class

B) It's a super class

C) It's a type of abstract class

D) It's a subclass



8. What is the priority of the Garbage collector thread of jdk?

A) Low Priority

B) Highest Priority

C) Medium Priority

D) Decided at run time



9. ................ is a feature that allows one interface to be used for a general class of actions.

A) Class

B) Inheritance

C) Polymorphism

D) Interface



10. The default package that is implicitly called in a java program is .............

A) java.Lang

B) java.System

C) java.Window

D) java.Lang.System



Answers:



1. In java a ....................... is a sequence of characters.

B) arrayChar

2. Java programs perform I/O through ...........

C) streams

3. What is byte code in the context of Java?

A) The type of code generated by a Java compiler

4. Which of the following statements about abstract methods/classes in Java is true?

A) An abstract class cannot be instantiated.

5. Which of the following statement is false?

B) The yield() method should be enclosed in try ......... catch block.

6. The new operator dynamically allocates ..............for an object and returns a reference to it.

C) memory

7. Which of the following statements correctly describes an interface?

C) It's a type of abstract class

8. What is the priority of the Garbage collector thread of jdk?

A) Low Priority

9. ................ is a feature that allows one interface to be used for a general class of actions.

C) Polymorphism

10. The default package that is implicitly called in a java program is .............

A) java.Lang



Related Posts


Java Objective Questions with Answers set-9

Posted at  11:55 م - by mego almasry 0


1. In java a ....................... is a sequence of characters.

Java Objective Questions with Answers
Schema of the general architecture of a program running in a Java Virtual Machine (Photo credit: Wikipedia)

A) string

B) arrayChar

C) groupChar

D) collection



2. Java programs perform I/O through ...........

A) I/O methods

B) I/O package

C) streams

D) compiler



3. What is byte code in the context of Java?

A) The type of code generated by a Java compiler

B) The type of code generated by a Java Virtual Machine

C) It is another name for Java source file

D) It is the code written within the instance methods of a class



4. Which of the following statements about abstract methods/classes in Java is true?

A) An abstract class cannot be instantiated.

B) Constructors can be abstract.

C) A subclass of an abstract class must defined the abstract methods.

D) Static methods may be declared abstract.



5. Which of the following statement is false?

A) The sleep() method should be enclosed in try ......... catch block

B) The yield() method should be enclosed in try ......... catch block.

C) A thread can be temporarily suspended from running by using the wait() method.

D) A suspended thread using suspend() method can be revived using the resume() method.



6. The new operator dynamically allocates ..............for an object and returns a reference to it.

A) classes

B) variables

C) memory

D) none of the above



7. Which of the following statements correctly describes an interface?

A) It's a concrete class

B) It's a super class

C) It's a type of abstract class

D) It's a subclass



8. What is the priority of the Garbage collector thread of jdk?

A) Low Priority

B) Highest Priority

C) Medium Priority

D) Decided at run time



9. ................ is a feature that allows one interface to be used for a general class of actions.

A) Class

B) Inheritance

C) Polymorphism

D) Interface



10. The default package that is implicitly called in a java program is .............

A) java.Lang

B) java.System

C) java.Window

D) java.Lang.System



Answers:



1. In java a ....................... is a sequence of characters.

B) arrayChar

2. Java programs perform I/O through ...........

C) streams

3. What is byte code in the context of Java?

A) The type of code generated by a Java compiler

4. Which of the following statements about abstract methods/classes in Java is true?

A) An abstract class cannot be instantiated.

5. Which of the following statement is false?

B) The yield() method should be enclosed in try ......... catch block.

6. The new operator dynamically allocates ..............for an object and returns a reference to it.

C) memory

7. Which of the following statements correctly describes an interface?

C) It's a type of abstract class

8. What is the priority of the Garbage collector thread of jdk?

A) Low Priority

9. ................ is a feature that allows one interface to be used for a general class of actions.

C) Polymorphism

10. The default package that is implicitly called in a java program is .............

A) java.Lang



Related Posts


الثلاثاء، 3 ديسمبر 2013


1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction?
SQL Interview Multiple Choice Questions
SQL database icon with shortcut identification (Photo credit: Wikipedia)


A) CREATE PACKAGE

B) CREATE SCHEMA

C) CREATE CLUSTER

A) All of the above



2. In SQL, the CREATE TABLESPACE is used

A) to create a place in the database for storage of scheme objects, rollback segments, and naming the data files to comprise the tablespace.

B) to create a database trigger.

C) to add/rename data files, to change storage

D) All of the above



3. Which character function can be used to return a specified portion of a character string?

A) INSTR

B) SUBSTRING

C) SUBSTR

D) POS


4. Which of the following is TRUE for the System Variable $date$?

A) Can be assigned to a global variable.

B) Can be assigned to any field only during design time.

C) Can be assigned to any variable or field during run time.

D) Can be assigned to a local variable.



5. What are the different events in Triggers?

A) Define, Create

B) Drop, Comment

C) Insert, Update, Delete

D) Select, Commit





6. Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables?

A) Data Definition Language

B) Data Manipulation Language

C) Data Described Language

D) Data Retrieval Language



7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM EMP; prints

A) 6789

B) 2345

C) 1234

D) 456789



8. Which of the following SQL command can be used to modify existing data in a database table?

A) MODIFY

B) UPDATE

C) CHANGE

D) NEW



9. When SQL statements are embedded inside 3GL, we call such a program as ..........

A) nested query

B) nested programming

C) distinct query

D) embedded SQL



10. ................ provides option for entering SQL queries as execution time, rather than at the development stage.

A) PL/SQL

B) SQL*Plus

C) SQL

D) Dynamic SQL


Answers:



1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction?

B) CREATE SCHEMA

2. In SQL, the CREATE TABLESPACE is used

A) to create a place in the database for storage of scheme objects, rollback segments, and naming the data files to comprise the tablespace.

3. Which character function can be used to return a specified portion of a character string?

C) SUBSTR

4. Which of the following is TRUE for the System Variable $date$?

B) Can be assigned to any field only during design time.

5. What are the different events in Triggers?

C) Insert, Update, Delete

6. Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables?

A) Data Definition Language

7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM EMP; prints

B) 2345

8. Which of the following SQL command can be used to modify existing data in a database table?

B) UPDATE

9. When SQL statements are embedded inside 3GL, we call such a program as ..........

D) embedded SQL

10. ................ provides option for entering SQL queries as execution time, rather than at the development stage.

D) Dynamic SQL


Related Posts


SQL Interview Multiple Choice Questions and Answers set-4

Posted at  12:30 ص - by mego almasry 0


1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction?
SQL Interview Multiple Choice Questions
SQL database icon with shortcut identification (Photo credit: Wikipedia)


A) CREATE PACKAGE

B) CREATE SCHEMA

C) CREATE CLUSTER

A) All of the above



2. In SQL, the CREATE TABLESPACE is used

A) to create a place in the database for storage of scheme objects, rollback segments, and naming the data files to comprise the tablespace.

B) to create a database trigger.

C) to add/rename data files, to change storage

D) All of the above



3. Which character function can be used to return a specified portion of a character string?

A) INSTR

B) SUBSTRING

C) SUBSTR

D) POS


4. Which of the following is TRUE for the System Variable $date$?

A) Can be assigned to a global variable.

B) Can be assigned to any field only during design time.

C) Can be assigned to any variable or field during run time.

D) Can be assigned to a local variable.



5. What are the different events in Triggers?

A) Define, Create

B) Drop, Comment

C) Insert, Update, Delete

D) Select, Commit





6. Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables?

A) Data Definition Language

B) Data Manipulation Language

C) Data Described Language

D) Data Retrieval Language



7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM EMP; prints

A) 6789

B) 2345

C) 1234

D) 456789



8. Which of the following SQL command can be used to modify existing data in a database table?

A) MODIFY

B) UPDATE

C) CHANGE

D) NEW



9. When SQL statements are embedded inside 3GL, we call such a program as ..........

A) nested query

B) nested programming

C) distinct query

D) embedded SQL



10. ................ provides option for entering SQL queries as execution time, rather than at the development stage.

A) PL/SQL

B) SQL*Plus

C) SQL

D) Dynamic SQL


Answers:



1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction?

B) CREATE SCHEMA

2. In SQL, the CREATE TABLESPACE is used

A) to create a place in the database for storage of scheme objects, rollback segments, and naming the data files to comprise the tablespace.

3. Which character function can be used to return a specified portion of a character string?

C) SUBSTR

4. Which of the following is TRUE for the System Variable $date$?

B) Can be assigned to any field only during design time.

5. What are the different events in Triggers?

C) Insert, Update, Delete

6. Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables?

A) Data Definition Language

7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM EMP; prints

B) 2345

8. Which of the following SQL command can be used to modify existing data in a database table?

B) UPDATE

9. When SQL statements are embedded inside 3GL, we call such a program as ..........

D) embedded SQL

10. ................ provides option for entering SQL queries as execution time, rather than at the development stage.

D) Dynamic SQL


Related Posts


الاثنين، 2 ديسمبر 2013


1. In SQL, which command is used to remove a stored function from the database?
SQL MCQ Interview Questions
Cover of SQL Server magazine (Photo credit: Wikipedia)

A) REMOVE FUNCTION

B) DELETE FUNCTION

C) DROP FUNCTION

D) ERASE FUNCTION



2. In SQL, which command is used to select only one copy of each set of duplicate rows

A) SELECT DISTINCT

B) SELECT UNIQUE

C) SELECT DIFFERENT

D) All of the above



3. Count function in SQL returns the number of

A) Values

B) Distinct values

C) Groups

D) Columns



4. Composite key is made up of ................

A) One column

B) One super key

C) One foreign key

D) Two or more columns



5. What command is used to get back the privileges offered by the GRANT command?

A) Grant

B) Revoke

C) Execute

D) Run




6. Which command displays the SQL command in the SQL buffer, and then executes it?

A) CMD

B) OPEN

C) EXECUTE

D) RUN



7. What is a DATABLOCK?

A) Set of Extents

B) Set of Segments

C) Smallest Database storage unit

D) Set of blocks



8. If two groups are not linked in the data model editor, what is the hierarchy between them?

A) There is no hierarchy between unlinked groups.

B) The group that is right ranks higher than the group that is to right or below it.

C) The group that is above or leftmost ranks higher than the group that is to right or below it.

D) The group that is left ranks higher than the group that is to the right.



9. Which of the following types of triggers can be fired on DDL operations?

A) Instead of Trigger

B) DML Trigger

C) System Trigger

D) DDL Trigger



10. What operator performs pattern matching?

A) IS NULL operator

B) ASSIGNMENT operator

C) LIKE operator

D) NOT operator




Answers:



1. In SQL, which command is used to remove a stored function from the database?

C) DROP FUNCTION

2. In SQL, which command is used to select only one copy of each set of duplicate rows

A) SELECT DISTINCT

3. Count function in SQL returns the number of

A) Values

4. Composite key is made up of ................

D) Two or more columns

5. What command is used to get back the privileges offered by the GRANT command?

B) Revoke

6. Which command displays the SQL command in the SQL buffer, and then executes it?

D) RUN

7. What is a DATABLOCK?

C) Smallest Database storage unit

8. If two groups are not linked in the data model editor, what is the hierarchy between them?

C) The group that is above or leftmost ranks higher than the group that is to right or below it.

9. Which of the following types of triggers can be fired on DDL operations?

C) System Trigger

10. What operator performs pattern matching?

C) LIKE operator


Related Posts


SQL MCQ Interview Questions With Answers set-3

Posted at  1:36 ص - by mego almasry 0


1. In SQL, which command is used to remove a stored function from the database?
SQL MCQ Interview Questions
Cover of SQL Server magazine (Photo credit: Wikipedia)

A) REMOVE FUNCTION

B) DELETE FUNCTION

C) DROP FUNCTION

D) ERASE FUNCTION



2. In SQL, which command is used to select only one copy of each set of duplicate rows

A) SELECT DISTINCT

B) SELECT UNIQUE

C) SELECT DIFFERENT

D) All of the above



3. Count function in SQL returns the number of

A) Values

B) Distinct values

C) Groups

D) Columns



4. Composite key is made up of ................

A) One column

B) One super key

C) One foreign key

D) Two or more columns



5. What command is used to get back the privileges offered by the GRANT command?

A) Grant

B) Revoke

C) Execute

D) Run




6. Which command displays the SQL command in the SQL buffer, and then executes it?

A) CMD

B) OPEN

C) EXECUTE

D) RUN



7. What is a DATABLOCK?

A) Set of Extents

B) Set of Segments

C) Smallest Database storage unit

D) Set of blocks



8. If two groups are not linked in the data model editor, what is the hierarchy between them?

A) There is no hierarchy between unlinked groups.

B) The group that is right ranks higher than the group that is to right or below it.

C) The group that is above or leftmost ranks higher than the group that is to right or below it.

D) The group that is left ranks higher than the group that is to the right.



9. Which of the following types of triggers can be fired on DDL operations?

A) Instead of Trigger

B) DML Trigger

C) System Trigger

D) DDL Trigger



10. What operator performs pattern matching?

A) IS NULL operator

B) ASSIGNMENT operator

C) LIKE operator

D) NOT operator




Answers:



1. In SQL, which command is used to remove a stored function from the database?

C) DROP FUNCTION

2. In SQL, which command is used to select only one copy of each set of duplicate rows

A) SELECT DISTINCT

3. Count function in SQL returns the number of

A) Values

4. Composite key is made up of ................

D) Two or more columns

5. What command is used to get back the privileges offered by the GRANT command?

B) Revoke

6. Which command displays the SQL command in the SQL buffer, and then executes it?

D) RUN

7. What is a DATABLOCK?

C) Smallest Database storage unit

8. If two groups are not linked in the data model editor, what is the hierarchy between them?

C) The group that is above or leftmost ranks higher than the group that is to right or below it.

9. Which of the following types of triggers can be fired on DDL operations?

C) System Trigger

10. What operator performs pattern matching?

C) LIKE operator


Related Posts


الأحد، 1 ديسمبر 2013


1. ............................ is the powerful language for working with RDBMS.

A) Embedded Programs
Objective Questions of Database Management System
Database Management System (Photo credit: Wikipedia)

B) Dynamic Programs

C) Query Language

D) Static Language Programs



2. The file in DBMS is called as .................. in RDBMS.

A) console

B) schema

C) table

D) object



3. In ..................... , we have a strict parent-child relationship only.



B) network databases

C) object oriented databases

D) relational databases



4. Which normal form is considered adequate for relational database design?

A) 2 NF

B) 3 NF

C) 4 NF

D) BCNF



5. What operator tests column for the absence of data?

A) IS NULL operator


C) LIKE operator

D) NOT operator



6. Which is proper subset designed to support views belonging to different classes of users in order to hide or protect information.

A) Schema

B) Sub-schema

C) Non-schema

D) Non-sub schema



7. Which contain information about a file needed by system programs for accessing file records?

A) File blocks

B) File operators

C) File headers

D) None of these



8. A .................... DBMS distributes data processing tasks between the workstation and network server.

A) Network

B) Relational


D) Hierarchical



9. The .................... refers to the way data is organized in and accessible from DBMS.

A) database hierarchy

B) data organization

C) data sharing




10. ................. is a statement that is executed automatically by the system.

A) trigger

B) assertion

C) durability

D) integrity constraint




Answers:


1. ............................ is the powerful language for working with RDBMS.

C) Query Language


2. The file in DBMS is called as .................. in RDBMS.

C) table


3. In ..................... , we have a strict parent-child relationship only.


A) hierarchical databases.


4. Which normal form is considered adequate for relational database design?

B) 3 NF


5. What operator tests column for the absence of data?

A) IS NULL operator


6. Which is proper subset designed to support views belonging to different classes of users in order to hide or protect information.

B) Sub-schema


7. Which contain information about a file needed by system programs for accessing file records?

C) File headers


8. A .................... DBMS distributes data processing tasks between the workstation and network server.

C) Client Server


9. The .................... refers to the way data is organized in and accessible from DBMS.

D) data model


10. ................. is a statement that is executed automatically by the system.

A) trigger




Related Posts

 


For other more Multiple Choice Questions (MCQs): Click Here

Solved Objective Questions of Database Management System set-9

Posted at  1:37 ص - by mego almasry 0


1. ............................ is the powerful language for working with RDBMS.

A) Embedded Programs
Objective Questions of Database Management System
Database Management System (Photo credit: Wikipedia)

B) Dynamic Programs

C) Query Language

D) Static Language Programs



2. The file in DBMS is called as .................. in RDBMS.

A) console

B) schema

C) table

D) object



3. In ..................... , we have a strict parent-child relationship only.



B) network databases

C) object oriented databases

D) relational databases



4. Which normal form is considered adequate for relational database design?

A) 2 NF

B) 3 NF

C) 4 NF

D) BCNF



5. What operator tests column for the absence of data?

A) IS NULL operator


C) LIKE operator

D) NOT operator



6. Which is proper subset designed to support views belonging to different classes of users in order to hide or protect information.

A) Schema

B) Sub-schema

C) Non-schema

D) Non-sub schema



7. Which contain information about a file needed by system programs for accessing file records?

A) File blocks

B) File operators

C) File headers

D) None of these



8. A .................... DBMS distributes data processing tasks between the workstation and network server.

A) Network

B) Relational


D) Hierarchical



9. The .................... refers to the way data is organized in and accessible from DBMS.

A) database hierarchy

B) data organization

C) data sharing




10. ................. is a statement that is executed automatically by the system.

A) trigger

B) assertion

C) durability

D) integrity constraint




Answers:


1. ............................ is the powerful language for working with RDBMS.

C) Query Language


2. The file in DBMS is called as .................. in RDBMS.

C) table


3. In ..................... , we have a strict parent-child relationship only.


A) hierarchical databases.


4. Which normal form is considered adequate for relational database design?

B) 3 NF


5. What operator tests column for the absence of data?

A) IS NULL operator


6. Which is proper subset designed to support views belonging to different classes of users in order to hide or protect information.

B) Sub-schema


7. Which contain information about a file needed by system programs for accessing file records?

C) File headers


8. A .................... DBMS distributes data processing tasks between the workstation and network server.

C) Client Server


9. The .................... refers to the way data is organized in and accessible from DBMS.

D) data model


10. ................. is a statement that is executed automatically by the system.

A) trigger




Related Posts

 


For other more Multiple Choice Questions (MCQs): Click Here

الخميس، 28 نوفمبر 2013


JavaScript Image Slideshow with LInks
 Image Slideshow (Photo credit: Wikipedia)
If you want to place links on the images or captions of the image slideshow using JavaScript codes, you can do it by creating a new array of links along with the array of images and captions and adding some codes on 'swap' function to rotate links with the image and caption rotation in the slideshow. Here  I have written codes for creating JavaScript image slideshow with links, you can use these codes on your website or blog to create attractive image slideshow.

Code for Creating Slideshow with Links on Image


Just copy and paste the code below where you want to place slideshow and change the location of the images.

<script type="text/javascript"> 
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;

var caption = new Array();
// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";

var link= new Array();
// LIST OF LINKS
link[0] = "http://www.siteforinfotech.com/";
link[1] = "http://www.siteforinfotech.com/p/tutorial.html";
link[2] = "http://www.siteforinfotech.com/p/mcqs.html";


function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img = document.getElementById("slide");
img.src= image[i];
var a = document.getElementById("link");
a.href= link[i];

if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<a name="link" id="link" href="http://www.siteforinfotech.com/" target="_blank"><img name="slide" id="slide" alt

="my images" height="285" width="485" src="image-1.png"/></a>
</td>
</tr>
<tr>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<div id ="mydiv"></div>
</td>
</tr>
</table>

Code for Creating Slideshow with Links on Caption


Just copy and paste the code below where you want to place slideshow and change the location of the images.

<script type="text/javascript"> 
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;

var caption = new Array();
// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";

var link= new Array();
// LIST OF LINKS
link[0] = "http://www.siteforinfotech.com/";
link[1] = "http://www.siteforinfotech.com/p/tutorial.html";
link[2] = "http://www.siteforinfotech.com/p/mcqs.html";


function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img = document.getElementById("slide");
img.src= image[i];
var a = document.getElementById("link");
a.href= link[i];

if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<img name="slide" id="slide" alt ="my images" height="285" width="485" src="image-1.png"/>
</td>
</tr>
<tr>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<a name="link" id="link" href="http://www.siteforinfotech.com/" target="_blank"><div id

="mydiv"></div></a>
</td>
</tr>
</table>


You Might also view the following Related Posts

How to Create JavaScript Image Slideshow with Links

Posted at  12:00 ص - by mego almasry 0


JavaScript Image Slideshow with LInks
 Image Slideshow (Photo credit: Wikipedia)
If you want to place links on the images or captions of the image slideshow using JavaScript codes, you can do it by creating a new array of links along with the array of images and captions and adding some codes on 'swap' function to rotate links with the image and caption rotation in the slideshow. Here  I have written codes for creating JavaScript image slideshow with links, you can use these codes on your website or blog to create attractive image slideshow.

Code for Creating Slideshow with Links on Image


Just copy and paste the code below where you want to place slideshow and change the location of the images.

<script type="text/javascript"> 
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;

var caption = new Array();
// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";

var link= new Array();
// LIST OF LINKS
link[0] = "http://www.siteforinfotech.com/";
link[1] = "http://www.siteforinfotech.com/p/tutorial.html";
link[2] = "http://www.siteforinfotech.com/p/mcqs.html";


function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img = document.getElementById("slide");
img.src= image[i];
var a = document.getElementById("link");
a.href= link[i];

if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<a name="link" id="link" href="http://www.siteforinfotech.com/" target="_blank"><img name="slide" id="slide" alt

="my images" height="285" width="485" src="image-1.png"/></a>
</td>
</tr>
<tr>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<div id ="mydiv"></div>
</td>
</tr>
</table>

Code for Creating Slideshow with Links on Caption


Just copy and paste the code below where you want to place slideshow and change the location of the images.

<script type="text/javascript"> 
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;

var caption = new Array();
// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";

var link= new Array();
// LIST OF LINKS
link[0] = "http://www.siteforinfotech.com/";
link[1] = "http://www.siteforinfotech.com/p/tutorial.html";
link[2] = "http://www.siteforinfotech.com/p/mcqs.html";


function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img = document.getElementById("slide");
img.src= image[i];
var a = document.getElementById("link");
a.href= link[i];

if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<img name="slide" id="slide" alt ="my images" height="285" width="485" src="image-1.png"/>
</td>
</tr>
<tr>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<a name="link" id="link" href="http://www.siteforinfotech.com/" target="_blank"><div id

="mydiv"></div></a>
</td>
</tr>
</table>


You Might also view the following Related Posts

الأربعاء، 27 نوفمبر 2013


A simple JavaScript code snippet from Bluefish...
A simple JavaScript code (Photo credit: Wikipedia)

I have already posted JavaScript codes for simple image slideshows without caption, with caption and Jquery fade effect animation. As some of our visitors asked how to add a next button to the slide, I have posted this JavaScript code for creating image slideshow with Navigation Buttons. It may help more for creating awesome image animations for your website or blog.

Code for Creating Image Slideshow with Navigation Buttons 


Just copy and paste the code below where you want to place slideshow and change the location of the images.

<script type="text/javascript"> 
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;
var caption = new Array();

// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";

function next(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i < k ) { i++;}
else { i = 0; }
}

function prev(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i >0 ) { i--;}
else { i = k; }
}

function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<img onclick="prev()" title="Previous" alt ="Prev" height="25" width="15"src="prev.jpg"/>
</td>
<td>
<img name="slide" id="slide" alt ="my images" height="285" width="485" src="image-1.png"/>
</td>
<td>
<img onclick="next()" title="Next" alt ="Next" height="25" width="15" src="next.jpg"/>
</td>
</tr>
<tr>
<td>
</td>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<div id ="mydiv"></div>
</td>
<td>
</td>
</tr>
</table>


You Might also view the following Related Posts

Image Slideshow with Navigation Buttons Using Javascript

Posted at  2:01 ص - by mego almasry 0


A simple JavaScript code snippet from Bluefish...
A simple JavaScript code (Photo credit: Wikipedia)

I have already posted JavaScript codes for simple image slideshows without caption, with caption and Jquery fade effect animation. As some of our visitors asked how to add a next button to the slide, I have posted this JavaScript code for creating image slideshow with Navigation Buttons. It may help more for creating awesome image animations for your website or blog.

Code for Creating Image Slideshow with Navigation Buttons 


Just copy and paste the code below where you want to place slideshow and change the location of the images.

<script type="text/javascript"> 
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;
var caption = new Array();

// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";

function next(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i < k ) { i++;}
else { i = 0; }
}

function prev(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i >0 ) { i--;}
else { i = k; }
}

function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<img onclick="prev()" title="Previous" alt ="Prev" height="25" width="15"src="prev.jpg"/>
</td>
<td>
<img name="slide" id="slide" alt ="my images" height="285" width="485" src="image-1.png"/>
</td>
<td>
<img onclick="next()" title="Next" alt ="Next" height="25" width="15" src="next.jpg"/>
</td>
</tr>
<tr>
<td>
</td>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<div id ="mydiv"></div>
</td>
<td>
</td>
</tr>
</table>


You Might also view the following Related Posts

Copyright © 2013 hello1. by Bloggertheme9 Powered by Blogger.
WP Theme-junkie converted by Blogger template