I'm new to using Brackets. I'm currently using it to write Javascript code and I would like to open my website previews in Safari. Currently when I click the lightening bolt to preview my website opens up in Google Chrome. I prefer to view my code in Safari is there a way to change this? I checked settings but I was not able to find anything that could change the browser that previews my code.
As of Brackets v1.14 you can't.
Live Preview connects Brackets to your browser. It launches a preview
of your HTML file in the browser, then updates the preview instantly
as you edit your code.
In this early version of Brackets, Live Preview only works with Google
Chrome and updates live as you edit CSS or HTML files. Changes to
JavaScript files are automatically reloaded when you save.
Related
I am working on a progressive web app and it has a file input button to choose a file from the device storage. It works fine offline on chrome desktop version but the android version disables the button. I have no idea how to fix this. There are no css in the project for now just the html and the javascript code for the service worker.
I figured out what was going on with my own page -- somehow every time I hit the app in the home screen, it would go to the saved offline page from Chrome instead of trying to actually use my PWA, and those saved offline pages have their inputs disabled.
I had to go delete the saved web page from Chrome to get mine to work again.
I only noticed because I changed some text around and nothing was correctly updated.
Your seems code is ok. So it might be the set up of the sys.
check the google tutorial
https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/?hl=en#download_the_code
I was doing some modifications in javascript on some website in Google Chrome to see what changes appear on the web page.
What I observed that I am not able to see the complete javascript code on the element tab in developer tools. The same code exists on the Source tab able to modify that but those modification doesn't work at it doesn't work once DOM is loaded. This is the screenshot of what I am getting:
It is in HTML edit mode and this script is part of html page.... at
the end, it is not a complete script.
ScreenShot:
Is there any way to get it complete in element tab or any other way to modify script?
If you right click on the tag and select "Edit as HTML", you'll be able to access the whole script, without the hyphenation.
You won't be able to change Javascript code through the source tab and expect it to run your new code on reload. If you want to run Javascript on a website with Google Chrome Developer Tools, I'd suggest using the console tab and adding the code you'd want to run on the website. It won't save, but it's essentially the same as injecting Javascript to run on a website.
I need to make possible to preview the pdf file in the browser window for example in and to make some button which allow to open it in Adobe Reader program for edit purpose.
The problem I encountered is that if browser know how to treat PDF's files it will not allow me to download it, and always open it in a new tab. and if I config browser not to open PDF file inside browser it allow me to download file but it will not show me the PDF inside
any body have some Idea how can i combine this two requirements in one html page?
i need the solution for Internet Explorer 11
It's possible but there's a bit of plumbing involved. Basically, you don't link to the PDF directly, you link to an HTML page that uses an object element to display the PDF in most of the window. You can then have a header that holds a button that calls a JavaScript to fetch the PDF and save it locally. My example uses download2.js for that part. It even works in IE 11 though I don't think it will work in anything lower than IE 8.
See the example at the URL below.
http://practicalpdf.com/solutions/practicalpdf/preview-with-button/wrapper-with-button.html
We use Atalasoft's web image viewing SDK to display TIF images in a web page. We recently upgraded to their client-side, JavaScript/jQuery based component and discovered some odd behavior. After initializing the control, if a link is clicked to a resource that should be downloaded, the control(s) clear themselves out. The issue exists in Chrome and IE 11 that I have tested.
Since it is a paid SDK, the easiest way to test this is to go to their demo at:
http://www.atalasoft.com/demos/dotimagewebdemo/
Once the page finishes loading, open a developer console and paste in the following (simply adds a download link to a file on their site):
$("body").append($("<div style='position:absolute;right:5px;top:5px;'><a href='/Gallery/WebViewingDemo.zip'>DOWNLOAD</a></div>"))
Clicking the download link will wipe out their controls on the page.
Adding download to the anchor tag resolves the issue in Chrome, but not IE.
Adding target='_blank' resolves the issue in both, but creates an ugly blank window first (that in my experience does not always close).
I am setting headers server-side to tell the browser to download the file rather than displaying it.
I guess my questions are two-fold:
Is it normal for JavaScript/jQuery based objects to disappear/destroy/whatever when a link is clicked to download a file or is this a problem with their implementation?
and
What is the best solution for this (preferably without the blank page showing up)? We need to support mainly Chrome, FF, and IE (most popular desktop versions).
Thanks in advance!
When you download a file on CNET.com, a message will display on the page to wait a moment and the download will start; if it doesn't, click the link. That's very similar to the page with which I'm working.
The user clicks a link and this page appears with a similar message to CNETs. The only difference is the file is a WMV file and it automatically opens and plays. It works fine in IE. It's not working correctly in Firefox. In Firefox, if the user goes Tools->Options->Applications and selects "Use Windows Media Player" for Windows Media Video File, it plays in the external WMP. If the user uses the WMP plugin, however, the page opens up a blank window and then plays the video in the external WMP.
window.open("test.wmv");
Is there a way to prevent it from opening a window or how can I close the window after the wmv is downloaded and played?
Thank you very much.
Update
I found a link, here, that may be related to this issue. It states that the blank window is a bug with how Firefox handles the WMP plugin, with respect to ASX files. The only difference between the link and my question is one file is of type WMV and the other is of type ASX. The link is dated 2007 and the problem is reported on Firefox 1.5, but perhaps it still has merit. Maybe Mozilla has not addressed this bug, ever (FYI: I'm using Firefox 9.0.1).
I'm starting to think there is no direct solution. I can put a disclaimer, inform the user to turn off the WMP plugin in Firefox. Would a modal window or iFrame be helpful?