How to pass data from server (CGI script) to client (html page)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to pass data from server (CGI script) to client (html page)
# 1  
Old 08-22-2010
How to pass data from server (CGI script) to client (html page)

Hi
I know how to pass data from client side (html file) to server using CGI script (POST method).
I also know how to re-create the html page from server side after receiving the data (using printf).
However I want to write static pages on client side (only the structure), and only to pass information (data) from server to client (which data to display in the form created statically).
1. How do I pass the data from the server side?
2. How does the client side receive the data from the server?
Thank you
Naama
p.s. I am working on embedded product with Linux as OS
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to convert my /bin/sh script with cgi and html to run it on browser!??

Hello, I want to run this script on my CentOS 6 via browser : ________________________________________________________________________________________________ #!/bin/sh echo Username? read MY_NAME echo Provisional file name? read MY_FILE echo File NAME you want to save? read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies

2. UNIX for Dummies Questions & Answers

Read data from excel and upload into html page

Hi, I have requirement for automation, wanna confirm whether is it possible in shell scripting. 1) Need to read data from excel sheet 2) And upload the details in html page I know first requirement is possible by converting excel into csv form, but not sure about the second one. If... (6 Replies)
Discussion started by: stew
6 Replies

3. Shell Programming and Scripting

How to pass arguments from a textbox in CGI to a shell script?

Hello All, Could you please help me to explain that how do I pass textboxes values while running a shell script which need some arguments while running it and should be invoked after the button click. Here is an example. The first CGI is: #!/bin/ksh echo "Content-Type: text/html"... (4 Replies)
Discussion started by: RavinderSingh13
4 Replies

4. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

5. Web Development

CGI not working with httpd server on busybox 1.15.0 on ltib Linux 2.6.34 (404 page not found)

I have some industrial ARM linux board with 2.6.34 Linux on it with Busybox v1.15.0. The https.conf is located in /etc/ and contains: H:/root/web In the www directory I also have 'cgi-bin' folder with chmod 777 and in that folder a file called 'testcgi'. Now I start the server with... (1 Reply)
Discussion started by: Roboserg
1 Replies

6. UNIX and Linux Applications

execute shell script using CGI for html site

hi there im currently in the process of creating a website for use basically within our org. im using a os x machine and installed MAMP - which includes Apache, mysql... the site will be used by techs to primarily install pkgs files onto os x devices. i would like to have buttons or hyperlinks... (2 Replies)
Discussion started by: sheshe
2 Replies

7. Shell Programming and Scripting

cgi script to print all .png files on a single page

Hi guys I'm relativley new to Perl, and have not touched html before, im trying to write a cgi script that prints all images on a single html page from a given directory. Im using perl to gather stats, rrdtool to update and create graphs now i just need to print these graphs all onto 1 index.cgi... (3 Replies)
Discussion started by: jeffersno1
3 Replies

8. Web Development

Call shell script from HTML page - without web server

Hi, I have html page in my unix machine(server), which I will open with firefox or mozilla available in unix machine. Firefox or mozilla will be opened using x windows. Since I have access to unix machien(like other users) and this HTML page is for user having access to Unix machine, I see no... (7 Replies)
Discussion started by: vamanu9
7 Replies

9. Shell Programming and Scripting

cgi script to echo a html file

Hi, I'm learning some simple cgi scripting. I can make a script like this, so my browser shows "Hello World" /www/cgi-bin/name.sh --- #!/bin/sh MyName=World echo "<html> Hello $MyName </html>" --- What I'd like is to have a separate html and script files in the cgi folder so ... (1 Reply)
Discussion started by: Performer
1 Replies

10. Shell Programming and Scripting

html - df -k cgi script

Hey - I am new to cgi scripting... just writing a script to output df -k output to html page... but I cannot get the df lines on separate lines on the page, it all comes out on one line and is not very readable.. any suggestions? My script is below - please keep in mind I am only new to it so... (1 Reply)
Discussion started by: frustrated1
1 Replies
Login or Register to Ask a Question
JSON::RPC::Server::CGI(3pm)				User Contributed Perl Documentation			       JSON::RPC::Server::CGI(3pm)

NAME
JSON::RPC::Server::CGI - JSON-RPC sever for CGI SYNOPSIS
# CGI version #-------------------------- # In your CGI script use JSON::RPC::Server::CGI; my $server = JSON::RPC::Server::CGI->new; $server->dispatch('MyApp')->handle(); # or an array ref setting $server->dispatch( [qw/MyApp MyApp::Subclass/] )->handle(); # or a hash ref setting $server->dispatch( {'/jsonrpc/API' => 'MyApp'} )->handle(); #-------------------------- # In your application class package MyApp; use base qw(JSON::RPC::Procedure); # Perl 5.6 or more than sub echo : Public { # new version style. called by clients # first argument is JSON::RPC::Server object. return $_[1]; } sub sum : Public(a:num, b:num) { # sets value into object member a, b. my ($s, $obj) = @_; # return a scalar value or a hashref or an arryaref. return $obj->{a} + $obj->{b}; } sub a_private_method : Private { # ... can't be called by client } sub sum_old_style { # old version style. taken as Public my ($s, @arg) = @_; return $arg[0] + $arg[1]; } DESCRIPTION
Gets a client request. Parses its JSON data. Passes the server object and the object decoded from the JSON data to your procedure (method). Takes your returned value (scalar or arrayref or hashref). Sends a response. Well, you write your procedure code only. METHODS
They are inherited from the JSON::RPC::Server methods basically. The below methods are implemented in JSON::RPC::Server::CGI. new Creates new JSON::RPC::Server::CGI object. retrieve_json_from_post retrieves a JSON request from the body in POST method. retrieve_json_from_get In the protocol v1.1, 'GET' request method is also allowable. it retrieves a JSON request from the query string in GET method. response returns a response JSON data to a client. cgi returns the CGI object. SEE ALSO
JSON::RPC::Server, JSON::RPC::Procedure, JSON, <http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html>, <http://json-rpc.org/wiki/specification>, AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org> COPYRIGHT AND LICENSE
Copyright 2007-2008 by Makamaka Hannyaharamitu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-09-01 JSON::RPC::Server::CGI(3pm)