By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,935 Members | 1,558 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,935 IT Pros & Developers. It's quick & easy.

Load JScript File Dynamically

P: 1
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
Share this Question
Share on Google+
1 Reply


kenobewan
Expert 2.5K+
P: 4,871
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

Post your reply

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