473,488 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ascx and JScript

Hi,

Is there anyway of connecting a java script to a User Control ascx.
I define this in the file

<script language=javascript src="Javascript/ShopFront.js" >

but it never runs.
The script has been tested stand alone using an Active Server Page aspx and
it works fine

Any ideas?
I am using VS .NET 2003.

Cheers

gwc
Mar 2 '06 #1
3 1215
> Hi,

Is there anyway of connecting a java script to a User Control ascx.
I define this in the file

<script language=javascript src="Javascript/ShopFront.js" >

but it never runs.
The script has been tested stand alone using an Active Server Page aspx and
it works fine

Any ideas?
I am using VS .NET 2003.

Cheers

gwc


that "src" attribute is interpreted by the browser. That relative path
will count from the current position of the *asPx* (the browser knows
nothing about any ascx). Could this be the problem?

Do you get any error messages on the browser? (try FireFox maybe)

Hans Kesting
Mar 2 '06 #2
try

RegisterClientScriptBlock("mycontrolinit","<script language=javascript
src=\"Javascript/ShopFront.js\" >")
-- bruce (sqlwork.com)
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:mn***********************@spamgourmet.com...
Hi,

Is there anyway of connecting a java script to a User Control ascx.
I define this in the file

<script language=javascript src="Javascript/ShopFront.js" >

but it never runs.
The script has been tested stand alone using an Active Server Page aspx
and it works fine

Any ideas?
I am using VS .NET 2003.

Cheers

gwc


that "src" attribute is interpreted by the browser. That relative path
will count from the current position of the *asPx* (the browser knows
nothing about any ascx). Could this be the problem?

Do you get any error messages on the browser? (try FireFox maybe)

Hans Kesting

Mar 2 '06 #3
Hi Bruce,

That worked a treat, Thanks.
Cheers

gwc

"Bruce Barker" <br******************@safeco.com> wrote in message
news:uE*************@TK2MSFTNGP12.phx.gbl...
try

RegisterClientScriptBlock("mycontrolinit","<script language=javascript
src=\"Javascript/ShopFront.js\" >")
-- bruce (sqlwork.com)
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:mn***********************@spamgourmet.com...
Hi,

Is there anyway of connecting a java script to a User Control ascx.
I define this in the file

<script language=javascript src="Javascript/ShopFront.js" >

but it never runs.
The script has been tested stand alone using an Active Server Page aspx
and it works fine

Any ideas?
I am using VS .NET 2003.

Cheers

gwc


that "src" attribute is interpreted by the browser. That relative path
will count from the current position of the *asPx* (the browser knows
nothing about any ascx). Could this be the problem?

Do you get any error messages on the browser? (try FireFox maybe)

Hans Kesting


Mar 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
5943
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
4
5846
by: Harag | last post by:
Hi All I currently thinking of converting from my little knowledge of VBscript to jScript ASP. With this in mind I'm looking at my current code to see how it will convert over to Jscript. ...
3
8681
by: w. jORDAN | last post by:
Hello all, It's known to how to make user press enter in an asp:textbox and the form is submited by adding an attribute to the textbox with an onkeydown jscript eventhandler. For example,...
4
2500
by: Rob Meade | last post by:
Hi all, I have just put together our organisations 'template' for our web applications and have created 7 .ascx files which when dropped into my template file work perfectly...however, I have a...
1
3342
by: John Cosmas | last post by:
I've got a page which loads up a different user control into a placeholder control every time a button is clicked on the parent page. I use a statement like...
6
2764
by: tshad | last post by:
I have an ascx file I am using to include my logos and heading information for all my pages. It was working fine up until now. I decided to set up an admin folder inside of my main folder and...
6
1844
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...
2
1207
by: Peter Kirk | last post by:
Hi I have an ascx (MainCalendarControl.ascx), which includes another ascx, by using this statement at the top of MainCalendarControl.ascx: Register TagPrefix="CalendarUI"...
3
5258
by: Steven Nagy | last post by:
Hi all, ASP.NET : Framework 2.0 - C# A recent addition to my code generater will create GridView's and ObjectDataSource's in a control (ASCX). So the code gen creates an ascx, ascx.cs,...
0
6967
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
7142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
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...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5445
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,...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.