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="JavaS cript">
var t="_blank";
var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
s+= "left=200,top=1 00,width=500,he ight=400";
var OpenWindow = null;
var
msgSolutionGrou p="rpt_message. aspx?strParm01= FindInterlockDe finition&strPar m02=SolutionGro up";
</script>
</head>
<body>
<form id="form1" runat="server">
<table border="0" cellpadding="2" cellspacing="0" width="400"
bordercolor="#0 00000">
<tr>
<td width="200"><di v align="left"><i mg
src="../../images/cmd_bullet1_blu e.gif" width="8" height="8">
<a href="#PopUp" onclick="window .open(msgSoluti onGroup,t,s);re turn
false">JavaScri pt</a></div></td>
</tr>
</table>
</form>
</body>
</html> 3 1501
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.n ospam> wrote in message
news:5D******** *************** ***********@mic rosoft.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="JavaS cript"> var t="_blank"; var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,"; s+= "left=200,top=1 00,width=500,he ight=400"; var OpenWindow = null; var msgSolutionGrou p="rpt_message. aspx?strParm01= FindInterlockDe finition&strPar m02=SolutionGro up"; </script>
</head> <body> <form id="form1" runat="server"> <table border="0" cellpadding="2" cellspacing="0" width="400" bordercolor="#0 00000"> <tr> <td width="200"><di v align="left"><i mg src="../../images/cmd_bullet1_blu e.gif" width="8" height="8"> <a href="#PopUp" onclick="window .open(msgSoluti onGroup,t,s);re turn false">JavaScri pt</a></div></td> </tr> </table> </form> </body> </html>
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.)
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.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 an
expandable menu. Got that working, but now I need to add sorting and
searching abilities to the menu. I am hoping to do this with xsl but
can't get it to work.
Is this because of the way I've formed my xml, having the children
within the...
|
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 a problem (some minor errors) but we
run into trouble when we're trying to insert a converted page into a master
page content-placeholder.
The original page has some Javascript in it which ofcourse references to
controls in a form in the page....
|
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 problem is, when the javascript fires on the txtDateRequiredOut TextBox
in IE, I get "Error on Page" in the status bar and the error says: "Object
Expected". Viewing the source of the page while running shows a link created
properly for the linked...
|
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 obviously, it's not called anywhere.
|
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" Title="TEST Javascript" %>
<script type="text/javascript" language="javascript">
DOING SOMETHING WITH OBJECTS THAT EXIST ONLY IN TEST PAGE
BUT NOT IN MASTER PAGE
| |
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
|
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 causes a javascript error
(Object not found on line 0). I read that ASP.net does not like you doing it
this way so I was looking at the ClientScript.RegisterClientScriptBlock.
This doesn't write anything. I have tried putting it in the page load event...
|
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 monthly
--- dozens of clicks in a row!
I prefer the free javascript popup calendar at
http://www.mattkruse.com/javascript/calendarpopup/
I tried it out. It works perfectly if I simply do it in a traditional
|
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 namespace "EmbeddedResources"
My resources are not included when the content is rendered in the browser.
I have marked my JavaScript resource as Embedded. I am able to retrieve the path to the resource from the WebResource.axd HTTP Handler during...
|
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 from the page load event of the page?
I am able to run the function when there is a change in, say, a text box, by
adding the following to the page load event:
TextBox.Attributes.Add("onChange", "javascript:myfunction()")
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |