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,

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

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

Top