Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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
  #1 (permalink)  
Old July 3rd, 2007, 10:11 AM
Registered User
 
Join Date: Dec 2006
Location: gurgaon, haryana, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling javascript function from with in ASP

Hi,
 i am trying to call a javascript function from within ASP but m unable to do so.
function is described in a .js file
i tried using
response.write "<SCRIPT Language = 'Javascript'> GetData(1);</Script>"
and all other combinations with this but its not working.
i want to simply call a function without any click.
Can anyone please help me in this??

Thanks in advance
Kawal
  #2 (permalink)  
Old July 4th, 2007, 05:17 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can't call a clientside function serverside the only thing the above will do is write the javascript code. What you can do is execute that funtion onload.
Code:
<body onload="GetData(1)">
__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling VBScript Function from javascript arnabghosh Classic ASP Professional 1 July 13th, 2007 08:32 AM
Calling a javascript function from C# SebFr C# 0 November 3rd, 2006 12:05 PM
Calling a .NET function from javascript jainnid General .NET 6 June 8th, 2005 04:54 AM
On calling javascript function only one value pops shoakat Classic ASP Components 4 April 24th, 2005 06:07 PM





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