PDA

View Full Version : MvCALL error


Neocoder
05-11-06, 11:09 PM
Hi - I'm getting this error message when I try to execute a MvCALL:

"Line 102: MvCALL: Runtime Error: Unable to open URL 'filename.htm': Unsupported protocol 'filename.htm'

I'm not familiar with the "unsupported protocol" error. Does this mean that it doesn't recognize the format of the file I'm calling?

The file I'm calling is a simple HTML file. Is it missing something critical in the head?

<html>
<head>
<title>Resource Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
A simple table with text.
</body>

Thanks for your help.
Neocoder

Vic - WolfPaw Computers
05-11-06, 11:13 PM
What is your code for the MvCALL?

Neocoder
05-11-06, 11:27 PM
<MvCALL ACTION="{'http://www.mysite.org/parallel/resources/' $ g.resource $ '.htm'}" METHOD="GET">
</MvCALL>

Vic - WolfPaw Computers
05-11-06, 11:41 PM
You have the method and action reversed. It expecting your "GET" first, which is why you're gettting the unsupported protocol error.

Neocoder
05-11-06, 11:55 PM
Are you referring to the order of the ACTION and METHOD statements?

I tried putting METHOD first. The error message disappeared, but it still doesn't open the file. :(

<MvCALL METHOD="GET" ACTION="{'http://www.mysite.org/parallel/resources/' $ g.resource $ '.htm'}">
</MvCALL>

Vic - WolfPaw Computers
05-12-06, 12:11 AM
Can you open it yourself with a direct URL?

Neocoder
05-12-06, 12:17 AM
Yes, and I've tried substituting URLs from other sites. This is driving me nuts. I've used MvCALL many times before, but right now I can't get it to open anything, even in a test file with contains little more than the call.

<html>
<head>
</head>

<body leftmargin=0 topmargin=0>

<MIVA DEFAULTMACROENCODING="entities">
<miva standardoutputlevel="html,text,compresswhitespace">

<MvASSIGN NAME="resource" VALUE=substring(lang1, 1, 2)>
<MvCALL ACTION="http://www.amazon.com" METHOD="GET">
</MvCALL>
</MIVA>
</body>
</html>

ids
05-12-06, 01:04 AM
<MvCALL ACTION="{'http://www.mysite.org/parallel/resources/' $ g.resource $ '.htm'}" METHOD="GET">
</MvCALL>

I think you'll need form the link in the action by doing something like this:


<MvASSIGN NAME="l.url" VALUE="{'http://www.mysite.org/parallel/resources/' $ g.resource $ '.htm'}">
<MvCALL ACTION="{l.url}" METHOD="GET">
</MvCALL>

I believe when you pass a varable to the "action" there can be no literals. In other words when you used the curly brackets, Empressa expects a var.

Neocoder
05-12-06, 01:11 AM
Its working! I'm a new programmer and started this project by "cannibalizing" code I wrote previously. I neglected to pick up two important lines that I believe tell Empressa to evaluate the code and send it to the screen:

<MvASSIGN NAME="temp" VALUE="{glosub(s.callvalue,'<pre>','') }">
<MvEVAL EXPR="{ glosub(temp,'</strong>','</strong><br>') }">

With the addition of these two lines, the script is working.

Thank you for your suggestions and for hanging in there with me to work this through.

wmgilligan
05-12-06, 05:29 AM
You need this...

<MvEval expr="{ callvalue }">

Before the closing </MvCall>