Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 6th, 2010, 06:35 AM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Example of Java script in c#

Hi,

I need some example of javascrpt in c#
 
Old March 6th, 2010, 12:12 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default Well...

C# doesn't necessarily have anything to do with it. You just add the script tags to your page like you would on any other website. C# is your sever side code while Javascript is client side script.

EX:
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Javascript.aspx.cs" Inherits="Javascript" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Javascript Test</title>
    <script language="javascript" type="text/javascript">
    
    function showAlert()
     {
      alert('You pressed a button!');
     }
    
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="Button1" type="button" value="Show Alert - HTML Button" onclick="showAlert();"/>
        
        <asp:Button ID="Button2" runat="server" Text="Show Alert - ASP Button" OnClientClick="showAlert();"/>
    </div>
    </form>
</body>
</html>
__________________
Jason Hall

Follow me on Twitter @jhall2013
 
Old March 6th, 2010, 12:22 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

Basically your ASP.Net code is a template, which will be converted to a valid HTML file (and generated javascript). C# code is just there to give some instructions. Your own javascript can be embedded just like how you embed javascript in normal HTML.
 
Old March 14th, 2017, 06:08 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2017
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default javascript tutorials pdf

JavaScript is a translated PC programming dialect formalized in the ECMAScript dialect standard. JavaScript motors translate and execute JavaScript. Java has a broad gathering of libraries javascript tutorials pdf that can be foreign made for use in projects. JavaScript does not give any way to import libraries or outer JavaScript code. JavaScript has no connection to Java beside having a C-like punctuation. JavaScript is likewise utilized as a part of conditions that are not Web-based. The JavaScript dialect itself (ECMAScript) is genuinely cross-program good. The primary employments of JavaScript are the accompanying

Intelligent structures

Intuitive applications with HTML frames (standard ex. tests or tests)

Check of HTML structures before sending them off for "server-side" treatment.
 
Old March 14th, 2017, 07:43 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2017
Location: USA
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

HI VERY GOOD
The Following User Says Thank You to comparoid For This Useful Post:
SanjayDutt (March 14th, 2017)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Script srkarthik_82 General .NET 0 December 28th, 2006 05:03 AM
java Script raj1_syed Javascript How-To 1 August 17th, 2006 01:49 PM
java script nalla ASP.NET 1.0 and 1.1 Professional 8 June 23rd, 2006 06:24 AM
Java vs Java Script functions joemorrison74 J2EE 0 July 6th, 2005 04:28 PM
java script zouky JSP Basics 1 September 27th, 2004 01:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.