Serving Up Compress Pages Without Access To Server Side Tools?

Jul 23, 2005

I have a website with no ssi, php, cgi...nothing. Plain old flat pages are all it serves.
I need to upload a list to it - a big, plain text list in html. A 2Mb list!

With gzip compress, it comes down to 91Kb, much more modem-friendly!

After about 30 minutes of googling, I haven't yet found a way of serving this page up like this.
I can't send headers as no php or .htaccess is allowed.

And please don't suggest I move to a "proper" web host! It's for a friend with a one-off need for a small website for about 2 months, and the freebie 10Mb is fine.

View 3 Replies


ADVERTISEMENT

Compress Text On Server, Decompress On Client Using JavaScript?

Mar 29, 2006

I'm new to JavaScript. I have relatively large amounts of text (~200 kB) that I need to transfer to my web application every now and then. Using RAR, I get a 5:1 compression ratio on these files, for example one of 180 kB is compressed to 34kB.

Is there some standard way to decompress files in JavaScript?

View 1 Replies View Related

JQuery :: Encode/decode Of JSON - Server-side And Client-side?

May 26, 2009

I am building a client-side and server-side solution and want to use JSON through Ajax in both directions. I have ASP or JavaScript server-side, though Microsoft's support of server side JavaScript seems nil, so I am reluctantly conceeding to use ASP. I'd appreciate suggestions on available solutions to encode/decode JSON on the server-side (ASP or JavaScript). I don't plan to load jQuery server-side so that rules out plug-ins. I'd also like to know what is the latest client-side encode/decode for JSON. Is it built in jQuery or a plug-in? In both server and client, decoding JSON securely is key, so using eval () to decode is out.

View 1 Replies View Related

Passing Values From Client Side To Server Side Python Script

Jun 1, 2009

I am developing a web form using python cgi which has two list boxes. On selecting a value from the listbox1, the list box 2 should get auto populated with appropriate values (which are taken from the DB). I have written a javascript function to get the selected value from the list box1. But I am struck with passing the values from the javascript to the python function written in server side in which I have written the DB related stuffs.

View 1 Replies View Related

Sending Values From Server Side To Client Side Javascript

Jul 20, 2005

I have a Hyperlink within a String like below:

sSql = "SELECT DISTINCT " + "'Action' = '<center><a
href='+char(34)+'ChangeRequest.aspx?ID='+cast(Chan geRequest.ChangeRequest_ID
as nvarchar) +CHAR(34)+'>Open</a></center>',"

I want to invoke a Client side javascript function and pass the value
of the ID. How can I accomplish this such when a user clicks "Open" he
goes to a new window with the same ID.

I tried this but it does not work:
On Server side:
sSql = "SELECT DISTINCT " + "'Action' = '<center><a href= 'javascript:
NewWindow('+cast(ChangeRequest.ChangeRequest_ID as nvarchar)+
CHAR(34)+)'>Open</a></center>',"

On Client side:
function NewWindow(myID)
{
window.open("ChangeRequest.aspx?ID="+myID,"WindowName","width=500,height=600");
}
</script>

View 1 Replies View Related

Pass Parameter From Server Side Php To Client Side Script?

Aug 22, 2011

On the server side I have a php generated session parameter.
I need to pass it to javascript on the client side page.

I saw on the web the following solution code...

I tried it but it did not work.

View 1 Replies View Related

Adjusting Code To Use Either Server-side Or Client-side Validation--NOT BOTH?

Sep 11, 2009

I have the following PHP code, which uses server-side validation, which works fine. It the user leaves the text field empty it stores an error in a session array which is outputted on the page where the $_GET['id'] variable came from. I also implemented a snippet of javascript code that just checks to see if the cell is empty and throws up alert box. The problem is that both the javascript code and php error validation are both running when I click submit. The PHP code should be a backup to the javascript code in case the user has javascript turned off. The client-side validation should be the default. Not sure if this change should be made in my PHP Code or Javascript Code.

PHP CODE:
session_start();
require_once("../Modules/Connection_Functions.php");[code].....

View 1 Replies View Related

Client Side Script With Server Side Controls

Jul 20, 2005

I have a web form that has a checkbox on it and a textbox associated
with it. I want the textbox to be displayed when the checkbox is checked
and I want this to happen on the client-side instead of posting back to
the server. The checkbox is a server control (asp:checkbox...). I can
write some codebehind that will display an alert message upon checking
the box that looks something like this...

Page_Load...

Dim s As String
Dim scriptString As New System.Text.StringBuilder

chkExpDate.Attributes.Add("onclick", "alertmsg()")
scriptString.Append("<script language=JavaScript> function alertmsg()
{")
scriptString.Append("alert('hi'); }<")
scriptstring.Append("/" + "script>"
s = scriptstring.ToString()

Page.RegisterStartupScript("startup", s)

End Sub

I used this as a test to make sure the server control was running the
script. But, when I change the script to assess the value of the server
control checkbox such as checked = true, I get errors and if I just try
to display the asp:textbox, it doesn't work either.

View 1 Replies View Related

Server Side Or Client Side Validate?

May 14, 2007

I had a import function which allow for user import data from excel file. The number of row was dynamic, mean that user may import hundred or data or may thousand of line.

should i perform client side or server side validate?

the problem i faced was if the import thousand of line, i need display out thousand of text (multiple by 6, cause 1 got 6 fields)

the take a lot of time to loading and cause browser "hang" (response slow)

any solution for me?

View 13 Replies View Related

Converting Client Side CMS To Server Side?

Jun 16, 2010

I have the following client-side Content Management System VBscript which works great, now I'm looking at getting it to work server side so that I can update using online login rather than offline and having to upload files. To be honest, I have no idea where to begin with this,

Here's the full VB script:

[Code]...

View 1 Replies View Related

AJAX :: Getting Server Date/time With No Server Side Script

Apr 19, 2010

I'd been looking for some way to get server date/time without using any server side script (such as ASP, PHP, etc).

I found this and it worked just excellent for me! I just want to share it because it wasn't easy to find.

I created a js document with code:

Code:

Now, I can use this js within a html like this:

HTML Code:

You may change your machine date/time and check both dates.

View 1 Replies View Related

Events - Add Server Control To Custom Webcontrol That Fires Function And A Server Side Function?

Jun 24, 2010

In ASP.Net, I am trying to create a WebControl. In this control, I have RenderControl method overridden with my html controls.

protected override void RenderContents(HtmlTextWriter output)
{
output.Write(@"<table><tr><td>");

[code]....

How can I make the button call the click event so that the server side method btnExecute_Click() can be called? Also, this button calls a javascript function before server side even.

View 5 Replies View Related

Javascript On The Server Side

Jul 23, 2005

However, this piece of Javascript uses some other script which is large.

<script src = "./js/tmp.js".....>

This will work if the file "tmp.js" is local. However this reduces the
portability of my *utility* Javascript
as users have to have that "tmp.js" for every webpage they have (if they
want to use it :D)

I thought of uploading "tmp.js" it to somewhere and change my code to

<script src = http://www.somewhere.com/js/tmp.js ....>

The all the users have to do is copy the piece of code that I wrote
BUT THIS DOES NOT WORK. I TRIED IT.

My questions are:

1. Is there something wrong with server-side Javascript? Or am I missing
something?

2. Is there another way to make my code portable?

View 2 Replies View Related

JavaScript On The Server Side?

Nov 3, 2006

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.

View 5 Replies View Related

Server Side Scripts With ASP

Jul 20, 2005

Does Javascript work "out of the box with IIS" as an
Active server page? ie. does it have the ability to open files
ect.?

I tried this command and it does not seem to work.

var fileSys;
var txtFile;
fileSys = new ActiveXObject("Scripting.FileSystemObject");
txtFile = fileSys.OpenTextFile("./junk.txt",1,false);

I can't find examples on the web. What would I search for to find out
about objects the Scripting.FileSystemObject?

Background:

I work at a large company with a corperate IT group.
I need to write some server side scripts. The servers they
have are Windows 2000 with IIS installed. If additional
software needs to be installed I will be forced to use VBscript.

View 5 Replies View Related

How Can I Run Server-side Javascript On Apache ?

Jul 23, 2005

I have a number of server-side Javascript applications running on an
old Netscape Enterprise server. I want to move them to Apache. Is
there a way to do this without extensive recoding ? My code contains
a lot of Oracle and SQL Server database interaction.

View 2 Replies View Related

State Of Server Side Javascript

Jan 20, 2007

I'd like to adapt some Greasemonkey scripts that I've written and have
them applied to html files on the server side before the files are sent
to users. I'm only looking at adapting scripts that make static
changes to pages. For instance, consider a script that removes from
the DOM any img that has "ad" in its src.

I'm sure there are better ways to do this and I'm not even necessarily
looking for an extremely efficient solution. Mostly, I just want to
know if there's an existing product that could do this or with
reasonable effort could be made to do this.

View 5 Replies View Related

Controlling Javascript From Server Side

Aug 29, 2007

I want control a hardware device using a Web browser.
I created a page which has a form containing all necessary INPUTs.
By clicking a button, all current settings are sent to the server side
(using POST or GET) so that the server can interact with the hardware,
which is under the server's control.

Now, in some cases, I want to update the INPUT (w/ readonly) with the
data from the hardware, such as a status value.
Most primitive approach is creating a new page with new value to the
INPUT, where I want to show the value.

But that is not quite efficient as the page appearance won't change
except the contents of the INPUT.

As Javascript can make any change to the HTML page (at client's side)
that is currently being displayed, it is more straight forward if the
server can send a set of Javascript commands to the web server so that
it can just update the display contents rather than refreshing
everything.

I thought such scheme was already available, but so far, I don't see
anything usable.

The Web server is not a commercial one but a custom Web server
(written in Python) so that I want to keep the scheme as simple as
possible. I checked AJAX but I'm not sure I can use AJAX in my
application.

View 10 Replies View Related

Reloading An IFRAME Server Side?

Sep 30, 2009

I have a script that writes to an IFRAME, it writes dynamically and then needs to reload it server side. Anybody knows how to do it? I'm joining the code of my attempt but it appears to be reloading the IFRAME on the client side therefore causing an activeX error since I am running this in FireFox:

var frTraductionID = document.getElementById("frTraduction");
frTraductionID = (frTraductionID.contentWindow) ? frTraductionID.contentWindow : (frTraductionID.contentDocument.document) ?

[Code]....

View 1 Replies View Related

Server Side Validation Return A Value?

Mar 9, 2010

I have a form field that needs to be validated in a hidden Iframe which is driven by Coldfusion. Which is working fine. But the same form field also need do some client side validation as well if Server side (iframe) validation passes.I thought I could create a javascript function, in it call a server side validate and then client side, but without any success. It does not process in the order as expected. Javascript always go first, then the server side validation.I tried to delay the client side with time delay, then server side did process first, but client function could not recognize the parameter passed.here is the function:

Function doValidation(param1,param2,param3,param4)
{
....

[code]....

View 2 Replies View Related

Get Files Of Server-side Folder

Nov 25, 2011

I have written a custom slideshow script which gets the images from an array... The script will change the src of a img, which is a fullscreen background. Now here's the problem, I've been trying to write a function where can define a folder "gallery est", and then get all image files in that folder and repopulate the slideshow array. So, is there a way to scan folders? I've searched around and found some solutions where PHP is used, but i really want to keep this pure js, if possible (?)

View 1 Replies View Related

Server Side Javascript Portability

Jun 8, 2005

How portable is server side javascript? Does server side javascript works the same across different browsers and operating system? What I should do to ensure it is more portable?

View 1 Replies View Related

Passing The Server-side Array?

Apr 4, 2011

I have a TreeView populated from a SQL Server database (via an XML doc). The TreeView includes checkboxes on each branch and leaf. Each entry on the TreeView may or may not inherit access permission from its parent. That is, if you're granted access to branch "A", you automatically get permission to leaves "A1", "A2", and "A4", but not to "A3", as its inheritance flag is set to false.I have created an array of struct's on the server-side.

Struct format is:

public struct TreeInheritData
{
public Int32 namespaceID; // this identifies the node

[code]...

The array is populated with these structs.The TreeView I'm using (from Infragistics) has a client-side event when the CheckBox status changes.So, what I need help on is getting this array of structs from the server to the JavaScript, and then being able to access the structs so that I can determine whether to change the status of the child nodes' checkboxes.

View 6 Replies View Related

JQuery :: Client-Side Filesystem Access Using JS?

Jun 3, 2011

I'm adding feature to my site which allows the user to browse there filesystem inside of a div rather than an input file element in html. Is this possible in jQuery or JavaScript or do I need to develop a desktop app which allows filesystem access and connect it to the web app using PHP?

View 2 Replies View Related

Server Side Script - E-mail Template

Jul 23, 2005

I need a script that will allow me to save a number of e-mail drafts
that I can use over and over again. I need to be able to simply open
the saved e-mail, enter an adress from my adressbook (or type it in
if necessary) and send it off. I need to be able to do this over many
times.

The web hosting company told me I need a server side script to do
this. I have no idea where to look. Can anyone point mein the
direction of a free script that will do this relatively simple task.

View 1 Replies View Related

Request Server Information Client Side

Jul 23, 2005

The only way i can think of doing such a thing is having an active
server page that returns an image, that is generated on the fly. As
long as there is no caching on the client this in theory will allow
the client to perform an action on the server and display an image
generated on the fly as a result of this action without actually
reloading the page, simply by requesting an image.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved