Jump to content
php.lv forumi

JavaScript iframe


Edvards Rubens

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...