Saturday, December 15, 2007

XmlHttpRequest script 2.0

Quite a while ago, I told you about this script that I had written, which would make xmlHttpRequests for me. Now I have made a version 2.0, I ramp up all the way to the next major version umber. Why? Because there are considerable changes, including ones in syntax.
I changed the name of my function, added an argument (called args for irony's sake). Besides that the script now supports POST calls besides the regular GET calls. Also, it no longer ought to make any kind of complain when new requests are made before the first one is finished.
The script is available from here, but there are some things I really want to say. For my bandwidth (even though it won't matter much) and your security, do not include the script right from my website. Instead, download it, and put it with your website on a host and then include it using a script tag. And to make sure I won't mistake you for a "includer" do not link directly to the file, link to this post instead.
If you stick to these few rules you can use my script. A guide is to be found within the file (all commented out of course) - using the script shouldn't be too hard. Good luck with your web designing.

Changelog

  • changed the name of main function from send to request
  • added an argument to request in preparation for POST support
  • changed GET cases to work with new args argument
  • added POST support
  • made XMLHttpRequest variable local - solving problems with multiple calls after eachother
  • renamed the XMLHttpRequest variable from submitting to XHRequest
  • removed time-out as changes should have taken away any reason for it
  • deleted highPrioritySend function, as it would do nothing now
  • removed global variables busy and time_out that were related to time outs
  • made receive an inline, unnamed function inside request - allowing easier variable names
  • removed global variable next_function, as this allowed todo to be used directly (woot, no global variables anymore)

Wednesday, December 12, 2007

POST in xmlHttpRquests

Just a quick hello and dropping by a link. It's what helped me getting POST working in xmlHttpRequest.
The point is that you actually need to set some headers, to go along with that request. No long story about it for now, just a link: http://www.openjs.com/articles/ajax_xmlhttp_using_post.php

Hope it helps some of you out.

The dilemma of a blog

Once again I have not posted in a while. And that's while so much happened.

That's exactly my problem. When I have much to do, I have much to tell, but very little time to tell it. When I don't have much to do, I have enough time, but not so much to tell.

I just stopped by to share that revelation, and to so hi to you all of course.

Hi!

Saturday, November 24, 2007

UGtech.net

Ages ago I was looking for a host. There were two criteria the host needed to meet. I wanted a free host, that allowed me to hotlink. Hotlinking is linking to non-viewable files. This means you can take images from this host and put on some other site of your's. Or you can put your downloads on this host that allowed hotlinking and link to them from another site.
That last thing was what I wanted to do. I had put my website on a really - and I really mean really - crappy host and wanted to have a place to put my downloads. I couldn't put them on the crappy host, because it didn't allow .exe files, or any archives. It took me a while, but I found something in the end, ugtech.net.
It had PHP and mySQL support and gave me a reasonable amount of space and bandwidth (100mB - 1000mB/month). Allowing hotlinking basically also meant there were no ads on your website. This is because any host that forces ads on your websites, doesn't get any hits if you are only hotlinking, thus only hosts without ads on your site (and only very few of those) allowed hotlinking. Besides all that UGtech provided cPanel. All of this couldn't even compare to any other free host.
I became active on the ultrageek-tech forum. And when they needed a moderator I applied. Being a very active member, I was the one chosen for the job. At that moment I was the only non-owner with rights on the site :D. Because the service was so amazing they attracted an amazing amount of "customers". And the 'ebay-offer' the owners intended to use to raise money, didn't work as good as they had hoped. Due to these two things they discontinued providing free hosting. They provided $1/month hosting instead. Moderators and administrators on the forum got to keep their hosting.

Later I moved my site to this host. And also started using it for about anything. A game I made for school was put on there, as they simply provided the best hosting I could get for free. Over the years, though, the forum died out and it started to get really hard to get support, even for those who paid. And they once even did not have a domain name for a couple of days. The same thing that happened now, happened back then, they didn't renew their domain and some dummy page was put up by the provider.
This time it happened just when I and I admin on the forum where discussing whether we could put some new life into the service, possibly even offering free hosting again. And this time it wasn't fixed within a few days. I checked the domain every day for a couple of days, but it didn't help. So I went looking for a new host, and when I had put my website up on the new site and I was browsing to it, my browser showed me my ugtech.net website URL, so I decided to have a look what happened if I entered it. Without expecting anything from it, I entered the URL and ended up on my own website. Then I also tried the ugtech.net front page, which also turned out to work.
The cPanel is currently broken, so the service isn't back to where it was before they lost their domain. And even back then the forum was dead and it was hard to contact about anybody. The start is there, though, and you should not be surprised when I post that ugtech.net is providing free hosting again.