Solved

Running server code from a client script?

Posted on 2002-06-20
8
290 Views
Last Modified: 2013-12-24
OK,

I seem to have come across a problem with my installation of VS-6 in that I cannot use the page object.  It immediately comes up with a Red Exclamation Mark (or R.E.M. for short :) ) when it is dropped on the page.  This REM still remains even if I change the page object name.  The when the mouse is over the REM, the hovering tool-tip says "named objects are not currently available."  I have re-applied all the latest service packs (win2k-sp2, vs6-s5). I have searched google web/newsgroups and found a few people have come across the same problem, but no answers were given.  The only thing I haven't tried is re-installing the OS and that aint going to happen (at least not yet :) ).

So for at least the short term, I need a workaround.  How can I run server code from a client script (avoiding the temptation to use a submit button of course).

Anthony.
0
Comment
Question by:EBAC
8 Comments
 
LVL 19

Expert Comment

by:DreamMaster
Comment Utility
You can't! Never was possible...and never will be....that would be a serious security hazard...

Max.
0
 

Expert Comment

by:CharlesM
Comment Utility
Don't know what all your requirements are, but you can try remote script.
Works best with IE 5 + 6.
NS 6 does not work with it, but, theoretically NS 4 + 5 does.

Try this for some reading on it:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rmscpt/Html/rmscpt.asp
0
 

Author Comment

by:EBAC
Comment Utility
Thanks heaps!

We are only going to be using IE, because it is only for internal site purposes.  Unfortunately, many of the computers on site are Win95 clients.  That means that I would have to install Windows Scripting 5.5.

Would it ever pose a problem if we were to ever get a couple of XP computers on site (bearing in mind that it requires al least Windows scripting 5.6).

I can go ahead and run with this because it looks like it will do the job.  But I just don't want to burn any future bridges I may want to cross.

Thanks in advance.
0
 

Accepted Solution

by:
CharlesM earned 50 total points
Comment Utility
I don't think it matters much about the OS, more with the version of IE you have.

If you install v5 IE on the 95 computers, remote scripting should work fine.

I've used remote scripting on an XP machine (done a couple of projects with it), again, no problems.

I upgraded to the .NET platform, still ran fine.
Remote scripting isn't supported in .NET projects though, but it runs fine on a .NET machine.
0
 

Expert Comment

by:merlinb
Comment Utility
I am not sure about the REM problem - it sounds like a permissions issue.  Make sure that you logged in as an administrator while you installed VI.

The page object does include an 'execute' feature, that allows a server-side function to be executed from client script.  It uses a Java runtime module (RSPROXY.JAVA) in the _ScriptLibrary. See also the RS.ASP / HTML files, that wrap the javascript, and PM.ASP / JS that handles the Page Object at runtime.  Unfortunately, not all browsers or security systems allow Java applets - though in your situation it sounds like it would be OK.

But without the page object (and its execute handler) you may need to use FRAMES (or Layers in Netscrape).  Through an iframe on the page, you can request separate url's, passing parameters in the query string, and recieving the reply as content or xml.  This information can be passed back to the main page via the window.parent object.

So if the content returned to the frame included javascript, this would run and could pass values back to the parent window document.

We also have a pop-up frame that has a gif image that looks like a % completion status bar that fills from the left.  Clearly it fills then starts again, but at least it shows the user that something is still happening.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now