Home > Coding, General Stuff, jQuery, Mainframe > More fun with ISPF web server

More fun with ISPF web server

Well it turned out that adding support for javascript and images was not that hard. When I uploaded the files into the host files the file transfer simply used as many lines as it needed to hold the data within each PDS member so nothing got lost. When returning them to the browser I simply read all the lines in and concatenate them together to form one big line. Fortunately browsers don’t care about carriage return and line feeds in source code so everything still works as it should.

For the images I simply uploaded them as binary. I created three separate image libraries to hold the images, one each of JPG, PNG and GIFs so that you can tell which is which and also so that you could have duplicate names, provided the file type is different.

I have the web server TCP/IP sessions set to automatically translate between ASCII and EBCDIC so for the images I just send the response in two parts. I send the HTTP header response with the translation on then turned it off and send the image binary.

The JQuery UI plugin has a number of images that I needed to handle. Unfortunately the image file names are longer than 8 characters and it’s not really practical to rename them and modify the UI javascript so what I did is create an ‘index’ member in the image PDS that maps the original image name to a member name. If the requested name is not found directly in the image PDS then the code grabs the index member and searches it for a matching name, then uses the associated member name instead.

Here’s a screen shot of the app using the UI tabs function and some embedded images:

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: