Firebug lite not working in IE/Chrome - firebug-lite

I am trying to install firebug lite onto IE and Chrome. The documentation states to simply add the javascript location in the document and all should be well. This works but the iframe containing then firebug is hidden with a visibility: hidden attribute. I am unable to find anywhere to actually activate the firebug, normally you would think you could right click and "inspect" but that option is not there. The chrome extension and bookmarklet works but my main concern is trying to firebug through internet explorer.
Anyone had or solved this issue?

Yeah I had the same problem using the stable channel. I switched to the debug channel & it worked perfectly, opening right up. So use this:
<script type="text/javascript" src="https://getfirebug.com/firebug-lite-debug.js"></script>
Also, I find it useful to throw a quick 300px-high div in there at the bottom of my page to make room for Firebug Lite, like this:
<div style="display:block; height:300px; background:blue;"></div>
Just don't forget to remove it with the FBL script tag!

Related

Display template for content search webpart issue for datatable and Tabs

I have developed display template and using it in Content search web part.
For displaying result on page i am using JQuery datatable/JQuery Tabs in display template.
Everything works fine, but sometime while loading page i am getting error like ("Object doesn't support property or method 'dataTable' (OnPostRender: )" and for tabs error is "Object doesn't support property or method 'tabs' (OnPostRender: )").
And if i refresh page many times then error will go and result is display as code.
I have register JQuery, JS and CSS using $includeScript.
I have also tried with RegisterSod for JQuery and JS file but still issue is same.
Thanks in Advance.
Can be:
This error usually occurs when an html element id has the same id as some variable in the javascript function, try change the name.
If you put the code I'll be able to help you better.
test = button.attr('test'); // Object doesnt support this method
$test= button.attr('test'); // works fine
Or debbug your code with and discover your problem. Enable script debugging IE:
In Internet Explorer, choose Internet Options from the Tools menu.
In the Internet Options dialog box, click the Advanced tab.
On the Advanced tab, under Browsing, clear Disable Script Debugging.
Click OK.
If you have IE 8+ click here
Tutorial Using jQuery dataTables: link here

Building a website in Sharepoint, but my control panel disappears

At the moment i'm building a website in sharepoint, but everytime i open the main page of the website in my browser the control panel on the left upperside of the screen is missing. I have no idea why?
To clarify: In this tutorial you can see the browse/page/site control screen, in which they make nearly all the simple changes to the website. https://www.youtube.com/watch?v=dJlwCNXMCBo (edit: Forgot the link of the tutorial)
I literally have no idea why i cant use this, does anyone have any clue?
Edit: My mainpage looks like this:
http://s30.postimg.org/6a5mkzoip/Screenshot_main_page.png
Pull down the menu with the gear icon beside your name. Click on "Show Ribbon".
Your master page is hiding it through javascript.
<script type="text/javascript">
var suitebar = $("#suiteBar");
if(suitebar.length<1)
$("#s4-ribbonrow").css('display','none');
</script>
If you change the master page to $("#s4-ribbonrow").css('display','block');
You should see the ribbon.

Jquery inside of CFDiv

I have a page that includes a CFDiv tag that displays content from another file.
<cfajaximport tags="cfwindow,cfform,cflayout-tab,cfdiv">
<cfoutput><cfdiv class="vehicle-log" bind="url:trip_tab.cfm?ticketid=#ticketnum#" ID="theDiv" bindOnLoad = "true"/></cfoutput>
The external file has jquery tabs and jquery datepicker. None of the jquery seems to work in the CFDiv. If I call the external page by itself, everything works fine.
The reason I'm using a CFDiv here (I know most people hate cf layout stuff) is because the external page has a form element that I can submit and add to data to the db without refreshing the whole parent page. This is the only way I know how to do this.
Anyways, does anyone know how to get my jquery elements to work in a CFDiv?
Thanks.
Brian
You've got more than one problem here. First, you are using <CFDiv>, which under the covers is using portions of a very old version of ExtJS. So you are likely going to run into some headaches with mixing ExtJS and jQuery (and jQuery plugins).
Second, since <CFDiv bind="..."> uses AJAX to load the external HTML window content, you would need to change your JavaScript strategy. <CFDiv> will not pull in and execute the JavaScript code (including jQuery) from the external page (trip_tab.cfm), unless you only use CF UI widgets inside that external page (then the <cfajaximport> tag handles that for you). It only loads the HTML DOM content. You will have to move any <script> and <link rel="stylesheet"> tags and custom JavaScript/jQuery code and CSS into the parent page (the page that has the <CFDiv> tag in it). Then you'll have to find a way to listen for the AJAX event (completion of loading the external page) and call the custom JavaScript/jQuery code.
As others suggested in the comments above, using <CFDiv> is only making things harder for you. If you switched to using one JavaScript library for your UI components (like jQuery/jQueryUI/jQuery plugins), and put all of the necessary code into your main page, what you desire can be accomplished fairly easily.
I found a simple work around... CFdiv creates what feels like a seperate browser window, but its not actually one. So it can't pull Javascript files in via:
<script type="text/javascript" src="/js/scripts/jquery-1.11.1.min.js"></script>
The above is telling the browser "go fetch this file" - but since your CFdiv is not really a browser (Its a controversial permutation of CFajax as described here) it doesn't do it.
Technically, the above makes the browser include it into the page, just as if you cfincluded it , or just pasted the Javascript in there.
So convert the above to:
<script type="text/javascript"><cfinclude template="/js/scripts/jquery-1.11.1.min.js"></script>
And included javascript will work! (provided there aren't any conflicts with cfajax et al)
I had a similar problem in that my jquery was not working, and doing this fixed it.

Like button code doesn't work on my website

I found a few similar topics however none specific to my issue. I went to create a like button code, I clicked the create like box, added my link http://www.facebook.com/pages/SpartaPerformancecom/248083571902684 to the URL formated the like button how I want it to appear. Then I opened Dreamweaver and pasted the Facebook code in the Dreamweaver HTML code where I want the Like button to appear but I get nothing. Please respond like "coding for dummies" language so I can understand how to solve my issue. Thanks in advance.
Make sure you add <div id="fb-root"></div> somewhere between the <body></body> tags. Their latest like button generator is missing that part.

Importing HTML into TinyMCE using ColdFusion

Hey everyone, I would appreciate a pointing in the right direction with the problem I'm having. In short, I'm working on an application that will create PDFs using TinyMCE and ColdFusion 8. I have the ability to create a PDF by just entering in text, pictures, etc. However, I want to be able to import an html template and insert it into the TinyMCE .
Basically, I have a file directory code snippet that lets me browse through my 'HTMLTemplates' folder, and am able to select an HTML document. Now, I want to be able to take all the code from that selected HTML document and insert it into my TinyMCE box. Any tips on how I might do this, maybe?
Thanks!
If I understood you correctly, you already have a TinyMCE plugin which pops up a window and allows you to browse the certain directory using existing cfm page which you render within the popup window. Right?
If not, you should start with this. Not sure how easy it is done in current version, but in the older TinyMCE I've created the custom upload plugin (needed to track the site security permissions for current user) pretty quickly.
Next, I can see two quick ways to pass the server file contents to the client-side:
Make it available via HTTP so you can make the GET request and read contents into the variable.
Output it on the page using CF (say, on form submit when file selected) and grab using JavaScript.
I'd personally tried the second option. After you grab the text into the variable you can put it into the TinyMCE using it's API.
It can be as simple as output escaped text into the hidden div with known ID and read it using DOM operations (assuming that there is cfoutput around):
<div id="myTemplate">#HTMLEditFormat(myFileContents)#</div>
Also you can output the text directly into the JavaScript variable (of cource, with accurate escaping), maybe like this.
<script type="text/javascript">
var text = '#HTMLEditFormat(myFileContents)#';
</script>
Most advanced and possibly better for performance (and definitely "cooler") way is to use the concept of script tags as data containers, like this:
<script type="text/plain">
#HTMLEditFormat(myFileContents)#
</script>
Last time I've seen this in Nadel's blog, I think. Read it, pretty interesting.
Hope this helps.