Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Call Asp Sub Procedure in Javascript
Old 12-16-2005, 03:14 AM Call Asp Sub Procedure in Javascript
Super Talker

Posts: 148
Trades: 0
Hi,

Im not sure if it is possible to call an ASP sub procedure in javascript, but i know vice versa is possible. Thanks
shaoen01 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-16-2005, 09:56 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
It's not possible to do either way natively. They run on entirely seperate platforms (The ASP Script executes on the server, and the JavaScript is executed by the browser on the client machine) so calls between the two won't work just like that.

You can however use ASP to write out bits of JavaScript to the response stream, and the browser will then execute it.

As for the other way round, you will have to get the JavaScript to make a request to the server in some way (Either changing the page location, submitting a form, or using the XmlHttp object). Parameters can be passed with query strings or form post values. The ASP Script can then handle the request, and execute the desired function or procedure.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 12-16-2005, 10:54 AM
Super Talker

Posts: 148
Trades: 0
Hi,

Thanks for your reply. Well, i am currently working on a user control (.ascx) file in Asp.net. What i want to do is to create an image list box using <div> tags to expand and collaspe whenever user clicks on the "more" or "close" link/button.

The above i have already settled it, the only problem i have now is to allow user to select image and display the selected image upon clicking. Which means i must have a postback to ensure that the selected image is updated and to display other images besides the selected image displayed, when user expand the <div> tags.

My user control is something like a dropdownlist, but instead of text able to display images. Currently, I am using server-side coding to generate the images. It is dynamic because it will create the number of <img> tags according to how many image files i have in the provided directory of folder.

What do you suggest i should do to go arround this problem?
shaoen01 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Call Asp Sub Procedure in Javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11461 seconds with 12 queries