ElaKiri Community
Downloads
Go Back   ElaKiri Community > General > ElaKiri Talk!
Reload this Page ප්‍රෝග්‍රෑමින් වැඩ්ඩන්ගෙන් උදව්වක් ඕනි j
Reply
 
Thread Tools
(#1)
Old
samith akalanka samith akalanka is offline
Member
samith akalanka is an unknown quantity at this point
 
Posts: 69
Join Date: Jan 2018
laugh ප්‍රෝග්‍රෑමින් වැඩ්ඩන්ගෙන් උදව්වක් ඕනි j - 09-30-2019, 09:48 PM

ප්‍රෝග්‍රෑමින් වැඩ්ඩන්ගෙන් උදව්වක් ඕනි,

මේකයි සීන් එක, මට මෙන්න මේ වගේ කම්පොනන්ට් එකක් ඕනි, ඒ කිව්වේ මෙහෙම බට්න් 4ක් තියෙනවා Hi , Welcome, bye ,hello කියලා, මේවා ක්ලික් කරද්දි Textarea or Div එකක මවුස් එක focus වෙලා තියෙන තැනට අදාල ෆීල්ඩ් එක ඇඩ් වෙන්න ඕනි මේ ඉමේජ් එකේ තියෙනවා වගේ



, ඒ වගේ ම තමා ඇඩ් කරපු එකක් රිමූව් කරන්න පුලුවන්න් වෙන්නත් ඕනි පොඩි X close එකක් දාලා.. මේ වගේ එකක් උඹලා හදලා තියේනම් මට දෙනවද? නැත්නම් resource එකක් හරි කමක් නෑ,අයිඩියා එකක් දීපන්කො

JQuery or any JS library හරි මොන මගුලක් හරි යූස් කරලා මට වැඩේ වෙන්නයි ඔඑනි ප්ලීස් බම්ප් එකක්වත් දාලා උදව් කරන්න

Last edited by samith akalanka; 09-30-2019 at 09:50 PM.
Reply With Quote
(#2)
Old
coolshano's Avatar
coolshano coolshano is offline
Senior Member
coolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of lightcoolshano is a glorious beacon of light
 
Posts: 16,146
Join Date: Sep 2007
Location: N/A
Send a message via MSN to coolshano Send a message via Yahoo to coolshano Send a message via Skype™ to coolshano
09-30-2019, 10:11 PM

bump thama
Reply With Quote
(#3)
Old
Average-Guy's Avatar
Average-Guy Average-Guy is offline
Senior Member
Average-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really nice
 
Posts: 665
Join Date: Jul 2017
Location: #ශ්‍රී ලංකා
09-30-2019, 10:18 PM

div එක ඇතුලේ පෙන්නන්න ඹ්නි ටික array එකක තියාගෙන ඒ array එක div එකේ render කලානම් හරි.

ඊ්ට පස්සේ click කරපු එක array එකට දානවා close click කලොත් අදාල එක අයින් කරනවා array එකෙන්.
AngularJs වලින් කරන්න පුලුවන් වෙයි ලේසියෙන්....
Reply With Quote
(#4)
Old
windows_ubuntu's Avatar
windows_ubuntu windows_ubuntu is offline
Senior Member
windows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of lightwindows_ubuntu is a glorious beacon of light
 
Posts: 1,864
Join Date: Jun 2018
Location: In Fantasy
09-30-2019, 10:46 PM

Bump
Reply With Quote
(#5)
Old
Average-Guy's Avatar
Average-Guy Average-Guy is offline
Senior Member
Average-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really nice
 
Posts: 665
Join Date: Jul 2017
Location: #ශ්‍රී ලංකා
09-30-2019, 11:02 PM

Code:
<html>
<body>

<p onclick="addToRender('hello')">hello</p>
<p onclick="addToRender('hi')">hi</p>   

<h3>this is the div</h3>
<div id="renderDiv">
  
<div>
  
  
</body>
</html>
Code:
var elements = [];

function addToRender(txtVal){
  elements.push(txtVal);
  console.log(elements);
  renderElements();
}

function delToRender(txtVal){
  console.log(txtVal);
  elements = elements.filter(e => e !== txtVal);
  renderElements();
}

function renderElements(){
  var rd = document.getElementById('renderDiv');
  var htmlTxt = "";
  for (i = 0; i < elements.length; i++) {
    htmlTxt += "<h3 onclick=\"delToRender(\'" + elements[i] + "\')\">" + elements[i] + "</h3>";
  }
  rd.innerHTML = htmlTxt;
}
කෝඩ් එකක් ගැහුවා පපට පටස් ගලා. pure js තින්නේ. css උඹ දා ගනින්. codepen එක share කරන්න බැ username එක පේනවා.
Reply With Quote
(#6)
Old
samith akalanka samith akalanka is offline
Member
samith akalanka is an unknown quantity at this point
 
Posts: 69
Join Date: Jan 2018
10-01-2019, 08:31 AM

Quote:
Originally Posted by Average-Guy View Post
Code:
<html>
<body>

<p onclick="addToRender('hello')">hello</p>
<p onclick="addToRender('hi')">hi</p>   

<h3>this is the div</h3>
<div id="renderDiv">
  
<div>
  
  
</body>
</html>
Code:
var elements = [];

function addToRender(txtVal){
  elements.push(txtVal);
  console.log(elements);
  renderElements();
}

function delToRender(txtVal){
  console.log(txtVal);
  elements = elements.filter(e => e !== txtVal);
  renderElements();
}

function renderElements(){
  var rd = document.getElementById('renderDiv');
  var htmlTxt = "";
  for (i = 0; i < elements.length; i++) {
    htmlTxt += "<h3 onclick=\"delToRender(\'" + elements[i] + "\')\">" + elements[i] + "</h3>";
  }
  rd.innerHTML = htmlTxt;
}
කෝඩ් එකක් ගැහුවා පපට පටස් ගලා. pure js තින්නේ. css උඹ දා ගනින්. codepen එක share කරන්න බැ username එක පේනවා.
එල මචන් ,පීම් එකක් දැම්මා,පොඩ්ඩක් බලන්නකෝ
Reply With Quote
(#7)
Old
samith akalanka samith akalanka is offline
Member
samith akalanka is an unknown quantity at this point
 
Posts: 69
Join Date: Jan 2018
10-01-2019, 08:31 AM

Quote:
Originally Posted by coolshano View Post
bump thama
Reply With Quote
(#8)
Old
Average-Guy's Avatar
Average-Guy Average-Guy is offline
Senior Member
Average-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really niceAverage-Guy is just really nice
 
Posts: 665
Join Date: Jul 2017
Location: #ශ්‍රී ලංකා
10-01-2019, 09:48 AM




wow
Reply With Quote
(#9)
Old
samith akalanka samith akalanka is offline
Member
samith akalanka is an unknown quantity at this point
 
Posts: 69
Join Date: Jan 2018
10-01-2019, 03:56 PM

bump
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright © 2006 - 2011 ElaKiri™ Beta2.Evo vBulletin, vBa iBproArcade Subdreamer I-Magic MKv

Page generated in 0.02385 seconds with 11 queries