javascript with master page

G

Guest

Hello,

I am using asp.net 2.0. I have an asp.net page that uses JavaScript to open
a popup window. When I use the JavaScript with a content page that has a
MasterPage, I get a "return" error associated with the JavaScript. I would
prefer to keep the JavaScript in the ContentPage, but how would I do so?

Thanks in advance, sck10


Example of page that works
===================
<head>
<script language="JavaScript">
var t="_blank";
var s="toolbar=no,directories=no,scrollbars=yes,resizable=yes,";
s+= "left=200,top=100,width=500,height=400";
var OpenWindow = null;
var
msgSolutionGroup="rpt_message.aspx?strParm01=FindInterlockDefinition&strParm02=SolutionGroup";
</script>

</head>
<body>
<form id="form1" runat="server">
<table border="0" cellpadding="2" cellspacing="0" width="400"
bordercolor="#000000">
<tr>
<td width="200"><div align="left"><img
src="../../images/cmd_bullet1_blue.gif" width="8" height="8">
<a href="#PopUp" onclick="window.open(msgSolutionGroup,t,s);return
false">JavaScript</a></div></td>
</tr>
</table>
</form>
</body>
</html>
 
R

Random

What about the code that doesn't work? Can you show us that?

Specifically, which peice are you putting in the <asp:Content /> peice, and
what are you putting in the Master page?
 
S

Steven Cheng[MSFT]

Hi Sck10,

Any progress or update on this issue? If there're anything else we can
help, please feel free to post here. Thanks.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Joined
Sep 10, 2007
Messages
2
Reaction score
0
Asp.Net Master page - Javascript popup in from content page

[<a href="JavaScript:eek:penLookup('displayname','textBoxInstValidatorName',
document.form1.textBoxInstValidatorName.value,'');"> Lookup</a>]
I have above hperlink tag in aspx page and works fine.
I added master page to solution and covented the existing pages are content pages. How to convert "document.form1.txtBox.value" in the content page?
 
Joined
Sep 10, 2007
Messages
2
Reaction score
0
Asp.Net Master page - Javascript popup in from content page

In my code I open one content page as pop up from another content page and also passing some values. When I try to send back result data to parent window from popup window, controls are not identified.

code in popup:
window.opener.document.forms(0).elements[arTextBoxes].value = arValues;

error:
window.opener.document.forms[...].elements.[...] is null or not an object

I appreciate someone can give the possible solution.

Thank you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top