I created a wordpress template for a customer and I used a plugin to allow registered users to customize his profile. The issue appears when I'm trying to change the profile photo, the modal windows that allow that don't charge!
Please see this picture: http://tattoobiter.com/custom.png
I tried to insert manually (in chrome console)
<div id="um_umpload_single"></div>
in </div class="um-modal no-photo"> and it works correctly till refresh the page.
I think something of my template don't let javascript to charge correctly, but I can't understand what...
Please help!
I tried to insert the first div in the second with append jquery but don't work...
Problem solved, It seems wordpress have problems to charge javascript external scripts if don't have the "".
Related
I've a problem that I'm not really sure if can be solved:
I want to have a modal that pops up in sites of my clients. If a user goes to a client page, after some second, my pop up will appear.
I have built my modal pop up using bootstrap, jquery and some other javascript.
The problem is: there is a way to avoid the inclusion of my css in my clients' pages? This is because, maybe, one of them does not use bootstrap and using it will change the presentation of his page.
So, there is a way to include only a javascript that calls my server to get the information it needs (css etc...)?
I thought that I could include my code in an Iframe, but there is a way to have the pop up display in the parent window?
Thank you very much!
I think I might have solved the problem with a workaround. I use a pop up that takes data from an iframe. My clients need only to include the javascript code for the pop up and nothing more; everything else will stay on my server and will be retrived once the pop up "makes" the call.
We are new to Umbraco and coding within it, so I thank you in advance for your patience and assistance.
In short, we created a 'test' page utilizing a colorbox pop-up to display a form. It works perfectly in the test page.
When trying to integrate the code into Umbraco, when the "Request Info" button is clicked, the form opens in a full page, and the colorbox does not display.
I would appreciate any assistance that you could provide.
Test link (working):
http://online.saintleo.edu/Colorbox/Untitled-1.html
Example of a page where the "Request Info" button (yellow on right) opens full page, and NOT colorbox:
http://online.saintleo.edu/academics/masters-programs/master-of-accounting-(macc).aspx
I've spent the entire weekend trying to find the solution, hoping to get this resolved ASAP.
Thank you in advance, I appreciate your time and assistance.
This looks like a problem with how you have implemented your script in Umbraco. Just looking through Chrome's browser inspector, I can see that your script is failing to find the colorbox objects which means that something is prevent the library from being available. This is usually because a dependent javascript library has failed.
Looking at your source code, you are loading all your jQuery libraries at the bottom of your page. This is good practice, but you have placed your a second jQuery file reference, your colorbox file references and the custom colorbox code in the head of the page.
There are several things you will need to do:
Remove the jQuery reference from the head of the page;
Move the colorbox file references to the bottom of the page, after all the other javascript file references. You can leave the colorbox CSS file reference in the head.
Move the custom colorbox code to after all the other javascript file references. I usually place this kind of code in a separate file.
Depending on your Umbraco implementation:
If you are using masterpages, use a ContentPlaceholder to allow templates to drop javascript file references into the bottom of the page;
If you are using MVC views, use a footer section to do the same
I am using Sitefinity 6.X . The requirement is to create a photo gallery.But Sitefinity does not seem to work with javascript /jquery. I am always getting the error "Function Not defined", even though i included references to all jQueries.
Experts help is much appreciated.
If you are using Sitefinity 6.x go to Widget section drag JavaScript widget from Script and Style Widget and embed your JavaScript/Jquery. There will be a choice to embed your script in html. Please select "Before the closing body" option or "Where the widget is dropped".
Refresh your page again. You will be able to see your photo gallery /Carousel running.
-Rengaseshan
First drag and drop the JavaScript widget
Second either link the file or paste your JavaScript code in the widget
Finally, click more options at the bottom and select the option of inserting your code Before the Closing tag
As a rule of thumb always have JavaScript code/files just before the end of the body tag
I've tried creating a new post on my Wordpress blog and I've pasted an external code from a site, which has a <script src="..."></script> in order to work.
When I publish my post, the script tag simply gets deleted.
Is this a default behavior in Wordpress? Is there any way to avoid this? (preferably without doing any modifications to Wordpress or using inline code).
No this is not default behaviour in wordpress. I have added <script> tags to the html view of a page or post no problem.
Did you switch the view after you add the code ? If so, don't. Wordpress will delete all tags if you switch to view back from HTML.
Like Tim said, you probably posted the code into the Visual Editor (doesn't accept any HTML tags, like scripts). You should to the HTML editor to implement your code, but if you want to have it on more than one page, you should open up the Appearance Editor and paste it into your theme where you need it (most likely in the header).
If you put the script code in html and then switch to the visual editor, it will delete the script. This is a commonly reported problem and is the default behavior of wp.
Wordpress assigns Roles to Users, Users who are either Administrators or Editors can add javascript codes within posts. If the User's role is Author or Contributor then they can not add javascript codes inside posts, even if these users try to add Javascript in HTML mode, wordpress automatically removes the tags.
So i am trying to add a like to my individual posts. So i added this to each of the posts. The posts are generated from database output then assembled with the properly styling in a javascript file.So i added this to the creation mix.
<fb:like href="my_not_so_sweet_website" layout="button_count" show_faces="true" width="200"></fb:like>
Weird part is... None of them show up. THEN i try taking that code that i generated for each post and just copy and paste it to the top of my website, and low and behold A like Button!!!. Any clues? Need more info? Help?
You are using what's called FBML. The like button is rendered on the fly (well, on page load) by a facebook javascript libabry you include on the page- it needs the FBML tags to know what to render.
The problem is that the FB library isn't smart enough to know that you've dynamically added these FBML tags to the DOM.
There is another type of like button that's an iframe, that one should work if you put it in the DOM dynamically. Docs for that are here: http://developers.facebook.com/docs/reference/plugins/like/
-when you enter your info into the widget there will be an option for iframe.
There is also a FBML render function in the FB javascript SDK. Docs are here: http://developers.facebook.com/docs/reference/javascript/fb.xfbml.parse/