Jump to content
php.lv forumi
Edvards Rubens

JavaScript iframe

Recommended Posts

Sveiki, es esmu samērā iesācējs js un būtu labi, ja man palīdzētu ar vienu problēmu, man vajag tā, lai izveidoto query linku izpilda tajā pašā lapā ar to pašu linku nekur nepārmetot, un vai to nevar izveidot ar iframe?

$("#create_query").click(function () {
    var query_str = "";
    
    query_str = "https://" + $("#env").val() + ".epower.amadeus.com/" + $("#portal_code").val();
    var parameters = "/#FlightType=" + $("#flight_type").val() + "&From=" + $("#from").val() + "&To=" + $("#to").val() + "&Page=Result" + "&QFrom=" + $("#q_from").val() + "&QTo=" + $("#q_to").val() + "&DepartureDate=" + $("#departure_date").val() + "&DepartureTime=" + $("#departure_time").val() + "&ReturnDate=" + $("#return_date").val() + "&ReturnTime=" + $("#return_time").val() + "&IsCalendarSearch=" + $("#mp_calendar").val() + "&Method=Search";

    var my_string = "";

    $('#search_form_table input,#search_form_table select').each(function () {
        if (($(this).attr('name') != "") && ($(this).attr('name') != "undefined") && ($(this).val() != "") && ($(this).attr('name') != "env") && ($(this).attr('name') != "portal_code"))

        my_string = my_string + $(this).attr('name') + "=" + encodeURIComponent($(this).val()) + "&";
        //   $(this).attr('type');
        //   $(this).attr('name');
        //   $(this).val();
    });

    var query_string = query_str + "/#" + my_string + "Method=Search";
    $("textarea#flight_query").val(query_string);
});

$('#create_query').click(function () {
    window.open($("#flight_query").val(), '_blank');
});


Un ir viena ķible pievienojot lapai bootstrap jQuery šis skripts vairāk nefunkcionē, kur varētu būt problēma?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×