By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,478 Members | 1,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,478 IT Pros & Developers. It's quick & easy.

javascript with master page

P: n/a
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,resiza ble=yes,";
s+= "left=200,top=100,width=500,height=400";
var OpenWindow = null;
var
msgSolutionGroup="rpt_message.aspx?strParm01=FindI nterlockDefinition&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>
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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?
"sck10" <sc***@online.nospam> wrote in message
news:5D**********************************@microsof t.com...
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,resiza ble=yes,";
s+= "left=200,top=100,width=500,height=400";
var OpenWindow = null;
var
msgSolutionGroup="rpt_message.aspx?strParm01=FindI nterlockDefinition&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>

Nov 18 '05 #2

P: n/a
Hi Sck10,

As for the calling script function error in asp.net 2.0 page you mentioned,
I think we should do some tests to narrow down the problem first. Since you
mentioned that the page is using a master page, where do you put your
script function or global variable's definition?
You can try testing use a simple javascript function and call it to see
whether there is any problem and put some complex code step by step to find
the problem.

In addition, since we can use the "View Source" option in IE to view the
page's client side rendered html source, you can also have a look there to
see how the acutal html output is.

If have any further findings, please also feel free to post here.

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.)

Nov 18 '05 #3

P: n/a
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.)

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.