World: r3wp
[Web] Everything web development related
older newer | first last |
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> | |
Anton 4-Mar-2008 [1420] | (But hmm... maybe I wanted the base tag for something... I'll have to check.) |
PeterWood 10-Mar-2008 [1421] | Is anybody successfully running Rebol CGI scripts with Apache on an Intel Mac? |
Will 13-Apr-2008 [1422x2] | Hello, about JSON.r, the one on rebol.org is old, here is the latest http://www.json.org/json.r but working with the flickr api I found hopefully a bug, here is the patch: --- http://www.json.org/json.r +++ (clipboard) @@ -188,7 +188,7 @@ ] ex-chars: charset {\"} chars: complement ex-chars - escaped: charset {"\>bfnrt} + escaped: charset {"\>bfnrt/} ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!added "/" otherwise this returned from flikr! give error {{"name":"Taiwan Panorama \/ \u53f0\u7063\u5bec\u8996\u91ce"}} escape-table: [ {\"} "^"" {\\} "\" @@ -198,6 +198,7 @@ {\r} "^M" {\n} "^/" {\t} "^-" + {\/} "/" ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!see above ] digits: charset "0123456789" hex-c: union digits charset "ABCDEFabcdef" |
would be nice if the maintainer could update the rebol.org version 8) | |
Dockimbel 13-Apr-2008 [1424x3] | There's an approach that I'd like to experiment regarding web UI generation. The idea would be to consider the web page as a View target and build a View-like rendering engine able to process face objets and renders them as HTML. So it would be possible to generate HTML UI with VID directly. The DIV tag would be a good candidate to emulate a View face. |
The events system would be splitted in two parts : 1) A small part in JS on client-side catching keyboards and mouse-events and sending them asynchronously to the server. 2) A server-side part emulating the View event propagation engine through the face objects hierarchy. | |
Did anyone already tried such approach ? | |
BrianH 13-Apr-2008 [1427] | Qtask has, I think. |
Pekr 13-Apr-2008 [1428] | Doc - maybe you could communicate it with Gabriele. IIRc VID3 is flexible to generate various outputs. Look model is separated, but it would be better to ask Gabriele. |
BrianH 13-Apr-2008 [1429] | Wait, no. That approach would fall over when you run into network latency issues. It would work great on a LAN, but not over the internet. |
Pekr 13-Apr-2008 [1430] | as for JS, I am not sure it is fast enough. I saw Sun's JS based desktop, and it was joke compared to even VID 1 alpha speed probably :-) |
BrianH 13-Apr-2008 [1431x3] | Keyboard and mouse events happen too quickly, and people expect them to be handled quickly. |
It's not JS that would be the slowdown - it's the network connection to the server. | |
On the other hand, you could build a View-like rendering engine in JavaScript itself. | |
Pekr 13-Apr-2008 [1434x3] | yes, with Cairo crap instead of AGG, right? :-) |
but it is the possibility. Brian - I am not sure Sun's desktop was slow because of communication with server - dragging of stuff around the screen was slow. So I just wonder, if JS generated UI can be as fast as View (which is still not optimised) | |
but I think that view-like engine could be built | |
BrianH 13-Apr-2008 [1437] | With the DOM for regular UI elements, and Canvas for Draw once it is implemented more widely. The browser is a little weak right now, but that is improving, finally. |
Pekr 13-Apr-2008 [1438] | IIRC, when Cyphre did some game for Java enabled cell phone, he created small engine emulating faces |
BrianH 13-Apr-2008 [1439] | JavaScript doesn't have access to Cairo directly in any browser. JavaScript is not anywhere near as fast as Java yet. |
Dockimbel 13-Apr-2008 [1440x3] | Brian: true, network latency might be a show-stopper for such kind of apps over the internet. |
View-like engine in JS : that looks very doable, but I'm afraid the result might be too slow. I've worked some time with a rendering engine built in JS, and it was just a little slower than native UI, but not very scalable (performances dropping rapidly with a growing number of "faces"). It was BackBase : http://www.backbase.com. | |
So maybe the solution would be to handle those events that need fast response like typing text in a field, or mouse-over gfx effects, on the client-side and send others to the server. | |
Pekr 13-Apr-2008 [1443] | but what is the idea? to have one rebol view app with VID or browser UI? |
Dockimbel 13-Apr-2008 [1444x2] | The goal would be to use VID/REBOL to build web applications without typing any HTML or JS. |
So yes, to make the browser another potential "target" for View apps. | |
Pekr 13-Apr-2008 [1446] | then Gabriele is good target to consider, he might have some ideas, as he knows best what VID3 is going to be about. Imo we should skip VID2 ... |
older newer | first last |