Javascript called by PHP

Interesting little snippet.

What is going on here? Livewire gives you the low down.

 

 if($num_rowvs == 0){
 echo '<script>// <![CDATA[
alert("This is an alert message. I'm alerting you that you are totally awesome!");
// ]]></script>'; }

 

First, we’re creating a simple if statement in PHP.  Not entirely necessary, but prbobably the most common setup. Next we’re simply echoing the javascript alert – make sure to get your apostrophes and commas straight.

And that is it. Close out the tags and you have successfully called a javascript alert from inside PHP. Congrats.

More Web Design Blog Content

New apps coming down the pipe

We have 6 new apps coming out over the next few months. Very excited to roll these out – unfortunately we can’t give you too many details but we have a couple apps geared toward attorneys and the legal industry, one that deals with product shipping and another

Insurency SEO

Glad to have Insurency on board with the Livewire team. We did not make their website but we’ll be doing their Internet marketing. We have a great plan for them and will be proud to be competing alongside huge names like Geico and Progressive. It’s quite the challenge

Gainesville Web Marketing

North West Mini Storage and Warehouse is a new client of ours. We started optimizing their site about 3 weeks from the date of this post. Already a page 1 contender, our client now enjoys a surge in search engine traffic – all organic, all of it white

Google Removing Anonymous Reviews

So it appears, as far as Search Engine Journal is reporting, that Google is removing anonymous reviews. And, honestly, why wouldn’t they? If you’re going to write a review you should have the guts to state your first name … or take the time to create a fake

Best Seagate Barracuda Internal Hard Drive 4TB SATA

An Internal Hard Drive With Endless Storage and Impressive Speed. If you require vast data storage while not sacrificing speed, look no further than the Seagate’s Barracuda Internal Hard Drive Model ST4000DM004! With 4 terabytes of reliable storage you can store business documents, videos, pictures, games and movies

You get 15 seconds! Web Design Trends for 2016

Mobile is in and users are becoming increasingly impatient. In 2014, 55% of users spent less than 15 seconds on a webpage according to data by Tony Haile of Chartbeat.  This means you only have 15 seconds to capture a users attention and convert a visitor to a customer.