|
We decided to just turn the app into a webpage and put it on the server with the data. In my opinion, this way is cleaner anyways.
If anyone has an answer for the original question, feel free to post anyways. I don't need it anymore for this project, but someone else might.
|
|
|
|
|
I try to execute this code(I place it between the head tags):
$(document).ready(function () {
alert("document ready occurred!");
});
$(window).load(function () {
alert("window load occurred!");
});
none of the functions is executed and I can't see any message box. What can be the reason and how can I fix it?
*I have references to the jquery libary in the page's master.
|
|
|
|
|
Have you placed in inside script tags?
<script>
$(document).ready(function () {
alert("document ready occurred!");
});
$(window).load(function () {
alert("window load occurred!");
});
</script>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If you are using master pages, then the page you are running the script on doesn't have a head section????
have you tried placing the script at the beginning on the content block in a set of script tags?
|
|
|
|
|
Well, the code you have listed works fine;
I have just set up a fresh asp.net project and this works fine when the code is placed in a script block with the HeadContent content block as shown below;
Master Page
<%@ Master Language="VB" AutoEventWireup="false" CodeFile="Site.Master.vb" Inherits="Site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<div class="page">
<div class="header">
<div class="title">
<h1>
My ASP.NET Application
</h1>
</div>
<div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
</div>
<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>
<asp:MenuItem NavigateUrl="~/Default2.aspx" Text="Default2" Value="Default2">
</asp:MenuItem>
</Items>
</asp:Menu>
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
</form>
</body>
</html>
Content Page
<div class="signature">Dave
Find Me On: <a href="http://bit.ly/DMAweb" target="_blank">Web</a>|<a href="http://on.fb.me/daveauld" target="_blank">Facebook</a>|<a href="http://bit.ly/DMAtwt" target="_blank">Twitter</a>|<a href="http://linkd.in/DMAlnk" target="_blank">LinkedIn</a>
<hr>Folding Stats: <a href="http://fah-web.stanford.edu/cgi-bin/main.py?qtype=teampage&teamnum=11561">Team CodeProject</a></div>
|
|
|
|
|
it's exactly what I did and it still doesn't work...
|
|
|
|
|
To include in your web app, cut-and-paste(replace
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
)
with
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
If it works then your jQuery path is not ok. Please let me know your result.
modified on Tuesday, June 21, 2011 6:25 PM
|
|
|
|
|
|
Just as a side question to this reply: I was wondering why you said NOT to self-close the script tag? Is that particular to asp pages or a certain DOCTYPE or anything to do with jquery. I am just learning and have not seen that mentioned before....thanks.
michael judy
vbmike@hotmail.com
"He's ALIVE, Jim. Where did I go wrong?"
|
|
|
|
|
|
Ok, thanks, I'll keep an eye out. I always try and test in all the major browsers before release so hopefully I will catch things like this.
MJ
michael judy
vbmike@hotmail.com
"He's ALIVE, Jim. Where did I go wrong?"
|
|
|
|
|
guys;
i am learning jquery and i am stuck in a tutorial that uses xml to make an ajax asynchronous call-back. what i have is:
$.post("Default.aspx", { rating: $(this).html() }, function(xml) {
$("#rating").html(
"Thanks for rating, current average: " +
$("average", xml).text() +
", number of votes: " +
$("count", xml).text()
);
});
the problem is that $("average", xml).text() and $("count", xml).text() return empty strings althoug xml equals to "<ratings><average>2</average><count>1</count></ratings>" .
what could the problem be?
Help people,so poeple can help you.
|
|
|
|
|
The problem was that i shoud add the header 'Content-type: text/xml' to the response object before i can write to it (End of Speech).
Help people,so poeple can help you.
|
|
|
|
|
I am a begginer asp.net developer and now I want to learn about some client-side langauages.
I'm a liitle familiar with javascript, and I want to start learning Jquery. Is it OK if I learn only Jquery instead of javascript? do I have to know javascript well before starting my javascript lessons?
|
|
|
|
|
You really should know at least a little about JavaScript and the DOM to work with jQuery.
|
|
|
|
|
I agree, knowledge of JavaScript and CSS is a prerequisite for jQuery. But, most of the references I've seen bring this instruction along a part of the tutorial. Take a look at jQuery Fundamentals. Also, there are free sample chapters available for jQuery: Novice to Ninja, which is a really well written intro.
|
|
|
|
|
You should have to little bit knowledge of java script and css
Atul Kumar
|
|
|
|
|
JQuery is a JavaScript library. If you want to understand what it does and how it does it, for debugging or knowledge, then you must understand JavaScript.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I advise you to start with the tutorials for Javascript first before moving to JQUERY.
Maybe you can start with the following link:
http://www.w3schools.com/[^]
It contains JQuery tutorials as well
|
|
|
|
|
Better you start from here and here
modified on Wednesday, June 22, 2011 3:31 AM
|
|
|
|
|
|
JQuery is to JavaScript what MFC is to C++, you cannot really learn MFC without knowing a bit of C++, it applies to JQuery as well.
|
|
|
|
|
Hi All
One ASP application is deployed on windows server 2003 sp2 and running fine
but when I deployed the copy of it on other server ie windows server 2003r2 it is givng error object expected
some dll's are to be registered which i registered
default page gets displayed but when trying to login after login menu doesn't get displayed which are created through some java script functions which are written in .inc file
Pls give some suggestions to resolve
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
code snippet required with offending line that is raising the exception would help!
|
|
|
|
|
dim rsLogin,strErrMsg
if len(Request.Form("cmdLoginSubmit"))>0 then
strLogin = trim(Request("strLogin"))
strPassword = trim(Request("strPassword"))
set rsLogin = Server.CreateObject("ADODB.Recordset")
error on webpage is
Microsoft VBScript runtime error '800a01a8'
Object required: 'rsLogin'
/Clp/Login.asp, line 135
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|