scriptygoddess

"Why am I getting that Javascript error?? WTH is it talking about – submit IS a function!!"

So here's the deal – if you have a form and an element in the form is named "submit" – if you try to call document.myform.submit() – you'll end up getting the "submit is not a function" javascript error. (Because to javascript – "submit" is now that object element in your form – not a function)

So the simple solution is if you plan on using the javascript function submit() – do not name any of your form elements "submit".

That's all well and good except if you're working on code that isn't completely yours – and if the PHP code to process the form is specifically looking for $_POST['submit'] like so:

if (isset($_POST['submit'])) { // process form }

then you now have another problem.

This was the case I ran into with CubeCart recently. Most of the forms do not require a submit element to be in the form in order to process it – but a handful did. The design I was working on needed all the buttons designed and to look the same. So my options were:

1) Just use the regular input type="submit" button on those forms. (Ok – but then the site is inconsistent)

2) search for all instances of (isset($_POST['submit']) in the code and change it to some other element I can add to the page… ie:

<input type="hidden" name="formsubmitted" />

and then in the code:

if (isset($_POST['formsubmitted'])) { // process form }

(Obviously this is not recommended in the case of CubeCart as it will make it really annoying to maintain/upgrade the cart!)

3) add that other "formsubmitted" element I noted above to the pages that need it – then towards the top of the MAIN index.php page (which is called with all pages on the store) add the following:

if (isset($_POST['formsubmitted'])) $_POST['submit'] = 1;

Thereby setting the value of $_POST['submit'] so it will process the form…

Another tip with using css-styled links for buttons that will submit forms in CubeCart – you don't need to use document.FORMNAME.submit() – from any form you can use their "submitDoc('FORMNAME')" function like so:

<a href="javascript:submitDoc('FORMNAME');" class="myButtonStyle">Send Form</a>

Just make sure the form has a name (some of them don't).

Comments Off on Submit is Not a Function (and getting links to submit all forms in CubeCart)

On one of my projects recently, they needed a dynamic bar graph that would show the progress towards a goal of donations. I've never done something like that before, and it turns out it's actually pretty simple to do. I'll explain how the code works and then include everything at the end.
Read the rest of this entry »

12 Feb, 2008

Buyer Beware! Do not host with HostICan!

Posted by: Jennifer In: complaint department

Rather than clean up this post – which was updated throughout my ordeal with them – I wanted to summarize the problem I had when I was hosted with HostICan.

When I first switched to them, they seemed great at the time. I was very happy. I even signed up as an affiliate and recommended them, sent clients to them. A few months after I signed up however, the problems began…

At first I got a threatening email from them saying my site was using too much CPU/Memory. I could not get any kind of helpful response via email so I finally called them. The guy I spoke to said it was a momentary spike – everything was fine – lets see if it happens again.

A few weeks (?) later, it happened again. Again, I called and was told to install wp-cache and that should fix the problem. So I did.

I had a few more back and forths with them. The end result was that starting in 2008 I think they changed their monitoring systems, from a threatening email – to simply taking your whole site down.

My site has not had a massive increase in posts, or visitors in a few years. In fact, because I've been so busy, posting here has been less and less, and number of visitors has roughly averaged the same or less.

Simply put, I wasn't happy with their service anymore. In my previous post, people said "What do you expect when you pay ~$6 for hosting" (Actually I had paid more than that – but whatever). No matter what – if that's the service you get with cheap hosting – so be it. But what happened next is inexcusable.

On their site, they say that if you're not happy, you can get your money back… they ALSO say that if you are not happy within 30 days – you can get a full refund. Well, I'm not looking for a full refund, but since I paid for TWO YEARS up front, and the service obviously isn't working for me anymore – I would like to get a prorated refund. This is standard policy with every host provider I have ever contacted. On their site the "30 day RISK FREE money back guarantee" wording – is COMPLETELY SEPARATE from their "Service guarantee":

SERVICE GUARANTEE:
We guarantee that we'll provide quality service:

* 99.9% Uptime Guarantee
* 24/7/365 Phone & Email Support
* Your satisfaction or your money back. (emphasis mine)

When I canceled I asked for my prorated refund, and I was told I would get nothing because I was canceling outside the 30-day window. Their friendly response:
You seem to miss one vital thing "30 day money back guarantee" and this applies within the 30 days "Your satisfaction or your money back." not within 7 months.

They want to massively restrict CPU and take everyone's site down – I guess, sure, thats what you get with cheap hosting – but to put up a VERY misleading "SERVICE GUARANTEE" – and keep hundreds of dollars for hosting I'm obviously not getting/using… This is a good business practice??

Whatever the restriction is on CPU usage – it was so tight that I had A LOT of problems getting my database off their system… I would try to export the database, and it wouldn't let me… I had to manually export most of the rows for my posts and comments in small increments – and even then it skipped a few. It's also interesting to note that if you browse around on their forums, you'll see a bunch of people complaining of this problem.

People – be forewarned… This is not just cheap hosting… this is a BAD BUSINESS. I STRONGLY advise against hosting with them.

06 Feb, 2008

To iPhone or not to iPhone

Posted by: Jennifer In: babble

I'm seriously contemplating getting an iPhone. This is kind of funny for two reasons – 1) 2 years ago I swore off pda phones. I never carried it with me, because the bulky pda phone I had did not fit in my pocket, and if I couldn't just grab it and throw it in my pocket when I quickly dashed out of the house – it would never come with me – and a mobile phone isn't so useful when you're mobile and it's stuck at home. 2) When they announced the iPhone I thought it looked pretty cool, but didn't think I'd ever have a use for it. My little phone worked just fine – it made calls. At the time that's all I needed it for. Then I added a text messaging plan… and then the ability to check emails – the last two worked but the little phone wasn't really good at doing anything other than the original purpose – make calls. I tried to get it to connect to google maps… I only tried once, it was a major pain and really didn't work.

When my brother showed me his iPhone a few months ago, and I saw how cool it was, I definitely had gadget envy. The touch screen wasn't as confusing as it looked on demo videos. The keyboard I found easier to use than I expected (and WAY easier than txt msg with only 13 buttons). My cell phone plan is up and quite frankly I'm unimpressed with any of the new Verizon phones…

So I was just wondering for anyone who stops by here – if you have an iPhone – do you like it? Why? Can you just throw it in your pocket easily enough? I use a PC – how does it do for syncing with the PC? Where do you store your address book – how well does it sync with the iPhone?

I was able to stop by the WordPress meetup here in Utah and finally got to meet The Matt! After "knowing" him online for many years. (By the way, it probably goes without saying – but Matt is a very cool guy. It was really nice talking to him, and I really liked listening to his thoughts, ideas, and plans for WordPress. As introverted as I am, and as difficult as it was to *get out of the house* LOL – I'm really glad I got up there to meet him) In talking to him, he suggested I really needed to get Scripty into some current social networking trends – like Digg – Yeah, I know. This site, as clearly apparent from the default template, has sadly been victim to my ever expanding freelance work. But with the snow storm that rolled through here, and nothing else to do this morning – I finally got DiggBadger installed. So now my posts can be dugg if you feel so inclined…

This is probably considered "Javascript 101" – but I still had a bit of trouble finding just the right syntax to work. Simply needed a button to open a new page (in the same browser window):

<input type="button" value="THERE REALLY ARE OTHER SEARCH ENGINES!"
onclick="location.href='http://www.yahoo.com'; return false" />

Comments Off on Have button (input element) go to new page with onclick

UPDATE: If you're reading this then you're reading me from the new host. Crossing fingers this works out better. (I could cleary see there was something wrong with HostIcan just in trying to do the move. For starters it took my site down just taking a backup of my site. As well it would not let me pull down a full backup of my database, and just reviewing the database to double check which lines it had decided to skip when trying to run the download, took the site down (meanwhile the new host had no problems with that). I have noticed a few "timeouts" – hopefully that's something that will work itself out. /sigh

———————

I am SO SORRY. To anyone who followed my advice and signed up with HostICan – I'm sorry. I'm SO SORRY. A million times over. As well, I am SO SORRY that I am hosted with them. If nothing else it was a huge learning experience on what to check on with a host provider.

When I first switched to them I thought they were great. I loved them. Well… the honeymoon is DEFINITELY over!!

You may have noticed that sometimes when you come to my site a "warning" of sorts is up that says I'm using too much "CPU/Memory" on their servers. NEVER. NOT ONCE on any host did I over use too much CPU/Memory – certainly not on a regular day to day basis. And anytime I might have had a script that I was running, the host helped me pinpoint which script was causing the problem. (I'm haven't put anything new like that on my sites for a long time). (This didn't even happen the time that my site got slashdotted.)

Despite saying this on their website:

SERVICE GUARANTEE:
We guarantee that we'll provide quality service:

* 99.9% Uptime Guarantee
* 24/7/365 Phone & Email Support
* Your satisfaction or your money back. (emphasis mine)

(Which, by the way, is NOT under the heading "30-day money back guarantee") they still say they will not give me a refund / pro-rated or otherwise. (I paid for two-years up front when I signed up with them – and did so thinking that I would be able to get a refund (LIKE THEIR SITE SAYS) should things not work out.) So now I'll be calling my credit card company to dispute the charge – and hopefully switch to a new host as soon as possible.

Ugh.

This by the way is the letter I'm sending my credit card company:
Read the rest of this entry »

For a long time one of the things I've liked about WordPress is it's flexibility. I recently did a project for Savvydog Design for one of their clients: the National WASP WWII Museum – that involved doing some customizations to WordPress. They wanted most of the pages on the site to be editable (I used WordPress' pages functionality here), they also wanted to be able to enter in news items (these would be standard blog posts with a category of "news"), as well as be able to enter in events (these would also be standard blog posts with a category of "events"). They wanted the home page of the site to show some (editable) content at the top, and then list the last 3 news or event items. On the side bar, they wanted to be able to list the next 3 upcoming events. Here is how I put it all together:

*Please note – some of the customizations take a few things as assumptions – (for example how you have your permalinks set up, etc.) So if you use any of this, do so at your own risk (most especially the part about editing a core WordPress file – I'm sure I'll get heat for that from SOMEONE.) Your mileage may vary, and I don't guarantee this will work with your setup, yadda yadda yadda…
Read the rest of this entry »

I've now used CubeCart 4 for a number of clients recently, and I have to say I'm pretty impressed. As with any cart – the features still have to match your needs, but for the most part, the clients I've implemented this for were able to get the features they had wanted. Then add in a few mods, and we're in even better shape. I also want to mention that CubeCart 4's support has been fantastic! Great customer service, helpful responses, with reasonable response time. They're in a different time zone than me, but normal requests would be answered within a day – when I had a critical issue it was responded to within a few hours that same day. And as before, customizing their template has been pretty painless. I've been really happy with them and they've moved up to the top of my recommended list for cart software.

So to get things working just so with a few of my recent implementations, here are a some tricks I did: (Some of these little hacks were actually given to me by CubeCart's support, although they do specifically say they don't support changes to core application files.)
Read the rest of this entry »

08 Dec, 2007

Google labels Scriptygodess as pariah

Posted by: Jennifer In: Announcements

A note to anyone brave enough to come here from Google: Scriptygoddess never has (and never will) distribute malware. I honestly have no idea where they got that idea from, unless this is their retribution for me pissing about their business practices previously.

All paid links have been removed from this site for some time now. The only ad on this site besides Google's own adsense (which I make crap from by the way and will now probably just remove entirely) (Google's ads have now been removed. If I'm not making money on this site, then neither will they) is an ad for the hosting company I personally use and have been recommending to people because I think they're a good hosting company. (HostICan (now called "HostISuck" in my house) ad has been removed. I'll probably make a post on them too soon) I have NEVER distributed malware. Never. Not once. So where they got that idea from is completely fabricated and a total lie.

You should know that I make NO money off this site now. It is purely a public service and information personal storage house.

I have asked for a reconsideration from Google, and they say that may take some time. (as in several weeks) Heh. I would greatly appreciate anyone's/everyone's help in this matter. Please make a post on your site that Scriptygoddess is alive and well and DOES NOT DISTRIBUTE MALWARE, despite the lie that Google tells.

update: So after further investigation, it seems my site had been hacked and in such a way that made it hard for me to even notice. A hacker was able to add a line of code to one of my template files and from the way it was written it seemed it wouldn't even have shown up in the html unless you were specifically coming from Google. Google is supposedly in a war against spammers and hackers, and in their fight I guess they don't mind punishing some victims as well. (How noble of them.) =puke=

The strange thing is that I am running the latest version of WordPress, I am (obviously) not even using a customized template, I am using VERY FEW plugins… so now I'm left wondering what the deal is with WordPress – or the few plugins I have running, that would allow the hack to go through. I've been searching around online to try and find more information, but I'm not getting anything back specific. (What I HAVE seen on the forums seems like a lot of defensiveness to me. People saying they have some kind of XSS hack on their site, and then other people trying to put the blame elsewhere) I've sent a few emails to a few WordPress people – but haven't heard back. This is distressing to say the least. I love WordPress, but if it means having my site get hacked without my even knowing it and then getting banned and labeled by Google as a malware distributor… I don't know…

Update: 12/18/07 – FINALLY! Google has lifted the "malware" curse on Scriptygoddess. Guess that was my belated Hanukkah present. Good thing too – because I've been very busy the last few weeks – have a post due probably after the holidays about a cool site I did using WordPress – all kinds of custom templates for posts and pages, and basically stretching WordPress's CMS ability. As well – I did a very cool site using CubeCart and I have a few things I learned from that experience to post about. Stay tuned…

(oh, also, – seems I got a PR push as well – from a 3 to a 5. Of course, I used to sit comfortably at a PR6 – but I'll take what I can get. LOL!)

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements