From 059fe66826558b3bf72ace1bb6bbaa7f0de1f05e Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Mon, 21 Oct 2019 17:37:16 +0600 Subject: [PATCH 01/10] =?UTF-8?q?=E0=A6=95=E0=A6=BF=E0=A6=9B=E0=A7=81=20?= =?UTF-8?q?=E0=A6=85=E0=A6=A8=E0=A7=81=E0=A6=AC=E0=A6=BE=E0=A6=A6=20?= =?UTF-8?q?=E0=A6=AA=E0=A7=8D=E0=A6=B0=E0=A6=AE=E0=A7=8D=E0=A6=AA=E0=A7=8D?= =?UTF-8?q?=E0=A6=9F=20=E0=A6=AA=E0=A6=B0=E0=A7=8D=E0=A6=AF=E0=A6=A8?= =?UTF-8?q?=E0=A7=8D=E0=A6=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09-alert-prompt-confirm/article.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 8ba414e9c..0e10a7c5b 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -1,42 +1,41 @@ -# Interaction: alert, prompt, confirm +# ইন্টারেকশন: alert, prompt, confirm -In this part of the tutorial we cover JavaScript language "as is", without environment-specific tweaks. +টিউটোরিয়ালের এই পর্যায়ে আমরা কোনো বিশেষ পরিবেশ সমন্বয় ছাড়া জাভাস্ক্রিপ্ট দেখবো। -But we'll still be using the browser as our demo environment, so we should know at least a few of its user-interface functions. In this chapter, we'll get familiar with the browser functions `alert`, `prompt` and `confirm`. +কিন্তু আমরা এখনো ব্রাউজার ব্যবহার করবো আমাদের ডেমো পরিবেশ হিসেবে, এখন আমাদের জানা উচিত এর কিছু ব্যবহারকারী ইন্টারফেস ফাংশন সম্পর্কে। এই চ্যাপ্টারে আমরা পরিচিত হবো ব্রাউজার ফাংশন `alert`, `prompt` and `confirm` এর সাথে। ## alert -Syntax: +গঠন: ```js -alert(message); +alert(বার্তা); ``` -This shows a message and pauses script execution until the user presses "OK". +এটি একটি বার্তা প্রদর্শন করে বাকি স্ক্রিপ্ট আটকে রাখে ব্যবহারকারী OK প্রেস করার আগপর্যন্ত। -For example: +যেমন: ```js run -alert("Hello"); +alert("ওহে"); ``` - -The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons, etc. until they have dealt with the window. In this case -- until they press "OK". +বার্তা সহ ছোট উইন্ডোকে *মডাল উইন্ডো* বলে। মডাল মানে হলো, ব্যবহারকারী যতক্ষণ না এই উইন্ডো এর কাজ না করছেন ততক্ষন বাকি পেজ এর কোনো কাজ করে পারবেন না, অন্য কোনো বোতাম চাপতে পারবেন না ইত্যাদি। এইক্ষেত্রে, --যতক্ষণ না তিনি OK চাপছেন। ## prompt -The function `prompt` accepts two arguments: +এই `prompt` ফাংশন দুটি আর্গুমেন্ট নেয়। ```js no-beautify -result = prompt(title, [default]); +result = prompt(শিরোনাম, [default]); ``` -It shows a modal window with a text message, an input field for the visitor, and the buttons OK/Cancel. +এটি একটি মডাল উইন্ডো দেখায় একটি বার্তা, একটি ইনপুট ফিল্ড এবং বোতাম OK/Cancel. -`title` -: The text to show the visitor. +`শিরোনাম` +: যে বার্তা ব্যবহারকারীকে দেখতে চান। `default` -: An optional second parameter, the initial value for the input field. +: একটি ঐচ্ছিক পেরামিটার, এর প্রাথমিক মান ইনপুট ফিল্ড হতে প্রাপ্ত মান। The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key. From 14eb1876b759db1dbc172cafec95a0c2600452fb Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Mon, 21 Oct 2019 18:18:58 +0600 Subject: [PATCH 02/10] =?UTF-8?q?=E0=A6=86=E0=A6=B0=E0=A7=8B=20=E0=A6=95?= =?UTF-8?q?=E0=A6=BF=E0=A6=9B=E0=A7=81=20=E0=A6=85=E0=A6=A8=E0=A7=81?= =?UTF-8?q?=E0=A6=AC=E0=A6=BE=E0=A6=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/09-alert-prompt-confirm/article.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 0e10a7c5b..2cf86cc2b 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -37,16 +37,16 @@ result = prompt(শিরোনাম, [default]); `default` : একটি ঐচ্ছিক পেরামিটার, এর প্রাথমিক মান ইনপুট ফিল্ড হতে প্রাপ্ত মান। -The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key. +ব্যবহারকারী চাইলে ইনপুট ফিল্ডে কিছু টাইপ করে OK চাপতে পারে। অথবা চাইলে ইনপুট টি বাতিল করতে পারে Cancel চেপে অথবা `key:Esc` চেপে। -The call to `prompt` returns the text from the input field or `null` if the input was canceled. +`prompt` ফাংশন ইনপুট ফিল্ড এর লেখা রিটার্ন করে অথবা `null` রিটার্ন করে যদি ইনপুট বাতিল করা হয়। -For instance: +যেমন: ```js run -let age = prompt('How old are you?', 100); +let age = prompt('তোমার বয়স কত?', 100); -alert(`You are ${age} years old!`); // You are 100 years old! +alert(`তোমার বয়স ${age} বছর!`); // তোমার বয়স ১০০ বছর! ``` ````warn header="In IE: always supply a `default`" From bd53013189727373aa840b74c9781f1c7b0fd8fa Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Mon, 21 Oct 2019 18:53:25 +0600 Subject: [PATCH 03/10] =?UTF-8?q?=E0=A6=85=E0=A6=A8=E0=A7=81=E0=A6=AC?= =?UTF-8?q?=E0=A6=BE=E0=A6=A6=20=E0=A6=B6=E0=A7=87=E0=A6=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09-alert-prompt-confirm/article.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 2cf86cc2b..48d749074 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -49,60 +49,60 @@ let age = prompt('তোমার বয়স কত?', 100); alert(`তোমার বয়স ${age} বছর!`); // তোমার বয়স ১০০ বছর! ``` -````warn header="In IE: always supply a `default`" -The second parameter is optional, but if we don't supply it, Internet Explorer will insert the text `"undefined"` into the prompt. +````warn header="ইন্টারনেট এক্সপ্লোরার এ সব সময় `default` দিয়ে দিন" +দ্বিতীয় পেরামিটারটি ঐচ্ছিক কিন্তু যদি আমরা এটি না দেই তাহলে ইন্টারনেট এক্সপ্লোরার লেখাটিকে প্রম্পটের মধ্যে `"undefined"` সেট করে দিবে। -Run this code in Internet Explorer to see: +এই কোডটা ইন্টারনেট এক্সপ্লোরারে রান করে দেখো: ```js run -let test = prompt("Test"); +let test = prompt("পরীক্ষা"); ``` -So, for prompts to look good in IE, we recommend always providing the second argument: +তাই, প্রমপ্টকে ইন্টারনেট এক্সপ্লোরারে সুন্দর দেখানোর জন্য আমরা সুপারিশ করছি সবসময় দ্বিতীয় আর্গুমেন্টটি দেয়ার জন্য। ```js run -let test = prompt("Test", ''); // <-- for IE +let test = prompt("পরীক্ষা", ''); // <-- ইন্টারনেট এক্সপ্লোরারের জন্য। ``` ```` ## confirm -The syntax: +গঠন: ```js -result = confirm(question); +result = confirm(প্রশ্ন); ``` -The function `confirm` shows a modal window with a `question` and two buttons: OK and Cancel. +`confirm` ফাংশন একটি মডাল দেখায় একটি `প্রশ্ন` এবং দুইটি বোতাম OK & Cancel সহ। -The result is `true` if OK is pressed and `false` otherwise. +ফলাফল `true` যদি Ok চাপা হয়, অন্যথায় `false`. -For example: +যেমন: ```js run -let isBoss = confirm("Are you the boss?"); +let isBoss = confirm("আপনি কি মালিক?"); -alert( isBoss ); // true if OK is pressed +alert( isBoss ); // true যদি Ok চেপে থাকেন। ``` -## Summary +## সারমর্ম -We covered 3 browser-specific functions to interact with visitors: +আমরা আজকে ব্যবহারকারীদের সাথে মতবিনিময় করার জন্য ব্রাউজার-নির্দিষ্ট তিনটি ফাংশন সম্পর্কে জানলাম। `alert` -: shows a message. +: একটি বার্তা দেখায়। `prompt` -: shows a message asking the user to input text. It returns the text or, if Cancel button or `key:Esc` is clicked, `null`. +: একটি বার্তা দেখায় যাতে ব্যবহারকারী কিছু লেখা দিতে পারে। এটি লেখাটি রিটার্ন করে অথবা Cancel বা `key:Esc` চাপ দিলে `null` রিটার্ন করে। `confirm` -: shows a message and waits for the user to press "OK" or "Cancel". It returns `true` for OK and `false` for Cancel/`key:Esc`. +: একটি বার্তা দেখায় এবং ব্যবহারকারীর জন্য অপেক্ষা করে বোতাম ছাপার জন্য। যদি Ok চাপা হয় তাহলে `true` রিটার্ন করে। আর Cancel/`key:Esc` চাপলে `false` রিটার্ন করে। -All these methods are modal: they pause script execution and don't allow the visitor to interact with the rest of the page until the window has been dismissed. +এই সব পদ্ধতি-ই মডাল। তারা স্ক্রিপ্ট চালানো বন্ধ রাখে এবং ব্যবহারকারীকে অন্যকিছু করতে দেয় না, যতক্ষণ না এই মডাল বাতিল করা না হচ্ছে। -There are two limitations shared by all the methods above: +উপরে উল্লিখিত পদ্ধতি গুলোতে দুইটি সীমাবদ্ধতা আছে: -1. The exact location of the modal window is determined by the browser. Usually, it's in the center. -2. The exact look of the window also depends on the browser. We can't modify it. +১. মডাল উইন্ডো প্রদর্শন এর স্থান নির্দেশিত হয় ব্রাউজার দ্বারা। সাধারণত এটি মাঝখানে হয়। +২. মডাল এর ডিজাইনও ব্রাউজারের উপর নির্ভর করে। আমরা চাইলে এটি বদলাতে পারি না। -That is the price for simplicity. There are other ways to show nicer windows and richer interaction with the visitor, but if "bells and whistles" do not matter much, these methods work just fine. +এটিই হলো সরলতার দাম। অবশ্য আরো অনেক পদ্ধতি আছে আরো সুন্দর ও সমৃদ্ধ উইন্ডো তৈরী করে ব্যবহারকারীর সাথে মতবিনিময় করার। কিন্তু সরলতা যদি কোনো ব্যাপার না হয়ে থাকে তাহলে এই পদ্ধতি গুলো কাজে লাগাতে পারেন। From 961884513b11a46ee7e6a832134f29d456eb0169 Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Mon, 21 Oct 2019 18:54:35 +0600 Subject: [PATCH 04/10] =?UTF-8?q?=E0=A6=85=E0=A6=A8=E0=A7=81=E0=A6=AC?= =?UTF-8?q?=E0=A6=BE=E0=A6=A6=20=E0=A6=B6=E0=A7=87=E0=A6=B7=E0=A7=87?= =?UTF-8?q?=E0=A6=B0=20=E0=A6=AA=E0=A6=B0=20=E0=A6=B0=E0=A6=BF=E0=A6=AD?= =?UTF-8?q?=E0=A6=BF=E0=A6=B6=E0=A6=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/09-alert-prompt-confirm/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 48d749074..3f0cfe213 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -2,7 +2,7 @@ টিউটোরিয়ালের এই পর্যায়ে আমরা কোনো বিশেষ পরিবেশ সমন্বয় ছাড়া জাভাস্ক্রিপ্ট দেখবো। -কিন্তু আমরা এখনো ব্রাউজার ব্যবহার করবো আমাদের ডেমো পরিবেশ হিসেবে, এখন আমাদের জানা উচিত এর কিছু ব্যবহারকারী ইন্টারফেস ফাংশন সম্পর্কে। এই চ্যাপ্টারে আমরা পরিচিত হবো ব্রাউজার ফাংশন `alert`, `prompt` and `confirm` এর সাথে। +কিন্তু আমরা এখনো ব্রাউজার ব্যবহার করবো আমাদের ডেমো পরিবেশ হিসেবে, এখন আমাদের জানা উচিত এর কিছু ব্যবহারকারী ইন্টারফেস ফাংশন সম্পর্কে। এই চ্যাপ্টারে আমরা পরিচিত হবো ব্রাউজার ফাংশন `alert`, `prompt` এবং `confirm` এর সাথে। ## alert From 00da746a4b76e4cf3d4c39577655424b2e360d40 Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Mon, 21 Oct 2019 19:00:37 +0600 Subject: [PATCH 05/10] =?UTF-8?q?=E0=A6=A6=E0=A7=8D=E0=A6=AC=E0=A6=BF?= =?UTF-8?q?=E0=A6=A4=E0=A7=80=E0=A7=9F=20=E0=A6=B0=E0=A6=BF=E0=A6=AD?= =?UTF-8?q?=E0=A6=BF=E0=A6=B6=E0=A6=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/09-alert-prompt-confirm/article.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 3f0cfe213..8aa8e4b97 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -29,7 +29,7 @@ alert("ওহে"); result = prompt(শিরোনাম, [default]); ``` -এটি একটি মডাল উইন্ডো দেখায় একটি বার্তা, একটি ইনপুট ফিল্ড এবং বোতাম OK/Cancel. +এটি একটি মডাল উইন্ডো, যা দেখায় একটি বার্তা, একটি ইনপুট ফিল্ড এবং বোতাম OK/Cancel. `শিরোনাম` : যে বার্তা ব্যবহারকারীকে দেখতে চান। @@ -52,7 +52,7 @@ alert(`তোমার বয়স ${age} বছর!`); // তোমার বয় ````warn header="ইন্টারনেট এক্সপ্লোরার এ সব সময় `default` দিয়ে দিন" দ্বিতীয় পেরামিটারটি ঐচ্ছিক কিন্তু যদি আমরা এটি না দেই তাহলে ইন্টারনেট এক্সপ্লোরার লেখাটিকে প্রম্পটের মধ্যে `"undefined"` সেট করে দিবে। -এই কোডটা ইন্টারনেট এক্সপ্লোরারে রান করে দেখো: +এই কোডটা ইন্টারনেট এক্সপ্লোরারে রান করে দেখুন: ```js run let test = prompt("পরীক্ষা"); @@ -63,7 +63,6 @@ let test = prompt("পরীক্ষা"); ```js run let test = prompt("পরীক্ষা", ''); // <-- ইন্টারনেট এক্সপ্লোরারের জন্য। ``` -```` ## confirm From 376bd58e49643bf705351785db024b7942086c66 Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Mon, 21 Oct 2019 19:04:44 +0600 Subject: [PATCH 06/10] =?UTF-8?q?=E0=A6=85=E0=A6=A8=E0=A7=81=E0=A6=AC?= =?UTF-8?q?=E0=A6=BE=E0=A6=A6=20=E0=A6=B8=E0=A6=AE=E0=A7=8D=E0=A6=AA?= =?UTF-8?q?=E0=A7=82=E0=A6=B0=E0=A7=8D=E0=A6=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09-alert-prompt-confirm/1-simple-page/task.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md b/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md index a65a654e0..bb28875d5 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md @@ -1,9 +1,9 @@ -importance: 4 +গুরুত্ব: ৪ --- -# A simple page +# একটি সহজ পৃষ্ঠা -Create a web-page that asks for a name and outputs it. +একটি ওয়েব পেজ তৈরী করুন, যেটা একটি নাম জিজ্ঞেস করবে এবং নামটি দেখাবে। -[demo] +[উদাহরণ] From 67d9b82c6dd88a5a81a016b9b514169a1616e4f7 Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Tue, 22 Oct 2019 15:36:18 +0600 Subject: [PATCH 07/10] Last Update --- .../09-alert-prompt-confirm/1-simple-page/task.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md b/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md index bb28875d5..7dd3ac9e1 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/1-simple-page/task.md @@ -1,4 +1,4 @@ -গুরুত্ব: ৪ +importance: 4 --- @@ -6,4 +6,4 @@ একটি ওয়েব পেজ তৈরী করুন, যেটা একটি নাম জিজ্ঞেস করবে এবং নামটি দেখাবে। -[উদাহরণ] +[demo] From ce6926888827665f5fc3e2ee0f40c16f7631bfd9 Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Wed, 23 Oct 2019 10:16:32 +0600 Subject: [PATCH 08/10] issues solved --- .../09-alert-prompt-confirm/article.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 8aa8e4b97..cd3cad03d 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -9,16 +9,17 @@ গঠন: ```js -alert(বার্তা); +alert(message); ``` -এটি একটি বার্তা প্রদর্শন করে বাকি স্ক্রিপ্ট আটকে রাখে ব্যবহারকারী OK প্রেস করার আগপর্যন্ত। +এটি একটি বার্তা প্রদর্শন করে বাকি স্ক্রিপ্ট আটকে রাখে ব্যবহারকারী OK প্রেস করার আগ পর্যন্ত। যেমন: ```js run -alert("ওহে"); +alert("হ্যালোে"); ``` + বার্তা সহ ছোট উইন্ডোকে *মডাল উইন্ডো* বলে। মডাল মানে হলো, ব্যবহারকারী যতক্ষণ না এই উইন্ডো এর কাজ না করছেন ততক্ষন বাকি পেজ এর কোনো কাজ করে পারবেন না, অন্য কোনো বোতাম চাপতে পারবেন না ইত্যাদি। এইক্ষেত্রে, --যতক্ষণ না তিনি OK চাপছেন। ## prompt @@ -26,12 +27,12 @@ alert("ওহে"); এই `prompt` ফাংশন দুটি আর্গুমেন্ট নেয়। ```js no-beautify -result = prompt(শিরোনাম, [default]); +result = prompt(title, [default]); ``` -এটি একটি মডাল উইন্ডো, যা দেখায় একটি বার্তা, একটি ইনপুট ফিল্ড এবং বোতাম OK/Cancel. +এটি একটি মডাল উইন্ডো, যা একটি বার্তা, একটি ইনপুট ফিল্ড এবং OK/Cancel বাটন দেখায়। -`শিরোনাম` +`title` : যে বার্তা ব্যবহারকারীকে দেখতে চান। `default` @@ -69,12 +70,12 @@ let test = prompt("পরীক্ষা", ''); // <-- ইন্টারনে গঠন: ```js -result = confirm(প্রশ্ন); +result = confirm(question); ``` -`confirm` ফাংশন একটি মডাল দেখায় একটি `প্রশ্ন` এবং দুইটি বোতাম OK & Cancel সহ। +`confirm` ফাংশন একটি মডাল একটি দেখায় যেখানে একটি `question` এবং দুইটি OK ও Cancel বাটন আছে। -ফলাফল `true` যদি Ok চাপা হয়, অন্যথায় `false`. +যদি Ok চাপা হয় তাহলে ফলাফল `true`, অন্যথায় `false` হয়ে থাকে। যেমন: @@ -95,7 +96,7 @@ alert( isBoss ); // true যদি Ok চেপে থাকেন। : একটি বার্তা দেখায় যাতে ব্যবহারকারী কিছু লেখা দিতে পারে। এটি লেখাটি রিটার্ন করে অথবা Cancel বা `key:Esc` চাপ দিলে `null` রিটার্ন করে। `confirm` -: একটি বার্তা দেখায় এবং ব্যবহারকারীর জন্য অপেক্ষা করে বোতাম ছাপার জন্য। যদি Ok চাপা হয় তাহলে `true` রিটার্ন করে। আর Cancel/`key:Esc` চাপলে `false` রিটার্ন করে। +: একটি বার্তা দেখায় এবং ব্যবহারকারীর নির্দেশের অপেক্ষা করে। যদি Ok চাপা হয় তাহলে `true` রিটার্ন করে। আর Cancel/`key:Esc` চাপলে `false` রিটার্ন করে। এই সব পদ্ধতি-ই মডাল। তারা স্ক্রিপ্ট চালানো বন্ধ রাখে এবং ব্যবহারকারীকে অন্যকিছু করতে দেয় না, যতক্ষণ না এই মডাল বাতিল করা না হচ্ছে। @@ -104,4 +105,4 @@ alert( isBoss ); // true যদি Ok চেপে থাকেন। ১. মডাল উইন্ডো প্রদর্শন এর স্থান নির্দেশিত হয় ব্রাউজার দ্বারা। সাধারণত এটি মাঝখানে হয়। ২. মডাল এর ডিজাইনও ব্রাউজারের উপর নির্ভর করে। আমরা চাইলে এটি বদলাতে পারি না। -এটিই হলো সরলতার দাম। অবশ্য আরো অনেক পদ্ধতি আছে আরো সুন্দর ও সমৃদ্ধ উইন্ডো তৈরী করে ব্যবহারকারীর সাথে মতবিনিময় করার। কিন্তু সরলতা যদি কোনো ব্যাপার না হয়ে থাকে তাহলে এই পদ্ধতি গুলো কাজে লাগাতে পারেন। +ব্যবহারকারীর সাথে মতবিনিময় করার এটিই সবচেয়ে সহজ উপায় তাই কিছুতো ছাড় দিতেই হবে। তবে যদি খুব বেশি সমস্যা না থাকে আপনি এগুলো ব্যবহার করতে পারেন। অবশ্য আরো অনেক পদ্ধতি আছে আরো সুন্দর ও সমৃদ্ধ উইন্ডো তৈরী করে ব্যবহারকারীর সাথে মতবিনিময় করার। From 59d67ba0d92acfde7d8a8855d5cba5157ef0414d Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Wed, 23 Oct 2019 14:43:45 +0600 Subject: [PATCH 09/10] =?UTF-8?q?=E0=A6=B9=E0=A7=8D=E0=A6=AF=E0=A6=BE?= =?UTF-8?q?=E0=A6=B2=E0=A7=8B=20=E0=A6=8F=E0=A6=A1=E0=A6=BF=E0=A6=9F?= =?UTF-8?q?=E0=A7=87=E0=A6=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/09-alert-prompt-confirm/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index cd3cad03d..2a8fba17f 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -17,7 +17,7 @@ alert(message); যেমন: ```js run -alert("হ্যালোে"); +alert("হ্যালো"); ``` বার্তা সহ ছোট উইন্ডোকে *মডাল উইন্ডো* বলে। মডাল মানে হলো, ব্যবহারকারী যতক্ষণ না এই উইন্ডো এর কাজ না করছেন ততক্ষন বাকি পেজ এর কোনো কাজ করে পারবেন না, অন্য কোনো বোতাম চাপতে পারবেন না ইত্যাদি। এইক্ষেত্রে, --যতক্ষণ না তিনি OK চাপছেন। From 2a5d429a044d3c787f67c7623d2f4496f2509fe2 Mon Sep 17 00:00:00 2001 From: Sohag Hasan Date: Thu, 24 Oct 2019 23:55:25 +0600 Subject: [PATCH 10/10] Final Changes --- .../09-alert-prompt-confirm/article.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index 2a8fba17f..fd427a218 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -20,7 +20,7 @@ alert(message); alert("হ্যালো"); ``` -বার্তা সহ ছোট উইন্ডোকে *মডাল উইন্ডো* বলে। মডাল মানে হলো, ব্যবহারকারী যতক্ষণ না এই উইন্ডো এর কাজ না করছেন ততক্ষন বাকি পেজ এর কোনো কাজ করে পারবেন না, অন্য কোনো বোতাম চাপতে পারবেন না ইত্যাদি। এইক্ষেত্রে, --যতক্ষণ না তিনি OK চাপছেন। +বার্তা সহ ছোট উইন্ডোকে *মডাল উইন্ডো* বলে। মডাল মানে হলো, ব্যবহারকারী যতক্ষণ না এই উইন্ডো এর কাজ না করছেন ততক্ষন বাকি পেজ এর কোনো কাজ করতে পারবেন না, অন্য কোনো বাটন চাপতে পারবেন না ইত্যাদি। এইক্ষেত্রে, --যতক্ষণ না তিনি OK চাপছেন। ## prompt @@ -33,10 +33,10 @@ result = prompt(title, [default]); এটি একটি মডাল উইন্ডো, যা একটি বার্তা, একটি ইনপুট ফিল্ড এবং OK/Cancel বাটন দেখায়। `title` -: যে বার্তা ব্যবহারকারীকে দেখতে চান। +: যে বার্তা ব্যবহারকারীকে দেখাতে চান। `default` -: একটি ঐচ্ছিক পেরামিটার, এর প্রাথমিক মান ইনপুট ফিল্ড হতে প্রাপ্ত মান। +: এটি একটি ঐচ্ছিক প্যারামিটার, এর প্রাথমিক মান ইনপুট ফিল্ড হতে প্রাপ্ত মান। ব্যবহারকারী চাইলে ইনপুট ফিল্ডে কিছু টাইপ করে OK চাপতে পারে। অথবা চাইলে ইনপুট টি বাতিল করতে পারে Cancel চেপে অথবা `key:Esc` চেপে। @@ -51,7 +51,7 @@ alert(`তোমার বয়স ${age} বছর!`); // তোমার বয় ``` ````warn header="ইন্টারনেট এক্সপ্লোরার এ সব সময় `default` দিয়ে দিন" -দ্বিতীয় পেরামিটারটি ঐচ্ছিক কিন্তু যদি আমরা এটি না দেই তাহলে ইন্টারনেট এক্সপ্লোরার লেখাটিকে প্রম্পটের মধ্যে `"undefined"` সেট করে দিবে। +দ্বিতীয় প্যারামিটারটি ঐচ্ছিক কিন্তু যদি আমরা এটি না দেই তাহলে ইন্টারনেট এক্সপ্লোরার লেখাটিকে প্রম্পটের মধ্যে `"undefined"` সেট করে দিবে। এই কোডটা ইন্টারনেট এক্সপ্লোরারে রান করে দেখুন: @@ -73,14 +73,14 @@ let test = prompt("পরীক্ষা", ''); // <-- ইন্টারনে result = confirm(question); ``` -`confirm` ফাংশন একটি মডাল একটি দেখায় যেখানে একটি `question` এবং দুইটি OK ও Cancel বাটন আছে। +`confirm` ফাংশন একটি মডাল, একটি দেখায় যেখানে একটি `question` এবং দুইটি OK ও Cancel বাটন আছে। যদি Ok চাপা হয় তাহলে ফলাফল `true`, অন্যথায় `false` হয়ে থাকে। যেমন: ```js run -let isBoss = confirm("আপনি কি মালিক?"); +let isBoss = confirm("আপনি কি বস?"); alert( isBoss ); // true যদি Ok চেপে থাকেন। ``` @@ -93,7 +93,7 @@ alert( isBoss ); // true যদি Ok চেপে থাকেন। : একটি বার্তা দেখায়। `prompt` -: একটি বার্তা দেখায় যাতে ব্যবহারকারী কিছু লেখা দিতে পারে। এটি লেখাটি রিটার্ন করে অথবা Cancel বা `key:Esc` চাপ দিলে `null` রিটার্ন করে। +: একটি বার্তা দেখায় যাতে ব্যবহারকারী কিছু `input`দিতে পারে। এটি `input` টিকে স্ট্রিং হিসেবে রিটার্ন করে অথবা `Cancel` বা `key:Esc` চাপ দিলে `null` রিটার্ন করে। `confirm` : একটি বার্তা দেখায় এবং ব্যবহারকারীর নির্দেশের অপেক্ষা করে। যদি Ok চাপা হয় তাহলে `true` রিটার্ন করে। আর Cancel/`key:Esc` চাপলে `false` রিটার্ন করে।