How to Split Value on Textbox using Javascript?
2014-11-13, 01:11 AM,
Hello cpaelites..

This is the scenario, I have two textbox on my website html with id="textbox1" and id="textbox2"..
on first textbox.. visitor need to download my codes.. after they successfully download it they will paste it on 1st textbox.. and click Verify..

the code is example

I want to split the xxxxxxx and put it on 2nd textbox after they click Verify.. and the @this-is-sample will remain on 1st textbox..

How it is possible?
I hope you can help me.. I've tried to google it but I can't find the answer.. Thanks in advance

How much you can take and keep moving forward.
That's how winning is done!

Share This Thread :

2015-02-01, 10:27 AM,
I made working code for you! I hope this helps you in your project :)

<!DOCTYPE html>
        <meta charset="UTF-8">
        <input type="text" id="textbox1" placeholder="txt1"/>
        <input type="text" id="textbox2" placeholder="txt2"/>
        <button onclick="split();" type="button">Verify</button>
    function split() {
        var txtBox1 = document.getElementById('textbox1');
        var txtBox2 = document.getElementById('textbox2');
        var extraDelimiter = txtBox1.value.replace(/@/gi, ",@");
        var splittedValues = extraDelimiter.split(",");
        txtBox2.value = splittedValues[0];
        txtBox1.value = splittedValues[1];

Related Threads
Thread Author Replies Views Last Post
  [split] Question: FB accounts maxyman 14 910 2018-02-13, 09:38 PM
Last Post: NAPK1NS
  Is it possible to convert the landing page protection into javascript? ๖ۣۜPhoenix 5 415 2017-06-09, 11:54 AM
Last Post: tanfirislam
  How to split traffic [CPA] Sado 6 825 2017-03-22, 08:01 AM
Last Post: g3lux
  Please help with javascript and css mboitshepo 1 685 2016-06-25, 03:58 PM
Last Post: BrainyElite
  Javascript Unescape Not Working For me :( finnishhacker 0 363 2016-06-03, 04:04 AM
Last Post: finnishhacker

About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top