Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7953449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:09:40+00:00 2026-06-04T03:09:40+00:00

Situation: I am building a page in ASP.NET from an HTML file with markup

  • 0

Situation:

I am building a page in ASP.NET from an HTML file with markup and javascript, several .js files, stylesheets, and some additional inline javascript on the ASP.NET page. Working in Visual Studio 2010 with ASP>NET development server host.

The XML and js files are supplied by a third party and cannot be altered, one of the js files is ‘our’ file and can be altered.

The HTML file is a questionnaire that can be filled out. Currently we have a desktop application that ‘hosts’ the HTML file and saves the answers.

The overall goal is to host the questionnaire in a website so that we can duplicate functionality from the desktop application on the web. Javascript will be used to duplicate what the desktop application does not ASP.NET.

The HTML file contains <script> links to the js files and a large block of inline javascript after the markup. A line (not a function, an actual line of code) in the inline javascript calls a function in ‘our’ include file.

In the ASP.NET code I am extracting content from the HTML file and applying it to build the ASP.NET page. CSS links, scriptlinks, the markup, inline scriptblocks etc. So the output response looks like this:

<html>
    <head>
        <link to CSS>
        <script src=thirdparty.js>
        <script src=our.js>
    </head>
    <body>
        third party HTML markup
        <script>
            line of code here that calls function in our.js;
        </script>
        <script>
            desktop duplication code here;
        </script>
    </body>
</html>

If I copy the content of the js files and build them into the page as inline script blocks everything works fine. If I include them as links then sometimes the line mentioned above throws a
‘function undefined’ error in the debugger. i.e. It acts as if the javascript file is not loaded/included. As far as I know this should not happen as all the javascript should be loaded and parsed before any of it is run.

Question:

Is the javascript loaded out of order/asynchronously? If so how can I force all the javascript to load and parse before the line is run.

Notes:

Yes I do have to build the page in ASP.NET, the ‘files’ are dynamic and actually read from a web service so can’t be prepared beforehand. What I’m trying to create is a generic approach to handle several suppliers questionnaires.

The third party javascript and markup only works in IE as it’s a legacy system.

I can’t show actual code for obvious reasons.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:09:41+00:00Added an answer on June 4, 2026 at 3:09 am

    I found the answer which had nothing to do with the problem I stated above.

    The DOCTYPE tag was absent when the page worked but present when the page failed. So the problem is that the third party markup doesn’t meet any form of standards and in order to get it working the browser must be in quirks mode, whihc is accomplished by leaving out the DOCTYPE tag.

    Not obvious at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Situation: A PHP Templating system that is responsible for building a pages HTML. Javascript
I'm using Asp.Net MVC 2 and I have a situation where I'm building a
Here is my situation: I am building a schedule asp.net app and i want
alt text http://img3.imageshack.us/img3/1488/advancedsearch.png I'm building an Advanced Search interface in an ASP.NET application. I
I have a page by name BranchMap that uses GoogleMap to show some building
Edit: Here's a Fiddle of the situation. Okay, so I'm building a web page,
Situation: I am building a JS tool that lets you edit html templates live
I came across with these situation while building a class diagram for a system,
I have a unique situation where I'm building a site that will call data
Situation: I have some persons with certain skills and they can/might belong to more

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.