r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Web] Everything web development related

Pekr
18-Jun-2007
[1370x3]
so, we can start with static page. Then we slowly turn it to dynamic. 
All my gfx man has to do is to later add some markers there. RSP 
ruins that aproach imo.
in order to work, I don't want my gfx man to play with any rebol/php 
code on his side ....
my aproach has some disadvantages too, e.g. remark can compose subpages, 
so you don't need e.g. to repeat footers, headers, etc.
Maxim
18-Jun-2007
[1373x3]
remark MOD will allow all you are saying above  :-)  that's the point. 
 the advantage is that you can hide and integrate all those tricks 
on a programmable per site/ per page / per element .  since each 
tag receives the content its handling, if your outer tag can handle 
caching on the server side, well just do so.


remark changes HOW you can do your tags cause they are NESTED.  and 
can return dynamic stuff... not just html.
what I want to do is build a tag which caches its parsed data unless 
a trigger even occurs.   this would, for example allow you to cache 
parts of pages or whole pages... depending on where you put the <cache! 
> tag.
its not all done, but its the concept.
Pekr
18-Jun-2007
[1376x2]
that will not work?
simply put - open your template in a browser - does it display its 
content flawlesly? (without interpretting templat). If not, than 
it is not what I want :-)
Maxim
18-Jun-2007
[1378]
well, that will depend on what you mean by template and what your 
template contains... if you talk about a frame (or various sub parts 
of a page) which hold html, yes remark can have these with no remark 
tags within... so you can linkup an html page based on artists work, 
and add up your dynamically created content.  But remark even allows 
you to programatically include those little html parts at any level, 
so one of your dynamic tags could in fact be loading just menu titles 
which which your gfx artist created manually.  but their placement 
or the choice of which set to load would be controled within the 
dynamic tags.
Pekr
18-Jun-2007
[1379]
max - simply put - what will any <cahe!> tag, which is NOT even paired, 
do, if you add it to html source, and you display it?
Maxim
18-Jun-2007
[1380x4]
the cache! tag would be a wrapper you add to some "constructor" page.. 
the actual elements which compose your page, are still visible and 
useable directly.
remark has a way to add tags OVER your page so that your source remains 
unchanged... that is where you could put a complete page cache if 
you wished.
the cache is not yet done (cause it makes no sense in a static env)... 
but I count on trying to add it to the default toolset in remark 
v2
henrik... the shorthand for remark is rmk btw  ... I just realised 
that's your  initials    ;-)
Henrik
18-Jun-2007
[1384]
hmk, not rmk, but close :-)
Maxim
18-Jun-2007
[1385]
right... <sigh>  must be getting tired ;-)
Pekr
18-Oct-2007
[1386]
I would like to resolve following situation:


- on our kiosk, we have following set-up - Apache running locally, 
and once Windows starts, it runs http://localhostin full screen.

- I wanted operator to have more easy life (not taking wireless keyboard 
each time), so I wrote View script, which sits in the memory, and 
waits for USB drive to appear. Then it copies new stuff from USB 
drive to C:\kiosk dir.


However - we found out, that the presentation still returns old pages. 
They seem to be cached somewhere. What should I do about it? Improve 
script to:

- restart presentation?
- restart Apache service?
- disable caching somehow?
- flush the IE cache somehow? (could take long)


And remember - the aim is for the operator to have seamless operation 
- plug-in USB disc, wait for update, unplug disk.
ICarii
18-Oct-2007
[1387]
probably the best option is to disable the IE cache
Allen
18-Oct-2007
[1388]
Under IE7 the Temporary Internet Files control dialog, 
is now hidden under...

menu: tools/internet options
tab: General
section: Browsing history 
button: Settings
Sunanda
19-Oct-2007
[1389x2]
Disabing the cache via IE's settingsis simplest -- but you do need 
to remember to do it for each machine you set up / update / reinstall 
/ etc. Plus you may want to change browser later.
Another option is to send the HTTP headers to say the pages are not 
to be cached.
Pekr
19-Oct-2007
[1391]
can I configure that with Apache somehow?
Sunanda
19-Oct-2007
[1392]
Never tried it that way myself (I always add headers in the CGI script).
This link suggests you can tweak your .htaccess to do it:

http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html
Graham
19-Oct-2007
[1393]
If you make it all cgi, then your pages will never be cached.
Sunanda
19-Oct-2007
[1394]
That may be true for more intelligent browsers, Graham.
But, sadly, IE regularly caches pages with parameters.
Robert
8-Nov-2007
[1395]
Guys I have a short question: Is there a simple and fast way to avoid 
that a html-formular is position back to the top after a drop-down 
box has been selected which triggers a server call?
Brock
9-Nov-2007
[1396]
Robert, I believe there is an inherint post-back done by the drop-down 
selection, so the only way around this would be the use of AJAX. 
 I'm sure someone like Terry or any of the other web guru's around 
here will be able to confirm.
Terry
9-Nov-2007
[1397]
Try adding 'return false'  with your javascript..  ie:

onchange = "myfunk();  return false;"
Robert
9-Nov-2007
[1398]
Terry, I will try. Thanks.
DanielSz
9-Nov-2007
[1399x4]
Hi, I'm looking into Chris' emit-rss.r script, however, when I run 
the

usage example provided in the header, all I get in the my-feed.rss 
file
is this:

No Item Author Details - "Journal Entry title...."


I believe it is used on Carl's blogs, so I'm surprised, it should 
be working. 

Thanks in advance for any valuable clues...1
Funny, I unearhed another rss generator from the message archives 
on rebol.org. Here's the header:
REBOL [
>         Title:          "RSS Generator for Carl's Blog"
>         Date:           31-Dec-2004
>         File:           %carl-rss.r
>         Home:           http://www.livejournal.com/~premshree
>         Author:         ["Premshree Pillai" "Gregg Irwin"]
>         Version:        0.0.3

>         Purpose: {Generate valid RSS 2.0 feeds for Carl's blogs}
>     Comment: {

>         0.0.2 Massive code changes for instructional purposes. 
--Gregg

>         0.0.3 More changes, knowing Carl actually wants to use 
it. :) --Gregg
>     }
> ]
But new-blog.r (Carl's blog srirpt ) requires emit-rss.r, relegating 
the previous one to oblivion. Talking about "archebology "...
Chris
19-Nov-2007
[1403x2]
Author should be ["author" email] -- this is due to the email requirement 
in the RSS specs (you can nix it easily in emit-rss code).
Hmm, I thought that the author format was supposed to be "Author 
<email>" but appears to be "email (Author)" -- did this change at 
some point?  (have to say, prefer Atom myself...)
Anton
10-Jan-2008
[1405x6]
Any DOM experts here ?

I have a frameset with two frames, and in the first frame there is 
a menu implemented with <ul>.

I am wondering if I can move the <ul> menu out of the frame into 
the top level document. (The frame exists only for the menu, so I 
should be able to size it to zero so that it does not obscure the 
top-level doc.)

This would mean I could keep the website frameset-oriented without 
doing the work of converting it to single pages. And frames allow 
pure HTML to include code efficiently.

I found document.body.removeChild(elem), but I get lost when I try 
to identify the new location and createElement.
Can anybody help with that ?
By the way, I didn't play much with the DOM until recently.
I found that appendChild(elem) should do the move.

But still difficulty navigating the DOM tree to get to the right 
place where it can be inserted.
eg.  top.frame2.appendChild(elem)  is not working.
Frustration: The DOM inspector says the frame has a property "contentDocument" 
but I can't seem to get at it.
omg - I am starting to think it can't actually be done.
http://www.thescripts.com/forum/thread91710.html
what a heap of crap
Oldes
10-Jan-2008
[1411]
use DIVs instead of frames
Anton
10-Jan-2008
[1412]
Yes, I know it's better to avoid frames, but the site is already 
using frames, I am just modifying the navigation (or so I think).
Will
11-Jan-2008
[1413]
load the jquery library into your site and make your life much easier, 
it makes manipulating DOM a kid game 8) http://jquery.commaybe look 
also for the accordion or tree plugin for your menu
Anton
13-Jan-2008
[1414]
Thanks, WIll. A very nice suggestion. I will wait until my optimism/web-technology 
faith returns :)
Anton
3-Mar-2008
[1415x5]
Here's another question that I wish I didn't have to ask.

This doesn't work. I can't find how to reference navList even though 
it's in the same page.
What is the way to reference navList correctly ?

<html>
<body>

<ul id="navList" >
	<li>Hello</li>
</ul>


<a href="javascript:alert('width: ' + navList.name);">navList width</a>

</body>
</html>
Hooray! found the answer

<a href="javascript:alert('width: ' + document.getElementById('navList').offsetWidth);">navList 
width</a>
Seems simple, in retrospect.
Not so simple... it doesn't work in a frame for some reason.
Aha !  Tracked it down. In my frame I had a BASE tag. This caused 
the javascript error:

Error: document.getElementById("navList") has no properties

Source File: javascript:alert('width: ' + document.getElementById('navList').offsetWidth);

<html>
<head>

	<base target="_top" /> 

</head>
<body>

<ul id="navList" >
	<li>Hello</li>
</ul>


<a href="javascript:alert('width: ' + document.getElementById('navList').offsetWidth);">navList 
width</a>

</body>
</html>