Helping ordinary people create extraordinary websites!

Go Back   Web Development Forum > Website Programming > Server-Side Scripting
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2008, 04:49 PM
Junior Member
 
Join Date: Dec 2007
Posts: 24
Default how can i use my javascript code with my asp.net page

hi,

i have written the following javascript code. however i am writing my web application using visual web developer 2008 express edition, and i am finding it hard to incorporate it into my asp.net page. can i use javascript in asp.net page? does anybody have any suggestions as to how i can do this. the point of my code is to have a series of text appear on the web page in a sequence on after the other. please can someone help me, any suggestions will be appreciated.

<html>
<head>
<script type="text/javascript">
function timedText() {
var t1=setTimeout("document.getElementById('displayDiv ').innerHTML+='2 seconds!<br>'",2000);
var t2=setTimeout("document.getElementById('displayDiv ').innerHTML+='4 seconds!<br>'",4000);
var t3=setTimeout("document.getElementById('displayDiv ').innerHTML+='6 seconds!'",6000);
}
</script>
</head>
<body>
<form>
<input type="button" value="Display timed text!" onClick="timedText()">
<div id="displayDiv">
</div>
<p>Click on the button above. It will tell you when two, four, and six seconds have passed.</p>
</body>
</html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-30-2008, 06:19 PM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 291
Send a message via MSN to BigAlReturns
Default

Javascript is a client side language, so you can use it regardless of what language (ASP,PHP,Java etc.) you use server side. The usage you have above is correct, you just need to get ASP to output the page in that way. Unfortunately my ASP experience is 0 so I'm no use there!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-11-2008, 09:10 AM
Junior Member
 
Join Date: Feb 2008
Posts: 9
Default Combining Js and css file

hi there,

how to combine javascript and Css file in asp.net 2005.

Any reply ius most welcome

Thank you
Jitesh
__________________
Programmer
.Net Consulting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-11-2008, 12:51 PM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 291
Send a message via MSN to BigAlReturns
Default

The usage of javascript and CSS is identical regardless of what server side language you're using. The basic implementation is shown below:
Code:
<head>
<script type="text/javascript">
//js code goes here
</script>
<style type="text/css">
//css goes here
</style>
</head>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Thread Tools
Display Modes

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

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



All times are GMT -5. The time now is 02:14 AM.


Website Design by Ducani Media Group
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.