Solved

Website form does not load properly

Posted on 2012-03-22
9
215 Views
Last Modified: 2012-06-27
screen shot of errorsHello All,

Lets start by saying I'm very new to this.  Attempting to build a site in visual web developer 2010 express.  I downloaded a template to help me get started.  I made a site.master which seems to work OK for now.. I think.   In the root directory there is a Account folder, which is auto set to user has to be logged into see.  In this account folder I made a page named Login.aspx using the master site.  But when I click view in brower I get a debugger..


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	TemplateAccess.com Theme
</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link href="../style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<!-- Custom -->
<script type="text/javascript">
    $(function () { $('.search span').css({ 'border-radius': '5px' }); });
</script>
<!-- Cufon -->
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/myradpro.font.js"></script>
<script type="text/javascript">
    Cufon.replace('h1')('h2')('h3')('h4')('.menu a')('.rss a.big');
</script>
<!-- flash script -->
<script type="text/javascript" src="js/flash_detect.v1.7.js"></script>
    
</head>
<body>
    <form method="post" action="Login.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMjc1NzM5ODcwD2QWAmYPZBYCAgMPZBYCAgEPZBYCAgEPZBYCZg9kFgICDQ8QDxYCHgdDaGVja2VkaGRkZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFK2N0bDAwJENvbnRlbnRQbGFjZUhvbGRlcjEkTG9naW4xJFJlbWVtYmVyTWUtopE5UF8v2072Wbr69kUTTvfcmXhAfy+X5aFhpvD+NA==" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]> 

Open in new window

0
Comment
Question by:solarissf
  • 5
  • 4
9 Comments
 
LVL 38

Expert Comment

by:Tom Beck
Comment Utility
It looks like all of the errors have to do with javascript includes.

If Account is your root directory and you are opening Login.aspx from there then it must have a directory inside of it called js which contains your javascript include files: cufon-yui.js, jquery-1.3.2.min.js, myradpro.font.js, and flash_detect.v1.7.js.

If it's not arranged like that then that would explain all of those errors.
0
 

Author Comment

by:solarissf
Comment Utility
the Root directory has the Folder js.
Since this new page is in the folder Account, how do I tell it to look in the root directory for folder js?

Thanks!!!
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
Comment Utility
For each of your javascript includes sources, do this:

src="../js/jquery-1.3.2.min.js"

That's a dot dot slash to tell the browser to go up one level to the root, then look for the js folder.

This may also work:

src="~/js/jquery-1.3.2.min.js"

Tilde slash
0
 

Author Comment

by:solarissf
Comment Utility
dumb question... but where do I see this info to make the changes?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 38

Expert Comment

by:Tom Beck
Comment Utility
Any place in the markup where you are including an external file like here, line 7:

<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
0
 

Author Comment

by:solarissf
Comment Utility
I see code in the site.master... but if I change that area, then the default page gives me those same errors
0
 

Author Comment

by:solarissf
Comment Utility
the markup for account/login.aspx has only this.

so all that code is in the master... and I cant change the master correct?
So how do I put the info on this page to point to the right around

sorry for all the beginner questions..

<%@ Page Title="" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeFile="Members.aspx.cs" Inherits="Account_Members" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>
        Welcome to the Members Only Page!!!!</h1>
</asp:Content>
0
 
LVL 38

Expert Comment

by:Tom Beck
Comment Utility
Is this line in your site.master or on the default page?

<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>

It should work either way. The site.master is in the same directory as Default.aspx and Login.aspx, correct?

If not, correct this map:

js (folder)
Account (folder)
    Login.aspx
    Default.aspx
    site.master
0
 
LVL 38

Expert Comment

by:Tom Beck
Comment Utility
so all that code is in the master... and I cant change the master correct?

I'm assuming you mean the code that came with the template. The answer is if it's wrong for your situation then you will need to change it to make it work. You could leave it alone and move your js folder so it's inside the Account folder (if I am visualizing your folder structure properly).
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now