[Seaside] local file.html

Karsten Kusche karsten at heeg.de
Tue Feb 10 15:19:30 UTC 2015


Hi Piere,

you’re setting your mimetype to javascript, yet you return HTML. Maybe you should change the mimetype to text/html.

Kind Regards
Karsten


-- 
Karsten Kusche - Dipl. Inf. (FH) - karsten at heeg.de
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812 

Am 10. Februar 2015 bei 16:13:47, Pierre CHANSON (chans.pierre at gmail.com) schrieb:


Hi again, I am sorry maybe this post is not that interesting but I really do have something I don't understand...

This code should be working logically:

-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

html iframe attributeAt: 'width' put:'500'; attributeAt: 'height' put:'300'; document:

'<!DOCTYPE html>
<html>
<body>
<p>Creating a JavaScript Variable.</p>
<p id="demo"></p>
<script>
var car = "Fiat";
document.getElementById("demo").innerHTML = car;
</script>
</body>
</html>'

mimeType: 'text/javascript'.

-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

And I just obtain this...



Thanks in advance if someone already did something like this or know how to could it be possible to solve this :)

cheers,

Pierre
​



2015-02-06 17:45 GMT-03:00 Pierre CHANSON <chans.pierre at gmail.com>:
hi,

now I can add a file in LBFileLabrary and put it in an iframe. I am trying to do the same with the html file using:

-=-=-=-=-=-=-=-=-=-=-=-=-=
    f := html iframe attributeAt: 'width' put:'500'; attributeAt: 'height' put:'300'; document: (LBFileLibrary new sunHtml) mimeType: 'text/html'.
-=-=-=-=-=-=-=-=-=-=-=-=-=

Is this supposed to work ? without the mimeType i get the text written in the iframe and with mimeType: I get nothing.
Maybe I am not using the right mimeType ? (I tried a few without success) Because this file apparently contains html, javascript and css....


I joined my html file.

Cheers,

Pierre

2015-02-05 12:56 GMT-03:00 Pierre CHANSON <chans.pierre at gmail.com>:

Hi Joachim and Sven, thanks !

actually it's a html file generated in the server side but as I have both client and server here I thought I could just use a file path for now, which would be turned into an url in localhost/file...

This html could be any local html that would have been generated separately.

Looking WAIFrameFunctionalTest>>#renderContentOn:, I realized that the sample.png was stored in a virtual folder, /files/WATestingFiles/sample.png which is in fact the WATestingFiles class, and the file is given as a ByteArray by a method.  Can't I change this virtual folder by a real folder ? Is it in the configuration ?

Pierre



2015-02-05 11:54 GMT-03:00 Sven Van Caekenberghe <sven at stfx.eu>:

Did you see WAIFrameFunctionalTest>>#renderContentOn: ?

In any case, you will have to serve the file somehow, for which there are several options.

Why do you want to do this ? What is in it ?

Because if you generated it yourself, you could just as well serve it directly on demand.

> On 05 Feb 2015, at 15:26, Pierre CHANSON <chans.pierre at gmail.com> wrote:
>
> Hi all,
>
> I am starting with Seaside and I would like to put a local file.html in an Iframe... I have to say that I am stuck with this. Any idea how I should do that ?
>
> Thanks a lot !!
>
> Pierre
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________  
seaside mailing list  
seaside at lists.squeakfoundation.org  
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150210/ede9503a/attachment.htm


More information about the seaside mailing list