Hello,
I want to pass a RecordID to a child Window and then I want that child window to use this RecordID in the document ready function to load the rest of the form.
This is how I call the child window:
On the server side, I'm able to set the RecordID in a Textbox (let's call it tbRecordID). This is where it gets more complicated.
Usually, in order to get the tbRecordID value, you whould just get it directly using it's id in the order.aspx document ready function:
However, this won't work if you allow users to open more than one instance of the same window (ex: lets say the the user want to see order 1, 17 and 53 side by side) because this would create an id conflict.
So the only option I can see for now is to add a class to the tbRecordID and the refer to it from the "loaded" window with a jQuery search.
So, is there a way to get a reference to the window that is behing loaded?
Or maybe there is an other way to achieve what I'm trying to do in the document .ready function?
Best regards,
Simon
I want to pass a RecordID to a child Window and then I want that child window to use this RecordID in the document ready function to load the rest of the form.
This is how I call the child window:
window.kendoWindow({
content: {
url:
"order.aspx"
,
data: {
RecordID: 1234
}
}
});
On the server side, I'm able to set the RecordID in a Textbox (let's call it tbRecordID). This is where it gets more complicated.
Usually, in order to get the tbRecordID value, you whould just get it directly using it's id in the order.aspx document ready function:
$(document).ready(
function
() {
myRecordID =
$(
"#tbRecordID"
).val();
//load components for myRecordID...
});
However, this won't work if you allow users to open more than one instance of the same window (ex: lets say the the user want to see order 1, 17 and 53 side by side) because this would create an id conflict.
So the only option I can see for now is to add a class to the tbRecordID and the refer to it from the "loaded" window with a jQuery search.
$(document).ready(
function
() {
var
targetWindow =
//I need a way to get a reference to the target window
var
myRecordID = targetWindow.find(
".RecordIDClass"
).val();
//load with myRecordID
});
So, is there a way to get a reference to the window that is behing loaded?
Or maybe there is an other way to achieve what I'm trying to do in the document .ready function?
Best regards,
Simon