A PHP Error was encountered

Severity: Warning

Message: fopen(/var/cpanel/php/sessions/ea-php70/ci_sessione7js2qkf329jj8chl46nj7psnpc6rmuv): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 174

Backtrace:

File: /home/teksla5/public_html/application/controllers/Courses.php
Line: 10
Function: library

File: /home/teksla5/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/teksla5/public_html/system/core/Exceptions.php:271)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/teksla5/public_html/application/controllers/Courses.php
Line: 10
Function: library

File: /home/teksla5/public_html/index.php
Line: 315
Function: require_once

Dialog Boxes In JavaScript

JavaScript Dialog Boxes

JavaScript has three kinds of popup boxes: Alert box, Confirm box, and Prompt box.  

Alert Box

An alert box is often used if you want to make sure information comes through to the user. When an alert box pops up, the user will have to click “ok” to proceed.

Syntax

alert(“some text”);  

Learn JavaScript by Tekslate - Fastest growing sector in the industry. Explore Online "JavaScript Training" and course is aligned with industry needs & developed by industry veterans. Tekslate will turn you into JavaScript Expert.

 

Example

<html>

<head>

<script type=”text/javascript”>

functionshow_alert() { alert(“I am an alert box :”) ;

}

</script>

</head>

<body>

<input type=”button” onclick=”show_alert()” value=”show alert box” />

</body>

</html>

Confirm Box

A confirm box is often used if you want the user to verify or accept something. When a confirm box pops up, the user will have to click either “OK” or “cancel” to proceed. If the user clicks “OK”, the box returns true. If the user clicks “Cancel”, the box returns false.

Syntax

confirm(“some text”); 

Example

<html>

<head>

<script type=”text/javascript”>

functionshow_confirm()

{

var r=confirm(“Press a button”);

if (r==true)

{

alert(“you pressed OK!”);

}

else

{

alert(“you pressed cancel!”);

}

}

</script>

</head>

<body>

<input type=”button” onclick=”show_confirm()” value=”show confirm box” />

</body>

</html>

Prompt Box

A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either “OK” or “Cancel” to proceed after entering an input value. If the user clicks “OK” the box returns the input value. If the user clicks “Cancel” the box returns null.

Syntax

prompt(“sometext”,”defaultvalue”);  

Example

<html>

<head>

<script type=”text/javascript”>

functionshow_prompt()

{

var name=prompt(“Please enter your name”,”Harry potter”);

if (name!=null && name!=””)

{

document.write(“Hello ” + name + “ ! How are you today?”);

}

}

</script>

</head>

<body>

<input type=”button” onclick=”show_confirm()” value=”show prompt box” />

</body>

</html>

A PHP Error was encountered

Severity: Warning

Message: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea-php70)

Filename: Unknown

Line Number: 0

Backtrace: