PDA

View Full Version : How to show a variable on the web page


ABC123

crimmelcp
09-10-2004, 07:06 PM
To all:
I defined a session variable called vshowname

dim session.vshowname as c

I do a find and populate the session.vshowname=t.emplname

How do I show the session.vshowname on the form that is displayed.

Welcome + session.vshowname ???????

Charlie Crimmel

Cheryl Lemire
09-10-2004, 08:41 PM
%a5
? vshowname
%

Lenny Forziati
09-10-2004, 09:11 PM
"%a5 ? session.vshowname %"

Cheryl Lemire
09-11-2004, 05:27 AM
ooops, thanks Lenny, looks like I neglected to put the full variable name, good thing you are walking behing and cleaning up my messes **winks**

crimmelcp
09-11-2004, 05:49 AM
Lenney:
I open Web projects for the employees sheet
I click on the Xbasic tab at the bottom enter the code
save page
go to browser and view - does not show
go back to properties and view xbasic- code os not there.

I tried the same thing with the HTML tab-same results

herer is the code

Employee Time Employee Data Entry"/font"
"/font" "/p"
"p""font size=5""/font" "/p"
"p""font size=3"Employee XXXX "/font" "%a5 ? session.vshowname %";&nbsp "/p"
"p""font size=3" A variable will be used in place of the
"XXXXX" to show the Employees Name"/font""/p"

crimmelcp
09-11-2004, 06:06 AM
Lenny:
If I publish all I get the attached error

If I publish each one I get no errors

Charlie Crimmel

Selwyn Rabins
09-11-2004, 07:47 PM
you have got yourself into a bit mess here.

if you look at the image you posted, you see folder names like "live preview" and "session"

the only way this could happen is because you have set your Web Root to the same folder as your Web Probject. I am not sure why you would want to do this, but you definately should not do this.

After setting your web root to the web probject folder, you selected 'Publish'. This caused a5 to publish your web project to the same folder in which the project was stored. a5 created the 'live preview' folder, and put a 'published' version of your component into this folder.

when a component is 'published' certain information in the component that is only necessary for editing the component is stripped out.

so your web project folder contains the original component and then a 'stripped down' version of the same component in the 'live preview' folder.

you then selected the Publish button again (and choose the option 'all files'). so alpha five tried to publish all files in the folder and all sub-folders (which includes the 'live preview' folder).

but, as I noted, the "live preview' folder contains a stripped down version of the component, and this cannot be published, and so you get an error because a5 was never designed to handle a situation like this.


the solution: just delete the 'live preview' and 'session' folders, and make sure that your web root is changed to something like 'c:\a5webroot'