Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. jquery modal return value

jquery modal return value

Scheduled Pinned Locked Moved JavaScript
javascriptquestionworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fififlowertot
    wrote on last edited by
    #1

    have a jquery on my aspx page which loads a seperate aspx page through iframe inside a jquery modal. I am passing the the value of a textbox to the jquery-modal. Now I have a gridview in modal popup and evrytime i select a row I want to return those values back to base(parent page and populate some textboxes with gridview row in modal. I am unable pass values back to base page. my jquery is as below:-

    $(function() {
    /* Modal Dialog Box Configuration */

        $("#addForm").dialog({
    
            autoOpen: false,
            modal: true,
            width: 500,
            scroll: true,
            overlay: {
                "background-color": "#000",
                "opacity": "0.5",
                "-moz-opacity": "0.5"
            }
        });
    
    
    
        $("#btnAddSession").click(function(event) {
            var url = "Result.aspx?key=" + encodeURIComponent($("#<%= txtSearch.ClientID %>").val());
            alert(url);
            $("#popup").attr("src", url);
            $("#addForm").dialog("open");
    
           //event.preventDefault();
    
            return false;
        });
    
    });
    

    my div is as below:-

    <div id="addForm" title="Dialog Title" >

    <iframe id="popup" width="480"></iframe>
    </div>

    This opens the new aspx in the jquery modal and passes the value of textbox which i access serverside to perform my search and bing to gridview. But unable to pass values back to base page.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups