473,395 Members | 1,975 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.

Load JScript File Dynamically

Hi,

I am writing an application in C# (.NET 1.1).

I have AxWebBrowser control in my form. It will be loaded with a html page from the following location:

/GA/Receive/Main.htm

The loaded htm has references to some external JScript classes.

Now I want to load a Java Script located at the following location into the active document of my webbrowser control:

/GA/Test/test1.js

In order to do this, I wrote my code as follows:

WebBrowser.Docuement.CreateElement("<script src=\"/Webify/WinApp/GA/Test/test1.js\"></script>");

This test1.js has a method called testMethod() with an alert statement in it.

When I try to launch my application and load the test1 script, I didn't find the script loaded.

The alert statement didn't display.

Can anyone help me in this regard?
Oct 5 '07 #1
1 1651
kenobewan
4,871 Expert 4TB
You need to debug your problem. Try placing the alert inside your code and if that works its the location of your file. HTH.
Oct 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Max Metral | last post by:
So many details, so little knowledge of what's important. We have a site that we are subjecting to load tests. It makes heavy use of ADO, a VB COM object, some scriptlets, and some HTTP services....
1
by: Ron Vecchi | last post by:
I am using the FlashShockWave COM object. in the form design mode I specified the Flash Movie .SWF local path. and it loads correctly. My problem is that if I make changes to the swf file it...
2
by: Zach Mortensen | last post by:
I can't seem to get dynamically-compiled JScript code to use C#-defined custom attributes. I have a simple attribute and a class defined in a C# assembly: namespace MyNamespace { public...
5
by: Earl Teigrob | last post by:
I am creating an application where I would like to give web designers the ablity to create a static html page and dyanamically load it into my application(exactly like loading a user control into a...
6
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that...
7
by: RFS666 | last post by:
Hello, I would like to use variables with a type in jscript.NET. I declare them as follows: var x : double = 5.03; This doesn't work in my script, that I write to the page in codebehind with...
2
by: Eric Falsken | last post by:
Eric Falsken <eric@db4o.com> wrote on 04 Dec 2005: > craigkenisston@hotmail.com wrote on 19 Nov 2005: > >> I'm working in the migration of an asp.net application in 1.1 to 2.0. >> I'm new to...
7
by: kendu | last post by:
Is it possible to dynamically load a form from file? This form is just a .vb file and has not been added to the project during design time. Ken
2
by: teressa | last post by:
Hi Everyone, I was given a task to fix our printer friendly pages: Best practice recommendation was to dynamically load a JavaScript page. I have an asp page which is a printer-friendly page...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
agi2029
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,...

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.