Survey monkey width issue

SurveyMonkey is popular online survey tool. It’s easier than ever to send free surveys, polls, questionnaires, customer feedback and market research. Plus get access to survey questions and professional templates

Survey monkey width issue

Survey monkey provides full control for its embedding code. But I found some interesting thing in it. My client gave me the issue that survey monkey embed code just breaking his prestashop template. I found survey monkey embed code in CMS

Survey monkey uses Badge script with iframe as I mentioned in the article Php profile badge script for your site

It was its height and width problem .The client doesn’t have the credential of its survey monkey .So i had to find another alternative. The trick is below.

Embed code provided by the survey monkey

If the result does not fit with our layout we can modify the survey monkey iframe code as blow

 

in above code we replace url http://www.surveymonkey.com/jsEmbed.aspx?sm=mykey
to an another url http://www.surveymonkey.com/s.aspx?sm=mykey
where mykey is your server key.

So with the new code you can control the embed code without going into your survey monkey account.

Thanks.

IE bug: Object doesn't support this action for "item"

As a web developer we have to write codes supported by maximum or all browsers.A few people love Internet Explorer,and our clients do not wan to skip ie users. Although there are many reason to hate the ie .but this strange reason added o my dictionary today :  Object doesn’t support this action.

I was testing a shopify site and in pre-installed theme there was a JavaScript function that add items in cart the word “item” causing this error of Object doesn’t support this action.
this function works well in other browser like Firefox and chrome but in Internet explorer it fails.after testing it by developer console of internet explorer I got this

ie_object

after a long search I found that item is reserved keyword for internet explorer, whether you are using internet explorer 8 ,ie 9 or ie 10 in any of your os xp vista ,window 7 or window8.
it is reserved keyword.you can’t use item as javascript variable.

so the possible solution of this is to remove all javascript variable item with some other like itemx or cart item

item is reserved keyword for internet explorer you can find the proof in this blog post

so next time you stuck with Object doesn’t support this action thing then check whether it is reserved keyword or not.

preview form before submit jquery plugin

preview form before submit is a common idea. idea of making such a plugin comes in my mind when i was working on a cake project and client ask me to do it.developer needs such a plugin most of the time and don’t like to write the same code in php js or jquery again and again.

preview before submit

What is it ?

previewForm is a tool for displaying form content before it goes to the server for processing.This plugin provides users to confirm the data before they are going to sumit it.
It was built using the jQuery library. Licensed under both MIT and GPL licenses

Demo

Feature

  • Preview the value of textbox.
  • Preview the value of selectbox.
  • Preview the value of radiobox and checkbox.
  • Preview password field if option selected.

Example

Example 1 With password preview.

Example 2 with password disable.

How to Use

 

1. First, make sure you are using valid DOCTYPE and correct form structure.

Your form must contain for tag of label with corresponding id of the field.
sample is
clip_image002

2. Include jQuery and previewForm JS files.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10/jquery.min.js"></script>

<script type="text/javascript" src=”previewForm / previewForm.js"></script>

 

3. Add previewForm CSS file

4. Fire plugin using jQuery selector

<script type="text/javascript">
$(document).ready(function() {
	$('#myform').previewForm({ show_password : false });
});
</script>

 

API & Options

KeyDefault valueDescription
show_passwordtrueWhether you want to show the password field in preview
extratext‘Do You Want To submit’Extra text before confirmation buttons
yesyesButton Label for yes button
nonoButton Label for no button
titlePlease previewTitle of preview dialog

Demo

Download