Alexander Burger <a...@software-lab.de> writes:

> Hi Thorsten,
>
>> html output is:
>> ,----------------------------------------------------------------
>> | <script type="text/javascript" src="http://:/lib.css";></script>
>> `----------------------------------------------------------------
>> ...
>> what is this :/ standing for? I know the : as path-separator on Linux,
>> but here?
>
> Sorry, I should have noticed by myself. It is the port separator in the
> URL.

I see ...

> The 'javascript' function might not really be useful here, as it is
> tailored for usage in the PicoLisp server environment (baseHRef, session
> port etc.).
>
> Instead, it might be easier to print directly, e.g.:
>
>    (prinl "<script type=\"text/javascript\" src=\"lib.css\"></script>"))

I used this

#+begin_src picolisp
  (prinl
     (pack
        "<script type=\"text/javascript\" src=\""
         (path "@")
         "lib.css"
         "\"></script>" ) )
#+end_src

and it prints

,----------------------------------------------------------------
| <script type="text/javascript" src="../../../lib.css"></script>
`----------------------------------------------------------------

where the 'src=' is a working link to the lib.css file of the local
installation. It still has no effect on the html-page appearence, the
tabs and menu are still style-less.

BTW, the '@lib.css' strings, e.g. in

#+begin_src picolisp
  (<ul> "@lib.css"
     (<li> NIL "Item 1") ...
#+end_src

are not really expanded, but exported verbatim to html.

#+begin_html
<h3>This is Tab 1</h3>
<ul class="@lib.css">
  <li>Item 1</li> ...
#+end_html

Is that correct?

Another problem with my embedded PicoLisp code is that the hrefs
produced are incomplete. This

#+begin_src picolisp
  (<div> '(id . menu)
      (<menu>
         ("Item" "test.l")                      # Top level item
         (NIL (<hr>))                              # Plain HTML
         (T "Submenu 1"                            # Submenu
            ("Subitem 1.1" "test.l") ...


  (<div> '(id . main)
      (<h1> NIL "Menu+Tab")
      (<tab>
         ("Tab1"
            (<h3> NIL "This is Tab 1") ...
#+end_src

produces

#+begin_html

<div id="menu">
  <ul>
    <li class="cmd1">
       <a href="test.l?*Menu=+0&*Tab=+1&*ID=" title="--&gt;">Item</a>
    </li>
    <li><hr/></li>
    <li class="sub1">
        <a href="?*Menu=+1&*Tab=+1&*ID=" title="Open submenu">Submenu 1</a>
    </li> ...

<div id="main">
  <h1>Menu+Tab</h1>
     <table class="tab">
         <td class="top">Tab1</td>
         <td class="sub">
              <a href="?*Menu=+0&*Tab=+2&*ID=">Tab2</a>
          </td>
          <td class="sub">
            <a href="?*Menu=+0&*Tab=+3&*ID=">Tab3</a>
          </td>
      </table>
      <h3>This is Tab 1</h3> ...
#+end_html


Thus only one link 

,---------------------------------------
| <a href="test.l?*Menu=+0&*Tab=+1&*ID="
`---------------------------------------

points to the test.l file as it should, the others not.

All this does work if I evaluate the examples from the PicoLisp
Application Development tutorial with 'standalone' PicoLisp like
described in the tutorial. Its hard to tell where things go wrong.

--
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to