benwells.me.uk

see all articles

see all articles from Graphics

New Article function

I have sorted out the new article function for the site. It largely uses the same system and tags as the rest of the site but allows me to add larger articles and more informal content.

One of the differences is that articles can be related to more than one page. This article is currently linked to the Home and Websites page. I added javascript to merge the two related forms into one when the article is saved. The selection for page links has a noscript submit but I have yet to implement that in the save file.

The most challenging thing about gtting multiple forms to submit was adapting the code from codetoad. It was all straight forward but was skipping elements at this section: for(i=0;i<frm.length;i+=1) to.appendChild(frm); I finally figured out that because the fields are taken from the original form its length decreases each time decreasing the frm.length so I altered it to: for(i=0;i<total;i+=1) to.appendChild(frm); This time it worked so I could sift through all the post values beginning with link to upload to the database.

In relation to how they work on the page, the page data picks up the articles based on requests and shows the latest four on each page. At the bottom of the list you can view all or all page related articles. I created the code tag (not html code tag but the vesion demonstrated in the Latest News page of Home) for writting about codes. Anyway, that is content for another article anouther time.

Return by Id

I thought I'd start from the beginning with a function I use lot in javascript. This is very simple call with an id to retrieve and object: function return_by_id(id) {
if (document.getElementById)
var return_var = document.getElementById(id);
else if (document.all)
var return_var = document.all;
else if (document.layers)
var return_var = document.layers;
else return false;
return return_var;
}

read more

New Job

Currently working at Fluid Creative Media and it is going really well. The people are lovely and the work s steady and so far manageable.

In my first month I have tampered with google maps functions and started extending a CMS for an important client which I hope all goes well. The new year will bring more challenges but I feel I can handle them now.

read more