473,395 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

javascript with master page

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
3 1493
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim | last post by:
I've been working on this for over a week now, and just can't get this figured out. Hoping one of you gurus can help me out here. I have an xml data island that I'm representing on an htm page as...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
4
by: Greg | last post by:
I'm guessing the problem I'm having has something to do with Master Pages or DetailsView because the exact same code works fine on a page without a Master Page and DetailsView controls. The...
2
by: Jianwei Sun | last post by:
Hi, Dear guru, I have a question on embed a javascript into the master page. I put the following line <link runat="server" type="text/javascript" href="~/column.js" /> under the head, but...
1
by: rockdale | last post by:
Hi, I have a page which use a masterpage. And I put a javascript in this page like below: <%@ Page Language="C#" MasterPageFile="~/SITE.master" CodeFile="TEST.aspx.cs" Inherits="TEST_aspx"...
8
by: Frank | last post by:
Hi, I am working with VS.NET 2005 Ultimately, I wish to call a JavaScript function from a .js file
3
by: Fresno Bob | last post by:
I have a page which is a master page. I want to trigger a Javascript function in the onload event of the body. Simply attaching an onload event to the body which points to javascript function...
5
by: gnewsgroup | last post by:
I know AjaxControlToolKit has a popup calendar control. It does not seem to have a year navigation option. In other words, if I wanna select a date in 1012, I will have to navigate to that year...
2
Frinavale
by: Frinavale | last post by:
I am attempting to use embedded resources in an Ajax Enabled ASP.NET Web Application. I'm using Visual Studio 2008 and VB.NET server side code. The project is called "EmbeddedResources" with the...
5
by: =?Utf-8?B?TWF0Y29u?= | last post by:
Hello, I have a asp.net 2.0 (vb.net) page, which uses a master page, and there is a javascript function (myfunction) defined in the <headof that master page. Is there a way to run the function...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.