dynamically embedding a surveymonkey survey into a div - javascript

Let's say I made around 5 surveys on surveymonkey, and I am using a developer surveymonkey account to try and manipulate these surveys.
My end goal is to dynamically give them a survey based on what actions they took on a page. Let's just say for a brief example there are 5 buttons they can press, and on each, a new, different survey would appear in a sidebar or something along those lines
I can use their API to return details of the surveys in my account, but I can't seem to find a way to add a new collector or dynamically embed one of my surveys.
Is there a way to go about this?

Related

How to show Multiple page having same content.?

I am creating a simple website which basic e-commerce website.it consist of product dropdown.on which multiple products display.like this.
My question is I have to make html pages for every product?(Keeping in mind layout and everything is same just content is different).
Is there any solution i can make only single page.and display product when i click on particular category.

Creating a Style Sheet Based on User Inputs With Node.JS

I'm looking for a way to create a custom user style sheet, based off of user inputs, using user inputs. Basically, users select different options, such as background colors etc., and then the app will create a style sheet based off their inputs. Their inputs are done through HTML inputs tied to some jQuery functions. The style sheets will be saved in a user database, that they can potentially view/download.
What's the best way to approach this?
There are two ways to achieve this:
Save css in database
Create actually file and while viewing parse it to display style classes.
Go through step below:
Step one: Answer your question in yes or no
Is your application is for web designers?
Is your application has one feature of theme?
Is there is frequent changes in css styling?
Is this feature for end user?
Step two: Find out your answer with keeping user in mind.
Step three: Take decision
If question 1 and 3 is yes then save it is in database and when web designer publish changes make style sheet, and fetch from DB for viewing.
If question 2 and 4 is yes then make style sheet, use that when you going to apply that sheet and parse for viewing.

Dynamically display database information onclick

I set up a web service using LAMP for personal use.
Basically, I have a scrollable list with some database information I pull once in the PHP script. I'd like to be able to click on one of the items, and have more information appear in a preview pane . (preview pane is set up)
I don't expect to ever have more than 100 entries in my database. Also, the data I'm pulling is very small...about 10 fields, all text data.
My question is as follows:
If I pull all the data I need in one shot, how can I store it so that each block of data I define (2-3 rows are what I need in the preview pane) is "cached" and I can access that given block at will so I can display it upon clicking its corresponding list entry?
Basically, this is about the same as clicking an email in a web-browser and having the rest of the message show up in a preview pane.
Thanks.
nb: the fact that I'm using a preview pane or a list is irrelevant. Just describing what I'm doing.
If I understand correctly, you would like to create a simple page, where several details are hidden until you click on different buttons. If you would like to do this in a "cached" way, you can try the following:
Fetch the complete data so that everything (with details) ends up in the result HTML. Everything: I mean, the parts which should be visible at all times and also the details which should be visible only after pressing a button.
Now, to the design. You will have to write CSS code, which will hide the details. (Of course, for that, you will have to create HTML in step 1 which will let you target the details via CSS classes, for example.) You will also have to figure out how to create buttons.
The most complicated part is to bind the buttons to Javascript actions, which will perform showing the hidden details. You can control all CSS properties from Javascript, so for example you can alter the position, the size, the text color etc. of a <div> dynamically.
Most people nowadays use jQuery for tasks like the one in step 3, or even software libraries built on the top of jQuery. That could help a lot if you're just starting out with tasks like this one. On the jQuery site, you will find a great place to start, called the jQuery Learning Center.
Edit: I've created a very basic fiddle to let you test the JS part of my concept, see it here: http://jsfiddle.net/eL9mj/22/

Request to appending more data to existing data

Please this question is just a request for guide. No coding had been started yet but based on recommendations, I will begin the coding. I am still new to JQuery.
I want to load all my blog posts using JSON API plugin. I have been able to create the code to load the posts and limit it to just 3 posts out of 11 posts.
I just want to know what the best approach or sequence is to add a link so when someone clicks on it, it then looks through the already displayed posts, checks for the last posts and then appends the next 3 posts until all 11 posts had been displayed before it either hides the Load more link or greys it out.
Please I just need someone who had done something similar to this to advise on the sequence to use.
Create a Load function to load the first 3 posts and store in a div (id=postcontent)
Create a click function that on clicking a class element (.loadmore), checks content of existing div (id=postcontent), does a count, compares the count to total of posts in json data (11), then looks for last post and appends another 3 posts and does a refresh to maintain the markup

block web parts in sharepoint from certain users

I'm looking to see if it's possible to block certain data in web parts from loading or showing for certain users?
I have a SharePoint page that was written in asp.net and JavaScript. What i have is a page that runs several queries and displays them as separate web parts. I would like to be able to block certain web parts that show financial information to only show for the managers group.
I am able to just hide the web part from showing at all but that isn't necessarily helpful.
any help at all would be greatly appreciated.
thank you!
I would create a hidden div that contains the users access level (or I guess you could use an array to hold / define unique users who should or shouldnt be able to to 'see' the parts)... then just write a function that reads the hidden field and based on the user who is viewing the page, show or hide the content based on the id of the web content element / part.
I would probably try to do this on the server side though before the content in question is sent to the dom.
good luck
A possible solution could be is to hide the webparts using audiences. Edit the page, edit the webpart, navigate to the properties, in the Advanced section you'll find something called "Target Audiences". Either use an existing audience (which you can create in the user profile service application) or enter a SharePoint group name (like the site members, of something alike 'managers'). Members of that group/audience will see the webpart then. Other users will not see the webpart.
Notice that this is not a security measurement. E.g. it's just preventing the rendering of the webpart, it's not preventing users from accessing the data if they know where it comes from.
Read more here: http://office.microsoft.com/en-us/sharepoint-server-help/target-content-to-specific-audiences-HA010169053.aspx

Categories

Resources