Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: writing jscript in .aspx page

Reply
Thread Tools

Re: writing jscript in .aspx page

 
 
S. Justin Gengo
Guest
Posts: n/a
 
      06-29-2004
anoop,

You need to add the javascript as a attribute from the code behind file.

MyButton.Attributes.Add("onClick", "your javascript call here")

If you'd like I've created a javascript project that let's you drop an
object on a page and then use the javascript's it contains. It has quite a
few useful scripts in it now like opening a window, attaching a
confirmation, making the enter key click a button while in a text box, and
stopping a user from clicking submit more than once.

All the code on my website is free and downloadable as Visual Studio.NET
v1.1 projects. You may find the javascript project by clicking the code
library link on the top right corner of my website, www.aboutfortunate.com,
and then clicking on the Javascript button in the menu on the left.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"anoop" <> wrote in message
news:3A8AF886-DD87-4F7D-BC00-...
> hello,
> I have written jscript within the <SCRIPT> and runat="server"

tag in .aspx page and has written a function inside the jscript. the
settings for the page are <% page language="jscript"> and default client
script is "vbscript". Also the project is Visual Basic .Net Project.
> Now if I call that function in html

from <asp: button's Onclick Event, I get an error "invalid procedure call or
argument" , also that's button's attribute is also set to runat="server".
> What

should I do to call that function and solve this problem


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Server-Side Jscript (not Jscript.NET)? Maxwell2006 ASP .Net 5 03-07-2006 05:28 AM
JScript.Net (JScript 7.0) is official documented language VK Javascript 4 01-12-2006 06:48 PM
Porting from JScript to JScript.Net - compiler error Jon Maz ASP .Net 4 09-09-2004 10:24 AM
Call function in codebehind from jscript in aspx page moondaddy ASP .Net 2 02-27-2004 05:35 PM
Which to Learn: Javascript, Jscript, JScript.NET, ECMA 262 (3rd ed)? John Bentley Javascript 14 02-05-2004 06:14 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57