Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JSON - Bind variable for dynamic URL

0 votes
6 views
added Feb 14 in API by LC Marshal Lieutenant (14,830 points)
edited Jul 13 by LC Marshal
var asset = select_asset,  
    property_type = $('#property_type option:selected').val(),
    sub_type = $('#sub_type option:selected').val(),
    block = $('#block').val(),
    level = $('#level').val(),
    built_up = $('#built_up').val(),
    built_up_nl = $('#built_up_nl').val(),
    land_area = $('#land_area').val(),
    username = $('#username').val(),
    email = $('#email').val(),
    contact = $('#contact').val(),
    submitUrl = '';

    submitUrl = "https://google.com/add";
    submitUrl += "?asset_id="+asset;
    submitUrl += "&property_type="+property_type;
    submitUrl += "&sub_type="+sub_type;
    submitUrl += "&block="+block;
    submitUrl += "&level="+level;
    if (property_type == 'l'){
      submitUrl += "&built_up="+built_up;
    }
    else {
      submitUrl += "&built_up="+built_up_nl;
    } 
    submitUrl += "&land_area="+land_area;
    submitUrl += "&username="+username;
    submitUrl += "&email="+email;
    submitUrl += "&contact="+contact;
    submitUrl += "&state="+ select_state;

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...