Topic: JavaScript

How To Capitalize The First Letter Of A String In JavaScript 0

How To Capitalize The First Letter Of A String In JavaScript

How To Capitalize The First Letter Of A String In JavaScript

In this Post We Will Explain About is How To Capitalize The First Letter Of A String In JavaScript With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to javascript capitalize first letter of each word Example

In this post we will show you Best way to implement How to Capitalize the First Letter of a String in JavaScript, hear for How do I make the first letter of a string uppercase in JavaScript with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Capitalizing first letter of each word in string – JavaScript

Here is a simple and quick source code below for the using JavaScript version of like as a ucfirst Example. This source code below will allow We to First later capitalize the first letter of a some string using JavaScript Example.

function first_ulater(mystring) 
{
    return mystring.charAt(0).toUpperCase() + mystring.slice(1);
}

capitalize first letter javascript

This simple source code below will use the JavaScript function charAt to get the simple only one character at a certain in index.

var firstLetter = mystring.charAt(0);

javascript capitalize first letter

And then we can use the uppercase simple function in JavaScript to set this mystring to be in first later capitals.

var uppercaseFirstLetter = mystring.charAt(0).toUpperCase();

javascript capitalize first letter of string

And Then we can add the simple rest of the mystring on to this first capital letter by using the some other way used to function slice() which will some allow us to as well as get the rest of the mystring and some remove the first letter.

var stringWithoutFirstLetter = mystring.slice(1)

uppercase first letter javascript

adding this so we get the simple JavaScript function ucfirst() alternative way.

function first_ulater(mystring) 
{
    return mystring.charAt(0).toUpperCase() + mystring.slice(1);
}

Example

I hope you have Got What is JAVASCRIPT: UPPERCASE FIRST LETTER IN A STRING And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Image Upload,Crop and Resize Using PHP, jQuery and Ajax 0

Image Upload,Crop and Resize Using PHP, jQuery and Ajax

Image Upload,Crop and Resize Using PHP, jQuery and Ajax

In this Post We Will Explain About is Image Upload,Crop and Resize Using PHP, jQuery and Ajax With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to crop image while uploading with jquery Example

In this post we will show you Best way to implement image cropping in php and jquery, hear for crop resize and save image php jquery with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

crop and save image using jquery and php

In this Example,First of all Add or Inluce External Libs Like as a(jQuery, css etc..), and then create a simple index.php or index.html page.After that crate a simple javascript file like as a index.js or main.js, It is also add your web-application First Header Part to some priorty set.After that Include your relavant CSS Class.

Phase 1: Firstof all we shall include all some libs Like as a necessary jquery some plugin and library files.and then We shall keep all some belowcreate files in head section of like as index.php file.

<!--www.Pakainfo.com include libs-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!--www.Pakainfo.com include libs-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!--www.Pakainfo.com include libs-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!--www.Pakainfo.com include libs-->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!--www.Pakainfo.com include libs-->
<script src="dist/jquery.live-imgselect.js" type="text/javascript"></script>
<script src="dist/jquery.form.js"></script>
<link rel="stylesheet" href="dist/live-imgselect.css">

Phase 2:Here,We shall Make simple HTML div to show image and some option to change new image.

<div class="col-sm-2"><img class="img-circle" id="live-updateimg" height="128" data-src="custom.jpg"  data-holder-rendered="true" style="width: 140px; height: 140px;" src="custom.jpg"/></div>
        <div class="col-sm-10"><a type="button" class="btn btn-primary" id="change-pic">Change Image</a>
</div>

Here We Are showing some custom.jpg image file as well as for as a some custom image.

Phase 3:And then Now we shall Make HTML div to upload and simple crop image.

<div id="changePic" class="" style="display:none">
                  <form id="cropimage" method="post" enctype="multipart/form-data" action="dashboard.php">
            <label>Upload your image</label><input type="file" name="live_imgname" id="live_imgname" />
            <input type="hidden" name="new-dashboard-id" id="new-dashboard-id" value="1" />
            <input type="hidden" name="first-axis" id="first-axis" value="" />
            <input type="hidden" name="second-axis" id="second-axis" value="" />
            <input type="hidden" name="live-x2-axis" value="" id="live-x2-axis" />
            <input type="hidden" name="live-y2-axis" value="" id="live-y2-axis" />
            <input type="hidden" name="live-thumb-width" id="live-thumb-width" value="" />
            <input type="hidden" name="live-thumb-height" id="live-thumb-height" value="" />
            <input type="hidden" name="action" value="" id="action" />
            <input type="hidden" name="image_name" value="" id="image_name" />
            
            <div id='liveData_prev-avatar-dashboard'>
          </div>
          <div id="thumbs" style="padding:5px; width:600p"></div>
          </form>
              <div class="modal-footer">
                  <button type="button" class="btn btn-custom" data-dismiss="modal">Close</button>
                  <button type="button" id="btn-crop" class="btn btn-primary">Crop & Save</button>
              </div>
      </div>

Phase 4: And then will write some source jquery code to show the simple steps to Image Crop div on click of data change pic some button.

jQuery('#change-pic').live('click', function(e){
    e.preventDefault();
    
     jQuery('#changePic').show();
     jQuery('#change-pic').hide();
    
  });

Phase 5: And then we shall use some jQuery Ajax form some new plugin for HTML form submitting as well as show the simple image for some crop process on simple bootstrap modal box.

jQuery('#live_imgname').live('change', function() 
{ 
jQuery("#liveData_prev-avatar-dashboard").html('');
jQuery("#liveData_prev-avatar-dashboard").html('Uploading....');
jQuery("#cropimage").ajaxForm(
{
target: '#liveData_prev-avatar-dashboard',
success:    function() { 
        jQuery('img#photo').imgAreaSelect({
        aspectRatio: '1:1',
        onSelectEnd: getSizes,
    });
    }
}).submit();
});

Phase 6: And then we shall cropped image and some call save data Ajax method to save image on some hard disk storage.

  //call on crop iamge button
jQuery('#btn-crop').live('click', function(e){
  e.preventDefault();
  all_params = {
            targetUrl: 'profiles/saveAvatarTmp/',
            action: 'profiles_controller_saveAvatarTmp',
      x_axis: jQuery('#first-axis').val(),
      y_axis : jQuery('#second-axis').val(),
      x2_axis: jQuery('#live-x2-axis').val(),
      y2_axis : jQuery('#live-y2-axis').val(),
      thumb_width : jQuery('#live-thumb-width').val(),
      thumb_height:jQuery('#live-thumb-height').val()
        };
    saveCropImage(all_params);
  });
function saveCropImage(all_params) {
    jQuery.ajax({
        url: siteurl + all_params['targetUrl'],
        cache: false,
        dataType: "html",
        data: {
            action: all_params['action'],
            id: jQuery('#new-dashboard-id').val(),
       t: 'ajax',
                w1:all_params['thumb_width'],
                x1:all_params['x_axis'],
                h1:all_params['thumb_height'],
                y1:all_params['y_axis'],
                x2:all_params['x2_axis'],
                y2:all_params['y2_axis']
        },
        type: 'Post',
       // async:false,
        success: function (response) {
        jQuery('#changePic').hide();
          jQuery('#change-pic').show();
        jQuery(".live-imgselect-border1,.live-imgselect-border2,.live-imgselect-border3,.live-imgselect-border4,.live-imgselect-border2,.live-imgselect-outer").css('display', 'none');
        
        jQuery("#live-updateimg").attr('src', response);
        jQuery("#liveData_prev-avatar-dashboard").html('');
        jQuery("#live_imgname").val('');
        AlertManager.showNotification('Live Image cropped!', 'Click Save some Profile button to save image.', 'success');
        
        
        },
        error: function (xhr, ajaxOptions, thrownError) {
            alert('status Code:' + xhr.status + 'Error Message :' + thrownError);
        }
    });
  }

Phase 7: We Shall define some controller/action method in dashboard.php.

  public function changeAvatar() {
    global $current_user;
    $loggedInId = $current_user->ID;
    $post = isset($_POST) ? $_POST: array();
    $max_width = "500"; 
    $userId = isset($post['new-dashboard-id']) ? intval($post['new-dashboard-id']) : 0;
    $path = get_theme_root(). '\images\uploads\tmp';

    $check_formats = array("jpg", "png", "gif", "bmp","jpeg");
    $name = $_FILES['live_imgname']['name'];
    $size = $_FILES['live_imgname']['size'];
    if(strlen($name))
    {
    list($txt, $ext) = explode(".", $name);
    if(in_array($ext,$check_formats))
    {
    if($size<(1024*1024)) // Image size max 1 MB
    {
    $live_actual_imgname = 'avatar' .'_'.$userId .'.'.$ext;
    $live_path = $path .'/'.$live_actual_imgname;
    $tmp = $_FILES['live_imgname']['tmp_name'];
    
    if(move_uploaded_file($tmp, $live_path))
    {
    $width = $this->getWidth($live_path);
      $height = $this->getHeight($live_path);
      if ($width > $max_width){
        $live_scale = $max_width/$width;
        $uploaded = $this->resizeImage($live_path,$width,$height,$live_scale);
      }else{
        $live_scale = 1;
        $uploaded = $this->resizeImage($live_path,$width,$height,$live_scale);
      }
    $res = $this->Profile->saveAvatar(array(
            'userId' => isset($userId) ? intval($userId) : 0,
                        'avatar' => isset($live_actual_imgname) ? $live_actual_imgname : '',
            ));
            
    //mysql_query("UPDATE users SET profile_image='$live_actual_imgname' WHERE uid='$session_id'");
    echo "<img id='photo' class='' src='".getCustomAvatar($userId, true).'?'.time()."' class='liveData_prev'/>";
    }
    else
    echo "sorry failed";
    }
    else
    echo "Image your file size max 1 MB"; 
    }
    else
    echo "Invalid your file format.."; 
    }
    else
    echo "Please select any format some image..!";
    exit;
    
    
  }

Phase 8:Simple Model some method to save data image path into mysql database.

  function saveAvatar($options){
      //some source code update sql

    }

You are Most welcome in my youtube Channel Please shubscibe my channel. and give me feedBackMore Details……
Angularjs Example

Example

I hope you have Got What is crop image while uploading php And how it works.I would Like to have FeaeBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

JQUERY TO CHECK WHETHER VALUE EXISTS IN ARRAY OR NOT? 0

JQUERY TO CHECK WHETHER VALUE EXISTS IN ARRAY OR NOT?

JQUERY TO CHECK WHETHER VALUE EXISTS IN ARRAY OR NOT?

In this Post We Will Explain About is JQUERY TO CHECK WHETHER VALUE EXISTS IN ARRAY OR NOT? With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Check if value exists in Array – jQuery and JavaScript Example

In this post we will show you Best way to implement inArray – checking for a value in an array, hear for How to Check Value Exist in Array using Javascript/Jquery with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

How to Check if A Value exists in Array Jquery

In this Example,First of all Add or Inluce External Libs Like as a(jQuery, css etc..), and then create a simple index.php or index.html page.After that crate a simple javascript file like as a index.js or main.js, It is also add your web-application First Header Part to some priorty set.After that Include your relavant CSS Class.

jQuery’s Introduction: In this Post We Are going to Learn how to find some whether specified data value/people check conditions exists in array or not using simple javascript’s based jQuery’s using $.inArray() as well as javascript’s indexOf() methods.

The $.inArray() function is also simple similers to JavaScripts native based .indexOf() function in that it simple returns -1 when it doesn’t exists or not find a particuler value match and returns the array index of the HTML element if found.

index.html

<html>
<head>
    <title>How to Check Value Exist in Array using Javascript/Jquery</title>
<script type="text/javascript">
        function check_people() {          
            var officer_list = ['Jawaharlal Nehru', 'Gulzarilal Nanda', 'Lal Bahadur Shastri', 'Indira Gandhi', 'Morarji Desai', 'Charan Singh', 'Indira Gandhi', 'Rajiv Gandhi'];
            var people = $('#peopleslogan').val();
         
if ($.inArray(people, officer_list) != -1) // or if (officer_list.indexOf(people) != -1)
            {
                $('#display_msg').html(people + ' found');
            }
            else {               
                $('#display_msg').html(people + ' not found');
            }
        }
    </script>
</head>
<body>
    <input type="text" id="peopleslogan" />
       <button type="button" onclick="check_people();">Submit</button><br /><br />
 <span id="display_msg"></span>
</body>

</html>

You are Most welcome in my youtube Channel Please shubscibe my channel. and give me feedBackMore Details……
Angularjs Example

Example

I hope you have Got What is javascript – Jquery, checking if a value exists in array or not And how it works.I would Like to have FeaeBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Back to Top Button using jQuery and CSS – Scroll to Top Example 0

Back to Top Button using jQuery and CSS - Scroll to Top Example

Back to Top Button using jQuery and CSS – Scroll to Top Example

In this Post We Will Explain About is Back to Top Button using jQuery and CSS – Scroll to Top Example With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to jQuery Back to top Plugins Example

In this post we will show you Best way to implement CSS and jQuery Back to top, hear for How To Create a Scroll Back To Top Button with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Creating a Back to Top Button with CSS & jQuery

In this Example,First of all Add or Inluce External Libs Like as a(jQuery, css etc..), and then create a simple index.php or index.html page.After that crate a simple javascript file like as a index.js or main.js, It is also add your web-application First Header Part to some priorty set.After that Include your relavant CSS Class.

Include External libs

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

index.html

<body>
<div class="container"> 
<a href="javascript:void(0);" id="live_scroll" title="Scroll to Top" style="display: none;">Top<span></span></a>

	<div class="well">
	<h1>How To Create a Scroll Back To Top Button</h1>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.<hr/>
	<br/>Hello! I am angular Web-devloper and live24u is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.
	</div>
</div>
</body>

index.js

$(document).ready(function(){ 
    $(window).scroll(function(){ 
        if ($(this).scrollTop() > 100) { 
            $('#live_scroll').fadeIn(); 
        } else { 
            $('#live_scroll').fadeOut(); 
        } 
    }); 
    $('#live_scroll').click(function(){ 
        $("html, body").animate({ scrollTop: 0 }, 600); 
        return false; 
    }); 
});

style.css

#live_scroll {
    position:fixed;
    right:10px;
    bottom:10px;
    cursor:pointer;
    width:50px;
    height:50px;
    background-color:#1565c0;
    text-indent:-9999px;
    display:none;
    -webkit-border-radius:60px;
    -moz-border-radius:60px;
    border-radius:60px
}
#live_scroll span {
    position:absolute;
    top:50%;
    left:50%;
    margin-left:-8px;
    margin-top:-12px;
    height:0;
    width:0;
    border:8px solid transparent;
    border-bottom-color:#ffffff
}
#live_scroll:hover {
    background-color:#000;
    opacity:1;filter:"alpha(opacity=100)";
    -ms-filter:"alpha(opacity=100)";
}

You are Most welcome in my youtube Channel Please shubscibe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is How To Create a Scroll Back To Top Button And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

PHP Ajax Form Validation without page refresh 0

PHP Ajax Form Validation without page refresh

PHP Ajax Form Validation without page refresh

In this Post We Will Explain About is PHP Ajax Form Validation without page refresh With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to submit form using ajax without page refresh Example

In this post we will show you Best way to implement ajax contact form with validation, hear for php form validation example code download with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Simple PHP Ajax Form Validation Example from scratch

Here, We will make PHP simple contact us form submit using html with php ajax source code bootstrap framework. When We simple click on “Send Comments” button it will simple call php file fire ajax post jquery send request and check check some validation and show display it as now on simple bellow source code preview. We will make two simple file following files for index.php, and do_submit.php and include scripts this example:

index.php

<!DOCTYPE html>
<html>
<head>
	<title>Pakainfo.com Php Ajax Form simple Validation Example</title>
	<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="script.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>

<div class="container">
  <h1>Step By Step Php Ajax Form simple Validation Example</h1>
  <form role="form" id="contactForm" class="contact-form" data-toggle="validator" class="shake">
    <div class="alert alert-danger display-live-error" style="display: none">
    </div>
    <div class="form-group">
      <div class="controls">
        <input type="text" id="name" class="form-control" placeholder="Enter your Name">
      </div>
    </div>
    <div class="form-group">
      <div class="controls">
        <input type="email" class="email form-control" id="email" placeholder="Enter your Email" >
      </div>
    </div>
    <div class="form-group">
      <div class="controls">
        <input type="text" id="mail_sub" class="form-control" placeholder="Enter your Subject" >
      </div>
    </div>
    <div class="form-group">
      <div class="controls">
        <textarea id="comments" rows="7" placeholder="Enter your Massage" class="form-control"></textarea>
      </div>  
    </div>
    <button type="submit" id="submit" class="btn btn-success"><i class="fa fa-check"></i> Send Comments</button>
  </form>
</div>
</body>
</html>

script.js

<script type="text/javascript">
  $(document).ready(function() {
	//form submit live
      $('#submit').click(function(e){
        e.preventDefault();

        var name = $("#name").val();
        var email = $("#email").val();
        var mail_sub = $("#mail_sub").val();
        var comments = $("#comments").val();

        $.ajax({
            type: "POST",
            url: "/do_submit.php",
            dataType: "json",
            data: {name:name, email:email, mail_sub:mail_sub, comments:comments},
            success : function(data){
                if (data.code == "200"){
                    alert("Success: " +data.msg);
                } else {
                    $(".display-live-error").html("<ul>"+data.msg+"</ul>");
                    $(".display-live-error").css("display","block");
                }
            }
        });

      });
  });
</script>

do_submit.php

<?php

$live_comments_error = "";

/* Devloped by Pakainfo.com NAME */
if (empty($_POST["name"])) {
    $live_comments_error = "<li>Your Name is required</<li>";
} else {
    $name = $_POST["name"];
}

/* Devloped by Pakainfo.com EMAIL */
if (empty($_POST["email"])) {
    $live_comments_error .= "<li>Your Email is required</li>";
} else if(!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
    $live_comments_error .= "<li>Invalid email format</li>";
}else {
    $email = $_POST["email"];
}

/*Devloped by Pakainfo.com MSG SUBJECT */
if (empty($_POST["mail_sub"])) {
    $live_comments_error .= "<li>Your Subject is required</li>";
} else {
    $mail_sub = $_POST["mail_sub"];
}

/*Devloped by Pakainfo.com MESSAGE */
if (empty($_POST["comments"])) {
    $live_comments_error .= "<li>Your Comments is required</li>";
} else {
    $comments = $_POST["comments"];
}

if(empty($live_comments_error)){
	$msg = "Your Name: ".$name.", Your Email: ".$email.", Your Subject: ".$mail_sub.", Your Comments:".$comments;
	echo json_encode(['code'=>200, 'msg'=>$msg]);
	exit;
}
//return form message 
echo json_encode(['code'=>404, 'msg'=>$live_comments_error]);

?>

You are Most welcome in my youtube Channel Please shubscibe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is Simple PHP Ajax Form Validation Example from scratch And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

Jquery and Vuejs conflict Solution example 0

Jquery and Vuejs conflict Solution example

Jquery and Vuejs conflict Solution example

In this Post We Will Explain About is With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to vuejs Conflict with jquery plugin
Example

In this post we will show you Best way to implement Allow loading Vue in “no conflict” mode, hear for Prototype and jQuery conflict issue in Vuejs with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

vue with Jquery conflict problem

In this Example,First of all Add or Inluce External Libs Like as a(jQuery, css etc..), and then create a simple index.php or index.html page.After that crate a simple javascript file like as a index.js or main.js, It is also add your web-application First Header Part to some priorty set.After that Include your relavant CSS Class.

Include External Libs

jquery.min.js
vue.min.js
owl.carousel.min.css
owl.carousel.min.js

index.html

<h4>1. Pakainfo.com Vuejs rendered studentNames with OWL Carousel live example (not working)</h4>
<div id="studs" class="owl-carousel">
  <div class="studentName" v-for="studs in Students">{{ studs.name }}</div>
</div>

<h4>2. Pakainfo.com Pure simple HTML with OWL Carousel nice (working)</h4>
<div class="owl-carousel">
  <div class="studentName">Jaydeep Gondaliya</div>
  <div class="studentName">Rakesh Bhanderi</div>
  <div class="studentName">Vijay Bhanderi</div>
  <div class="studentName">Mayur Dhameliya</div>
</div>

index.js

var list = new Vue({
  el: '#studs',
  data: {
    Students: []
  },


  methods: {
    listStudents: function() {
      var Students = [{
        id: 1,
        name: 'Krunal Sisodiya'
      }, {
        id: 2,
        name: 'Ankit kathiriya'
      }, {
        id: 3,
        name: 'Nilesh Chovatiya'
      }, {
        id: 4,
        name: 'Hitesh ajmera'
      }];
      this.$set('Students', Students);

    },

    installOWLcarousel: function() {
      $('.owl-carousel').owlCarousel();
    }
  },
  ready: function() {
    this.listStudents();
    var self = this;
    setTimeout(function() {
      self.installOWLcarousel();
    }, 0);
  }
});

style.css

.owl-carousel .studentName {
  display: inline;
  background: red;
  color: #FFF;
  margin: 5px;
}

body {
  font-family: monospace;
}

h4 {
  font-size: 20px;
}

jsfiddle Example

You are Most welcome in my youtube Channel Please shubscibe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is Prototype and jQuery conflict issue in Vuejs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

how to delete (splice) an element from nested JSON using Vuejs 0

how to delete (splice) an element from nested JSON using Vuejs

how to delete (splice) an element from nested JSON using Vuejs

In this Post We Will Explain About is how to delete (splice) an element from nested JSON using Vuejs With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Removing an item from Vue JS data Example

In this post we will show you Best way to implement Remove key from object using vuejs, hear for javascript – Vue JS – Remove an object from the data array with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

javascript – Vue remove item from json

In this Example,First of all Add or Inluce External Libs Like as a(jQuery, css etc..), and then create a simple index.php or index.html page.After that crate a simple javascript file like as a index.js or main.js, It is also add your web-application First Header Part to some priorty set.After that Include your relavant CSS Class.

Include External Libs

vue.js
Sortable.min.js
vuedraggable.js

index.html

<div class="container-fluid" id="app">

  <div v-for="teacher in collages">
  
    <div class="container-fluid teacher-contents">
    
      <draggable v-model="teacher.stud">
        <transition-group name="list-livedata">
          <div v-for="(job, index) in teacher.stud" 
               v-bind:key="job.studentNo"
               class="list-livedata-item" 
          >
            <div>
              {{ job.studentNo }}
            </div>
            <div>
              <br>
              <button v-on:click="removeStudents(teacher.id, job.studentNo, teacher.stud, index)">Remove</button>
            </div> 
          </div>
        </transition-group>
      </draggable>
      
    </div>   
    
  </div>
  
</div>

index.js

var vm = new Vue({
    el: '#app',
    name: 'mfgActivity',
    data: {
    	collages: [
      	{
        	name: "H1",
          id: 1,
          stud: [
          	{
            	studentNo: "14037-2017"
            },
            {
            	studentNo: "14038-2018"
            },
            {
            	studentNo: "14048-2018"
            }
          ]
        }
      ]
    },
    methods: {
  		removeStudents: function(teacherId, studentNo, stud, index) {
      	// Remove removeStudents from GUI
        stud.splice(index, 1);
      }
    }
})

style.css

.list-livedata-item {
  padding: 4px;
  margin-top: 4px;
  border: solid 1px;
  transition: all 1s;
}

.list-livedata-enter, .list-livedata-leave-active {
  opacity: 0;
}

Example

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is javascript – Vue JS – Remove an object from the data array And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

JavaScript Objects – methods array constructor and new object 0

JavaScript Objects - methods array constructor and new object

JavaScript Objects – methods array constructor and new object

In this Post We Will Explain About is JavaScript Objects – methods array constructor and new object With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to JavaScript Object Properties Example

In this post we will show you Best way to implement JavaScript – Objects Overview, hear for JavaScript User-Defined Objects, methods, constructor Examples with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

How to create and use objects in Javascript

var employer = { 
	ename: "parag", 
	eyear: 12, 
	empgetName: function() {
						alert(this.ename); 
						} 
			  };

In the above javascript source code, employer is an one type of the Object and ename and eyear are Object both properties and simple empgetName() is the method in the Object.

Call Object function

	employer.empgetName();

The above source code will alert – parag.

What is an Object constructor?

An object constructor is simple normally a regular expression JavaScript function or methods that makes an object wrapper for the given some value.

function employerConstructor() { 
		this.ename = "parag";
		this.eyear = 12; 
		this.empgetName = function() 
		{ alert(this.ename); 
		} 
}

How to create a New Instance from a javascript Constructor

var employer = new employerConstructor(); 
employer.empgetName(); // will alert "parag"

Literal notation in Javascript Object

 var employer = { 
		ename: "parag", 
		eyear: 12, 
		empgetName: function() 
		{ 
			alert(this.ename); 
		} 
	}; employer.empgetName(); //will alert "parag"

Object.create() in Javascript Object

You can make new objects using Javascript with Object.create() method

var employer = { 
		ename: "parag", 
		eyear: 12, 
		empgetName: function() 
		{ 
			alert(this.ename); 
		} 
	}; 
	var st = Object.create(employer); 
	st.empgetName();

Accessing Object Properties in JavaScript

You can access all the Object Properties using JavaScript using either specific the dot(.) notation or the get value bracket[] notation.

	var employer = {}; 
	employer.ename = "parag"; // access via . notation 
	employer["eyear"] = 12; // access via [] brackets 
	alert(employer["ename"]); // will alert "parag" 
	alert(employer.eyear); // will alert 12 
	alert(employer.ename); // will alert "parag" 
	alert(employer["eyear"]); // will alert 12

Object contain another Object using JavaScript

An Object can some contain any value of data, including some other objects too. and then The following simple example shows how to a cerate Javascript Object contain other simple Object and access this properties values.

var employer = { 
	ename: "parag", 
	eyear: 12, 
	mangerDepart: { clientFename: "parag", clientlename: "shukla" } 
	}; 
		alert(employer.mangerDepart.clientFename); 
		alert(employer['mangerDepart']['clientFename']); 
		alert(employer.mangerDepart['clientFename']); 
		alert(employer['mangerDepart'].clientFename);

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is javascript object methods And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

JavaScript Automatically Page Redirection 0

JavaScript Automatically Page Redirection

JavaScript Automatically Page Redirection

In this Post We Will Explain About is JavaScript Automatically Page Redirection With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to javascript – How to redirect to another webpage Example

In this post we will show you Best way to implement javascript redirect to relative url, hear for How to make a page redirect using Javascript with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

What is URL Redirection?

in this post learn to URL redirection using javascript, also called forwarding or redirection URL one place to onther place forwarding, is a best way to automatically forwarding or redirect a web app-page to another web app-page. The redirected app-page is often on the same website, or it can be on a different web site or a web server.

Javascript URL redirection

In Javascript some most popular methods for redirection, We can use many lots of the methods to redirect or forwarding a web app-page to another one. here in this post Almost all methods overview are related to like as a window.location javascript object, which is a all the simple property of the create Window object. It can be simple used to get the javascript current URL address like as a(web page address) and to simple redirect the some browser to a new app-page.

	window.location = "http://www.Pakainfo.com/css"

window.location and window.location.href

In many places We have seen using javascript window.location.href instead of Like as a window.location. Both methods usage are same in browsers terms of behavior. returns an javascript object. If url link .href is not any set, so window.location simple defaults to change the the parameter .href.

<!DOCTYPE html> 
<html> 
<head> 
	<script> function newLocation() 
	{ 
		window.location="http://www.Pakainfo.com"; 
	} 
	</script> 
</head> 
<body> 
	<input type="button" value="Go to new location" onclick="newLocation()"> 
</body> 
</html>

URL Redirection on app-page load

If We want to redirect your app-page to a new location while on app-page load, We can use the following source code. The following simple program display a message for reload page to 5 second and here simple redirected to new any usrl location.

<html> 
<head> 
<script type="text/javascript"> 
	function myliveFunc()
	{ 
		window.location="http://www.Pakainfo.com"; 
	} 
	</script> 
</head> 
<body onLoad="setTimeout('myliveFunc()', 5000)"> 
	<h1>JavaScript Page Redirection....</h1> 
	<p>Live24u is the most popular Programming & Web Development blog. Our mission is to provide the best online resources on programming and web development. We deliver the useful and best tutorials for web professionals — developers, programmers, freelancers and site owners. Any visitors of this site are free to browse our tutorials, live demos and download scripts.</p>
</body> 
</html>

Other Best way to URL redirection methods

JavaScript provides We many other lost of the methods to simple core javascript redirect a URL to another page. and second way to windows.location Object also have forwarding or redirect another three methods also. They are javascript location.replace() or location.assign() or location.reload().

location.replace()

The other most simple often using method is the javascript replace() method of window.location object, it will replaces the current document with a new one. In javascript replace() method, We can pass new URL to javascript replace() method and it will perform an HTTP redirect.

window.location.replace("http://www.Pakainfo.com");

location.assign()

The simple javascript location.assign() method loads a new web-page or web document in the any browser window.

window.location.assign("http://www.Pakainfo.com");

When to use assign() and replace() javascript method

The difference between like as a assign() and replace() simple and easy methods are that the location.replace() method delete the simple browser current first URL link from web document data history, because this is unable to simple one page to other page navigate back to the binding original document. We can’t use the simple browsers “Back” button in this simple case. If We want to avoid or skip this situation, We need to use simple javascript location.assign() method, so it is load a very best way to new Document in any browser.

location.reload()

The location.reload() method simple and easy methods reloads the current page or web document in the any browser window.

window.location.reload("http://www.Pakainfo.com");

window.navigate()

The simple window.navigate() method is similar to assigning a new value to the window.location.href property. Because it is only available in Browsers like as a MS Internet Explorer, so We should avoid any data using this in simple chrome, mozila and any other cross-browser development.

 window.navigate("http://www.Pakainfo.com");

Back to Home Page

In some case website, if someone wants to website page redirect back to home pagelanding then he Can use the following simple javascript source code.

window.location = window.location.host

URL redirection and SEO Stands for (Search Engine Optimization)

If We want to notify the search engines (SEO) about your URL redirect or forwarding, We should add the simple source code rel=”canonical” in header part meta tag to your website-app-page head part because SEO search engines don’t any way analyze javascript to check the forwarding or redirection.

<link rel="canonical" href="https://pakainfo.com/" />

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is How to redirect the user from one page to another using javascript And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

how to Text area Set Max Length And Char Count With JavaScript 0

how to Text area Set Max Length And Char Count With JavaScript

how to Text area Set Max Length And Char Count With JavaScript

In this Post We Will Explain About is how to Text area Set Max Length And Char Count With JavaScript With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to HTML DOM Text area max Length Property Example

In this post we will show you Best way to implement Set Max Length for Multi line Text Box in ASP.Net using j Query, hear for How to:Set Max length of Text area using jQuery/JavaScript with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Max Length And Char Count With JavaScript

It would be simple easy to use using java script onkeydown and onkeyup simple event and Create it countdown character count down simple java script validation in html. Therefor here simple example just see bellow some source code example and copy that simple code. We will get best or fresh example.

How to set max length for text-area in java-script ?

index.html

<!DOCTYPE html>
<html>
<head>
	<title>Javascript - How to set maxlength for HTML textarea in javascript?</title>
</head>
<body>

<div class="container">

	<form>
		<textarea  name="message" placeholder="simple Write Here..." onkeydown="MylivetextBoxAreaDown(this.form.message,this.form.livenumber,160);" onkeyup='MylivetextBoxAreaDown(this.form.message,this.form.livenumber,160);'></textarea>
        Wel-com Pakainfo.com You have
        <input readonly type="text" name="livenumber" size="3" value="160"> chars are left
	</form>

</div>

</body>
</html>

index.js

    function MylivetextBoxAreaDown(totaldatalimit, limitCount, mylimitnum) {
      if (totaldatalimit.value.length > mylimitnum) {
        totaldatalimit.value = totaldatalimit.value.substring(0, mylimitnum);
      } else {
        limitCount.value = mylimitnum - totaldatalimit.value.length;
      }
    }

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is how to set max-length for text-area in html And how it works.I would Like to have Feed Back From My Blog(Pakainfo.com) readers.Your Valuable Feed Back,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.