Thursday, March 27, 2008
Thursday, March 20, 2008
Wednesday, March 19, 2008
Server Side Ajax for Classic ASP
There is probably a better name that Server-Side Ajax. its cool to be able to do this.
dim objSrvHTTP
Set objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.3.0")
call objSrvHTTP.open ("GET","http://www.govwaudi.com", false)
call objSrvHTTP.send ()
Response.Write (objSrvHTTP.responseText)
dim objSrvHTTP
Set objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.3.0")
call objSrvHTTP.open ("POST","http://www.example.com/test.asp?algo=1", false)
call objSrvHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
call objSrvHTTP.send ("variablename=value")
dim answer
answer = objSrvHTTP.responseText
Is there an easy way to do this in php?
dim objSrvHTTP
Set objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.3.0")
call objSrvHTTP.open ("GET","http://www.govwaudi.com", false)
call objSrvHTTP.send ()
Response.Write (objSrvHTTP.responseText)
dim objSrvHTTP
Set objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.3.0")
call objSrvHTTP.open ("POST","http://www.example.com/test.asp?algo=1", false)
call objSrvHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
call objSrvHTTP.send ("variablename=value")
dim answer
answer = objSrvHTTP.responseText
Is there an easy way to do this in php?
Tuesday, March 18, 2008
Inline SVG
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xml:lang="en">
<head>
<title>SVG embedded inline in XHTML</title>
<object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" implementation="#AdobeSVG"?>
</head>
<body>
<h1>SVG embedded inline in XHTML</h1>
<svg:svg width="300" height="200">
<svg:circle cx="150" cy="100" r="50" />
</svg:svg>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xml:lang="en">
<head>
<title>SVG embedded inline in XHTML</title>
<object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" implementation="#AdobeSVG"?>
</head>
<body>
<h1>SVG embedded inline in XHTML</h1>
<svg:svg width="300" height="200">
<svg:circle cx="150" cy="100" r="50" />
</svg:svg>
</body>
</html>
xmlns:svg="http://www.w3.org/2000/svg"
xml:lang="en">
<head>
<title>SVG embedded inline in XHTML</title>
<object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" implementation="#AdobeSVG"?>
</head>
<body>
<h1>SVG embedded inline in XHTML</h1>
<svg:svg width="300" height="200">
<svg:circle cx="150" cy="100" r="50" />
</svg:svg>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xml:lang="en">
<head>
<title>SVG embedded inline in XHTML</title>
<object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" implementation="#AdobeSVG"?>
</head>
<body>
<h1>SVG embedded inline in XHTML</h1>
<svg:svg width="300" height="200">
<svg:circle cx="150" cy="100" r="50" />
</svg:svg>
</body>
</html>
http://wiki.svg.org/index.php?title=Inline_SVG
Safari 3.1
This is copied straight from their apples website.
CSS3 web fontsWith CSS3 web fonts, web developers can now choose from a limitless selection offonts to create stunning new websites using standards-based technology. Safariautomatically recognizes websites that use custom fonts and downloads them asthey’re needed.CSS animationSafari is the first browser to support CSS animation. Now anyone can add amazinginteractive animations to their website using open standards. With CSS animations,web developers can scale, rotate, fade, and skew web elements for elegant, highproduction-value pages.HTML 5 media supportThe new HTML 5 media tags make it easy for web developers to deliver rich, interactivevideo and audio as a native part of any website without the need for proprietarytechnologies. The media tags also offer a rich scripting API for controlling mediaplayback.Improved SVG supportSafari 3.1 features improved support for Scalable Vector Graphics (SVG), so nowdevelopers can use SVG images anywhere on a page including HTML and CSSelements. SVG allows developers to create dynamic graphics with the web scriptinglanguages they’re familiar with.HTML 5 offline storage supportWith offline storage support based on the HTML 5 standard, web developers cancreate faster web-based applications that store their information on a user’s localmachine, and then access it instantly rather than having to re-download it overthe Internet.
Saturday, March 15, 2008
iterate through javascript object
function show(value)
{
var count = 0
document.write(showObj(value));
function showObj(o)
{
count++;
var ret = ""
for(var x in o)
{
if (typeof o[x] == "object")
{
for (var i = 0; i < count; i++)
{
ret += "-------";
}
ret += x + ": " + "
" + showObj(o[x]) + "
";
}
else
{
for (var i = 0; i < count; i++)
{
ret += "-------";
}
ret += x + ": " + o[x] + "
";
}
}
count--;
return ret;
}
}
{
var count = 0
document.write(showObj(value));
function showObj(o)
{
count++;
var ret = ""
for(var x in o)
{
if (typeof o[x] == "object")
{
for (var i = 0; i < count; i++)
{
ret += "-------";
}
ret += x + ": " + "
" + showObj(o[x]) + "
";
}
else
{
for (var i = 0; i < count; i++)
{
ret += "-------";
}
ret += x + ": " + o[x] + "
";
}
}
count--;
return ret;
}
}
Tuesday, March 11, 2008
css and tables
Css is great.
What a great concept. Separate content from design.
I started trying to learn css more today with regards to laying out an html document. Yesterday, I thought I had made a good page using css, until I viewed it in Internet Explorer.
Redoing the site was kind-of a nightmare, (first of all i'm not a css expert..yet, and trying to juggle the browser compatibility was hard. (Thanks to a friend who helped explain some css techniquess to me... redoing the site wasn't as hard as it could have been)
People say css replaces tables for layout
csszengarden.com at first convinced me of that.
However, I am not completely convinced any more. It may be too soon for me to blog about this but I don't completely buy the with css you can "separate content from design."
I found myself having to think of the layout of the site and then change the hierarchy of my div elements accordingly.
I also at at least one point had to put a div inside another div.
That doesn't sound like separating content from design but rather complicating your content to meet your design needs.
I imagine, with the complex and complicated use of "position:absolute", you can organize your document in whatever way you want, without regard to the hierarchy of the div elements.
sounds good...
But then if you are still having to think of the hierarchy of your divs in your content, aren't you better off just using a table with each cell as a div element. That table will be your default design, and if you want to change it you can "position:absolute" the divs and change the order.
however...
for simple things like a two column setup you can use a float and not worry about using a table.
I like this example
also...
In IE you cant do "display: table-cell".
(if you want to do things like vertical align or make a div only as wide as it needs)
(I don't know of any other way to do it)
You need an actual table to do that.
What a great concept. Separate content from design.
I started trying to learn css more today with regards to laying out an html document. Yesterday, I thought I had made a good page using css, until I viewed it in Internet Explorer.
Redoing the site was kind-of a nightmare, (first of all i'm not a css expert..yet, and trying to juggle the browser compatibility was hard. (Thanks to a friend who helped explain some css techniquess to me... redoing the site wasn't as hard as it could have been)
People say css replaces tables for layout
csszengarden.com at first convinced me of that.
However, I am not completely convinced any more. It may be too soon for me to blog about this but I don't completely buy the with css you can "separate content from design."
I found myself having to think of the layout of the site and then change the hierarchy of my div elements accordingly.
I also at at least one point had to put a div inside another div.
That doesn't sound like separating content from design but rather complicating your content to meet your design needs.
I imagine, with the complex and complicated use of "position:absolute", you can organize your document in whatever way you want, without regard to the hierarchy of the div elements.
sounds good...
But then if you are still having to think of the hierarchy of your divs in your content, aren't you better off just using a table with each cell as a div element. That table will be your default design, and if you want to change it you can "position:absolute" the divs and change the order.
however...
for simple things like a two column setup you can use a float and not worry about using a table.
I like this example
also...
In IE you cant do "display: table-cell".
(if you want to do things like vertical align or make a div only as wide as it needs)
(I don't know of any other way to do it)
You need an actual table to do that.
Subscribe to:
Posts (Atom)