Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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 January 24th, 2005, 11:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default passing information from server-side script

Hi All,

I am trying to pass information from server-side script to
client-side script and back again.

I am also using both "JavaScript" and "VBScript".
I need to use both scripts.

Here is my code;

<%@language = "VBScript"%>

<% option explicit %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%
    ' Declare local variables
    dim lngCorpID

%>



<html>
<head>
    <title>Advanced ComboBox Test</title>


    <script language="javascript">
        function company_list(strType)
        {
            alert(strType);
        }
    </script>

</head>

<body>
    <script language="javascript" runat="server">
        var strType = "A";

        company_list(strType);
    </script>

</body>
</html>

And when I run this page, I get the following error;


Error Type:
Microsoft JScript runtime (0x800A138F)
Object expected
/MC_DirectBilling/Advanced_ComboBox.asp, line 33


Thanks for your help,

MCinar

Love all the creatures because of the creator.

:)

__________________
MCinar

Love all the creatures because of the creator.
 
Old January 24th, 2005, 01:36 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

I don't think client side function can be accessed from server side..

The error is coming up because, company_list(strType) function is not available on server side.


Om Prakash
 
Old January 24th, 2005, 04:42 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Om Prakash is correct, but for more information please read the FAQ I wrote in the PHP FAQs section. It is about PHP and JavaScript, but the same idea can be applied to just about every server- and client-side language.

HTH,

-Snib - http://www.snibworks.com
Where will you be in 100 years?





Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX without server side script possible? suersh79 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 4 November 17th, 2006 01:55 AM
Server Side Data Passing AgentSmith ASP.NET 1.0 and 1.1 Professional 1 July 11th, 2006 05:03 PM
Passing information from server-side script mcinar Classic ASP Basics 4 January 24th, 2005 10:34 PM
Passing proxy server information ActiveX control katsarosj VB.NET 2002/2003 Basics 1 May 13th, 2004 05:07 PM
The server side script is not send to the browser jaideepc ASP.NET 1.0 and 1.1 Basics 3 February 28th, 2004 12:23 AM





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