jQuery Selector Example
by survivant
HTML
<form id="landingPageForm" action="/simulation-web/student/landingpage/save" method="post">
<input id="idstudent" name="idstudent" type="hidden" value="580cb8237aa75e3bfc1e1a53"/>
<input type="hidden" id="updateKeywordList" name="updateKeywordList" />
<div class="sideBySide">
<div class="panel panel-default">
<div class="row">
<div class="form-group col-md-10">
<label for="inputname"><pre>When consumers click on your ad, they will "land" on a specific page within your website. That is called a LANDING PAGE.
<p>
You don't want to send all your clients to the same page. Ideally, you want consumers to land on a page that has the same content as the ad they've just clicked on. Having the right content on your landing page ensures a smooth transition for consumers. Just imagine if a consumer who is looking for "clowns" on Gougel clicks on your ad and then lands on a page that highlights your award-winning popcorn stand. That wouldn't make much sense would it now? The consumer would probably just leave your site and you wouldn't get the conversion you are working so hard to obtain. Make sure you provide a consistent customer experience that is relevant to your consumers' needs and you will increase your conversion rate.
<p>
When naming your landing page, use something that will be easy for you to remember. The name you choose has absolutely no impact on your campaign's results so keep the name short. It doesn't cost you anything to create landing pages. You can have as many as you want, but you need at least one. How you position the page depends on how often key content comes up. For example, if you choose "clowns", "carousels" and "popcorn" then the page will present your park by focusing on clowns, carousels and popcorn. If you choose "clowns", "carousels", "clowns", "clowns" and "popcorn" then the page will present your park by focusing mainly on clowns but also on carousels and popcorn. The order in which you position the keywords has no...
JavaScript
$(document).ready(function () {
console.clear();
$("#UpdateRecord").click(
function () {
submitJSON();
}
);
});
function submitJSON() {
var lignes = [];
$('.disabledLP').each(function (lineIndex) {
//console.log("this=" + $(this).html());
var items = [];
//console.log("lineIndex="+ lineIndex + " " + $('[name=name]').eq(lineIndex).val());
//console.log("lineIndex="+ lineIndex + " " + $('[name=keyword1]').eq(lineIndex).val());
//console.log("lineIndex="+ lineIndex + " " + $('[name=keyword2]').eq(lineIndex).val());
var ligne = [];
ligne.push($('[name=name]').eq(lineIndex).val());
ligne.push($('[name=keyword1]').eq(lineIndex).val());
ligne.push($('[name=keyword2]').eq(lineIndex).val());
ligne.push($('[name=keyword3]').eq(lineIndex).val());
ligne.push($('[name=keyword4]').eq(lineIndex).val());
ligne.push($('[name=keyword5]').eq(lineIndex).val());
//items.push(studentid);
var json = JSON.stringify(ligne);
console.log(json);
lignes.push(ligne);
}) ;
var jsonLignes = JSON.stringify(lignes);
console.log(jsonLignes);
//alert("submitJSON");
var items = [];
var jsonData = items;
$("#updateKeywordList").val(jsonData);
//alert($("#updateKeywordList").val());
};