Question

In my parent window (list page) there are multiple rows which represents individual person. beside each persons name there is icon which hyperlinks to the "change status" page.

the requirement is when clicking on the icon a popup page will open where the status of that person can be edited.

I have created the popup but the problem is i cant pass the value in popup screen. so the popup page is not having value for that particular person.

previously the change status page was not in popup. the following code was used to open the change status page from list page (which is now parent screen)

<a class="hover-glow"
                                        data-placement="bottom" rel="tooltip"
                                        title="change status"
                                        data-bind="attr: { 'href': 'update-status_popup.aspx?i=' + Id + '&c=' + StatusId }">
                                       <i class="icon icon-random"></i>
                                    </a> 

I have now replaced code by

<a href="javascript:popUp('update-status_popup.aspx')" >
                                       <i class="icon icon-random"></i>

                             </a>

by this code i can open the change status page in a popup screen but i cant pass the value. to pass the value i have tried the following code

 <a href="javascript:popUp('update-status_popup.aspx?i=' + Id + '&c=' + StatusId')" >
                                       <i class="icon icon-random"></i>

                             </a>

and

   <a href="javascript:popUp('update-status_popup.aspx?i='" + Id + "'&c='" + StatusId"')" >
                                       <i class="icon icon-random"></i>

                             </a>

If I apply any of the last two codes the popup screen doesn't open.

how can I make this work.

The javascript code for creating the popup screen is like following

  function popUp(URL) {
        day = new Date();
        t = day.getTime();
        eval("page" + t + " = window.open(URL, '" + t + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 560,top = 240');");
    }
Was it helpful?

Solution

Instead of sending data like you shown,you can try session..

 Session["i"] = id;
 Session["c"] = StatusId;

You can access this in your page load of the popup..

string a=Session["i"].tostring();
string b=Session["c"].tostring();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top