I am trying to send data using jQuery in an asp.net application to a popup.
If the popup opens, I get three errors. First mistake:
Errror: the value of the property is null or undefined not a function object
(error code [code is on the pop-up site]: http://www.suckmypic.net/26449/e65f2d77.png, original code [code is on the pop-up site]: http://www.suckmypic.net/26450/ 7dfdf013.png)
then I get two errors
private functions that are included correctly.
Then - if I reload the popup, everything works fine.
I open a popup as follows:
$.post('popup.aspx', { X: $("#X1").val(), XX: varX, XXX: varXY, Z: varZ}, function (result) { hWndHelp = window.open('', 'help', cStyle); hWndHelp.focus(); hWndHelp.document.open(); hWndHelp.document.write(result); hWndHelp.document.close(); });
(it is stored in the function that I call when I press f1, which works fine)
I link to the main page and in the popup window all my functions and the jquery library.
Edit
Code for cStyle
var:
var WIN_STYLE_RESIZE = 'resizable = yes, ' + 'status = yes, ' + 'scrollbars = yes'; var cStyle = WIN_STYLE_RESIZE + ', ' + 'width = ' + w + ', ' + 'height = ' + h + ', ' + 'top = ' + y + ', ' + 'left = ' + x;
(w, h, y, x are calculated numbers based on window size)
If I change it just to 'width=600,height=400'
, the error still occurs.
If I send my variables via get
, it also works, but I need to hide the variables in the URL.
Working get method:
var getUrl = "popup.aspx?X="+$('#X1').val()+"&...."; hWndHelp = window.open(getUrl, 'help', cStyle);
Other Editing: Just tried chrome and firefox - no errors there. But I need code to work with IE .