infovivait-com-au

TopDog Minders benefit from Website revamp

TopDog Minders is an Australia-wide dog minding service, joining dog owners looking for a holiday with dog lovers.

Wendy, the owner of TopDog Minders came to us for help – she’d been in contact with Web developers in the past who promise the world but didn’t deliver.  Their website needed a revamp, and we were more than happy to help.

In just a bit over 2 months, we turned their very dated website into a modern business tool, adding Quote functionality and building a platform for them to progress forward with further development and automation processes.

See the end product

Contact us for information about how we can turn your old, tired website into a modern masterpiece!

By |February 16th, 2015|Latest News|Comments Off on TopDog Minders benefit from Website revamp

“Cannot perform runtime binding on a null reference”

The other day I was testing MVC some code, and after my form submission my application kept on coming back with an exception:

Cannot perform runtime binding on a null reference

Ok cool, I thought – I hadn’t set a variable properly.  Confusion reigned when I stepped through the code, just before the model was returned to the view and found, lo and behold – the variable in error is NOT null and was very much a valid data item.

What?  Why would the compiler tell me that my variable (using the Html.Hidden MVC Helper method) was empty when it clearly wasn’t.

So then I commented out the code, only for it to happen on the next line.

What?

After a few minutes of asking my PC “What?” and “why?”, I realised that the debugger was telling me lies, and that there was an issue with a null reference – just not in that point.

Turns out I’d added a ViewBag data item in the GET method, but in the POST method I hadn’t re-populated it.  This was an IEnumerable which was the basis of a list, hence the reason why it was needed when the view was returned to the model.

Once that was rectified, all was right in the world.  Phew.

Moral of the story – Don’t believe everything you read, not even .NET debugger notices!

 

By |August 21st, 2014|Hints and Tips|Comments Off on “Cannot perform runtime binding on a null reference”

Viva IT partner with James Cook University for Student Placement

Viva IT Services is proud to be partnering with James Cook University as a placement provider for students in their Masters of Information Technology degrees.

The students will be given a project to work on, to reinforce the skills learnt throughout the degree and the give them some level of commercial experience.
“We feel allowing students to come on board and take part in the development activities is a strong part of who we are.  All developers have to start somewhere – it’s difficult as a graduate, and these sort of projects in commercial IT firms are the perfect opportunity for students to show their skills to potential future employers”
The students will complete their placement towards the end of October.

By |August 20th, 2014|Latest News|Comments Off on Viva IT partner with James Cook University for Student Placement

Roster Planet – Rostering Made Simple

We proud to welcome Roster Planet into our fast growing customer base.

Roster Planet is an online service allowing businesses to easily and very quickly generate Rosters for their workplace.  By adding in your staff, and your usual shifts – rostering no longer becomes a tedious process, as adding and removing a staff member from a shift is as simple as drag and drop, or click to click.

Founder Kerran Evans was able to see Roster Planet evolve from an idea, to the software system it is now.

Roster Planet is available on both Mobile (Apple and Android) and web-based platforms, and is free to use with unlimited rosters, staff members and functionality *.

 

* Free at the time of writing

By |July 18th, 2014|Latest News|Comments Off on Roster Planet – Rostering Made Simple

Redirect to different page using Contact Form 7

Today I had a request from a client who wanted to redirect users who submitted a particular form on their WordPress website to a different page on the site.  The reason for this is they had quite a few people who filled out the very large form, didn’t notice an error and then left thinking it had all worked.

You’d think it’s pretty easy right?  This proved to be a bit more complex than first thought.

Research showed adding this into the “Additional Settings” part of the Contact Form would just do the job:

It didn’t.  That led me up the garden path of JQuery installations and references within the site, all of which were fine.

Then I stumbled across this solution, which did the business in a matter of minutes.

Step 1

Add the following to your Theme Functions file (functions.php).  This adds code to the post-mail-sending process of the contact form.

Step 2
In the contact form – go to the Additional Settings (right down the very end of the page) and add in this line:

(Naturally you would replace the part in red with the URL you want to redirect to).

Then – head to your contact form page on the website and try it out.  For me it worked first time!

 

Nested Forms using HTML5

So many times I’ve built software with a single form, and plenty of AJAX buttons perform other key functions.  This can be done by adding buttons which perform a task different to the main form, and posting using AJAX to perform the data changes.

It works well.  But it does require a bit of extra work to advise the user that yes, they did actually click on the button and yes, the website is actually working.  Disabling the button, showing an in-progress indicator – there are many choices here.

The number of times I’ve thought – wouldn’t it be great if we could just setup a nested form and perform a nice easy submit that does the job.

Well – now you can.  Thanks to the wonder of HTML5.  And it’s so much easier than you’d think.

Let’s say we’ve got this setup:
<form method=”post” action=”/action/save”>
<input id=”id” name=”id” value=”someid” />
<input type=”submit” value=”Save” />
<input type=”submit” value=”Delete” />
 </form>
One form – a save button and a delete button.  The setup above causes some problems, because two submit buttons means both will submit the absolute-parent form (/action/save).  We can add further parameters in on the button to see which was called, but really – why?

Especially when you can do this using HTML5:
<form method=”post” action=”/action/save” id=”save-form”>
<input id=”id” name=”id” value=”someid” />
<input type=”submit” value=”Save” form=”save-form” />
<input type=”submit” value=”Delete”  form=”delete-form” />
</form>
 <form method=”post” action=”/action/delete” id=”delete-form”>
<input id=”id” name=”id” value=”someid” />
</form>
So easy – add a “form” attribute to the submit buttons in the parent form.  Then – outside the parent form, setup a small form with just the controls required to post to the action.  Wire up the “form” attribute to the ID of the relevant form, and bingo – you’ve now got multiple submit buttons posting correctly to the relevant […]

Repeating Windows batch commands

Often I need to run an installation script on a database, and then run a series of repeated commands to get data up to date (for example, pre-set a number of rows in a database for timesheeting or creating a number of default entries).  If you’ve got an executable that you need to run a number of times, you can use this command to do it.

for /l %x in (1, 1, <repeat-n-times>) do <command>

where <repeat-n-times> is the number of times you want to repeat, and <command> is the dos command you want to run.

For example, if I wanted to repeat the time 20 times in a row (not sure why this would be useful – but good as an example!):

for /l %x in (1, 1, 20) do echo %date% %time%

If you’re running it in a batch file – then you’ll need two % symbols instead of one, ie

for /l %%x in (1, 1, 20) do echo %%date%% %%time%%

If you have multiple commands for each iteration of the loop, do this:

for /l %x in (1, 1, 20) do (
echo %x
copy %x.txt %x.txt.%x
)

 

Attipas Australia benefit from our upgrades!

We’ve just helped Attipas Australia update their website to use the latest in world-class web content management system WordPress.

We’ve updated their site, updated their WordPress version and all associated plugins, made their hosting more bullet-proof (meaning less downtime) and even undertaken a few automation jobs to help make life easier for Caroline and the Attipas team.

See the full project profile in our Portfolio

 

Welcome to our Blog

Welcome to the Viva IT Services blog!

We’ll post great little tips and techniques for building software, as well as some news around the IT world that makes us sit up and take notice.

If you’re a tech-head interested in software development, make sure you keep any eye here and also like us on Facebook!

If you’ve got any questions or you would like us to post something about a particular point related to software development, make sure you contact us here.

Mark

Welcome to our new look home!

Welcome to our new look website!

Same features, fresh new look.  We’ve moved and are now on a fast new connection, meaning this website is now as fast as it can be.

If you would like your website to look as great and run as quickly as this one does, make sure you contact us today for an obligation free quote.