Running server code from a client script?


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).

Who is Participating?
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.
You can't! Never was possible...and never will be....that would be a serious security hazard...

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:
EBACAuthor Commented:
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.
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.