Bug reporting regarding HTML and JavaScript [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I believe I have found a bug in HTML / JavaScript, but I have no idea where to post this bug. Any information on where to post such bugs is appreciated.
The bug can be recreated as follows:
Go to W3Schools Tryit Editor
Make sure you have some other tab open in the same window
Click on the input field to focus it
Click on a different tab in your browser
Depending on your browser, different effects will occur (all unwanted)
This has been tested in Chrome (it will give an infinitely repeating alert), on Firefox (it will give the alert, but not switch tabs when clicking the alert away), and on Edge (it will show that the new tab is selected in the tabs bar, but the rest of the page doesn't switchenter link description here).
Since this bug occurs in multiple browsers, and also since the bug occurs with sample code from w3schools, I believe that this bug is related to HTML / JavaScript more than to a specific browser.

W3Schools isn't affiliated with W3C, the organisation who maintain the HTML specification. Nor are they affiliated with Ecma International, the organisation who maintain the JavaScript specification. Nor, for that matter, are they affiliated with any browser.
The code they've supplied here is their own code. It's not official by any stretch of the imagination: it's code that you or I could have written.
However that said, it looks like you have discovered a bug which affects multiple browsers. This is something you an report on the various browser channels if you so desire. Potorr has already linked you to a couple of these, which can be found by simply searching for something like "{browser name} bug tracker" with a search engine.
However you may consider instead posting directly on W3Schools' forum, as, after all, this is their code: http://w3schools.invisionzone.com/index.php?/forum/45-general.

Related

Can i deactivate a certain part of javascript from the browser? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 4 years ago.
Improve this question
A friend of mine programmed a website, using a tool from "1und1". The problem is, that, while you use this tool to easy create a website, you do not have any direct access to the code.
Now he did something stupid. He created a function, that relocates you, based on the language of you browser. This function however always relocates the user, no matter what language your browser has and this website never stops loading. Ones it is finished, it loads again.
My first intention was, to use the noscript-addon for Chrome, however the tool to edit this part also uses Javascript... So if i use noscript, this infinite reloading-problem is fixed temporary, but i cannot fix the problem once and for all!
Is there any way of only deactivating a certain script-part of the head-tag and not all of them?
Thank you all.
edit:
This is the Script in question:
//<![CDATA[
// The language of the browser as an orientation for the language of
// the user
var userLang = navigator.language || navigator.userLanguage;
// The current adress of the user
var adress = document.location.href;
if(adress == thisSite && userLang.match("de")) {
// german
window.location.href = '/deutsch/start/';
} else {
// fallback (english)
window.location.href = '/english/home/';
}
//]]>
Now, after trying a whole night, for everyone, who has a similar problem, this is how i fixed this.
You HAVE to call 1und1 or use there live-chat for this. They take some time to fix it, because the person, you are speaking to, also has no access to the code. They then give it to the development team, wich is fixing it.
However, if you want to prevent any problem like that, i can just recommend you, to not use this tool! This tool gives you all things you don't want and even in the expert section they want to "improve" your code, by correcting it, wich led to my "infinit-recursion-problem".
If you are wondering, he entered the following:
else if(adress == thisSite) {
// fallback (english)
window.location.href = '/english/home/';
}
but it deleted the if-clause, because it said, it was unnecessary and he didn't even recognized it, until it was too late.
Therefor i recommend you: "Do not use this kind of tools, if you have any other way to do this (like Wordpress or Joomla or even a friend, who can barely code)".
Open chromes developer tool. CTRL + SHIFT + I
go to the Elements tab
Find the peice of code you want to remove, right click it, select "Edit as html", remove/edit what you want to remove/edit, click somewhere else and it should affect the page accordingly.
You could go to the F12 menu and look under the elements tab. This houses all the current html/scripts/styling etc of the web page. Look for the script in question and just delete it, however, this is only a temporary local fix while on the page.
Hope that helps!

How to find out what js a site uses? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am looking to develop my personal portfolio site, and would like to implement some sort of 'portfolio of work' area.
I want it to be simple and only display single images, however once the image is clicked a box should expand and show more content, such as design brief, tools used etc..
I have seen some examples of the kind of function I require, like eg http://themeforest.net/item/fraiche-flat-onepage-portfolio-bootstrap-template/full_screen_preview/5351761#portfolio and another here http://wrapbootstrap.com/preview/WB04X111M
I would like to be able to find out what javascript plugins certain sites use so I can experiment with them myself. I have tried viewing the source and looking at the console but I find it difficult.
I have used Firebug and DevTools however I can't seem to figure out what js a carousel uses for example. I am able to view source and look at all the individual files that way. Was wondering if there was an easier way, or a browser add-on that would tell me when viewing the website?
If somebody could point me in the right direction I would be grateful.
There is a very good plugin for firefox called firebug which shows all the JS files loaded for that particular page. In firebug scripts tab you can see that.
chrome comes with developer tools where you can find all the files loaded for that page. You can find this at Tool --> Developer Tools.
Right click, Inspect Element or View Source. Look in head section.
You can also look under the Network and Resources tab in your dev tools in chrome, youll see the request to third party plugins too.
You should use an http sniffer(e.g. Fiddler\HttpAnalyzer etc.) and check what html\js\css etc content is downloaded.
After that, you will need to check the sources and find out how things are done.
As others already suggested - view the page source and try to get desired plugin info from there.
There's also a great Chrome extension that'll allow you to instantly see all the javascript and server-side frameworks that the site runs on, it's called Appspector.

How Google indexes sites with JavaScript-loaded content? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I wonder, is Google index and rate sites with dynamically loaded content as good as sites with static content? For example, what about site, where all the layout and elements are created by JavaScript and all the content is Ajax-loaded.
You need to do some extra work but is perfectly possible to generate indexable ajax based websites.
Main thing you have to do is make sure that any url that uses a #!hash to determine what to view, also has a ?_escaped_fragment_= url that generates the exact same content.
For more (and likely more understandable) information look at https://developers.google.com/webmasters/ajax-crawling/docs/specification
google's crawler now does index content that is generated from javascript. You can see this working at http://www.adynamicjssite.com/ and by googling for site:adynamicjssite.com (the snippet google renders comes from content that's stored in javascript).
Note that bing and others do not yet support running javascript while spidering your site.
No. Crawlers do not scrape dynamically generated content.
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35769
Use a text browser such as Lynx to
examine your site, because most search
engine spiders see your site much as
Lynx would. If fancy features such as
JavaScript, cookies, session IDs,
frames, DHTML, or Flash keep you from
seeing all of your site in a text
browser, then search engine spiders
may have trouble crawling your site.
If you view your page source (CTRL+U in Firefox), you'll see everything the web crawler sees.
You could also use Crawlme to automatically make your web app pages indexable by google.

iPad compatible HTML Wysiwyg editor [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Are there any iPad compatible wysiwyg HTML editors?
Edit: What I'm looking for is something that would work on a web app, not a native iPad app.
I think that the GDocs editor might work, but keep in mind that there's almost no editor like that, they are managing everything by themselves.
The rest of editors try to use contentEditable, and Apple itself warns against using it with the iPad: http://developer.apple.com/library/ios/technotes/tn2010/tn2262/#//apple_ref/doc/uid/DTS40009577-CH1-DontLinkElementID_7
I would advise you to use NicEditor which has an option of using content editable divs rather than iframe(has some issues in ipad)
I don't know but think that what you are after is something to edit the code of a web app. If it is then since the web app is essentially a web page you could use any text editor, I personally like Gusto for the iPad- http://itunes.apple.com/us/app/gusto/id364906873?mt=8.
Either that or you are looking for a HTML editor which is a web app itself. In that case, sorry I don't know of any.
I am sure there may be a few that exist. I have not had any experience with either but take a look at the below links:
iPad HTML Editor - http://itunes.apple.com/us/app/kytekhtmleditor/id349354394?mt=8
SquareSpace for iPad - http://mashable.com/2010/12/21/squarespace-ipad/
Check out the following Web (html) Wysiwyg Editors.:
Dreamweaver
Flux (Mac only)
Creative Suite
Expression Web/Studio
There are a quite few available WYSIWYG editors and some are even free. However, 'free' is not always best as the code compilation may not be optimal and important features are lacking.
Hope that helps!
I was also looking for this too and couldn't find it so I coded it myself.
iPad web based Code Editor (with extra symbols keyboard)
It is a web-based code editor that allows you to type in all the symbols and characters used when programming (brackets, equal sign, tab, quotes...). It is currently in a very early stage so you will need to copy/paste the code, edit, copy/paste again somewhere else (Dropbox, FTP client).
You may also want to check out CodeAnywhere, they have a native app AND also a web-app.
I've experienced a similar issue in a web app I've developed that does not allow wysiwyg editing when run on an IPad/IPhone. The wysiwyg component I use is Telerik's RadEditor (a terrific product, btw), and Telerik has posted a KB page regarding this issue at http://www.telerik.com/support/kb/aspnet-ajax/editor/support-for-iphone-ipad-browser.aspx. It seems, at this point, that Apple has chosen to lock down Safari on the IPad/IPhone in such a way that these rich text editors do not work. I haven't yet seen an alternative solution to this (other than allowing IPad/IPhone users to enter their content in a plain ol' textbox) but am keeping my ear to the ground.

Any contenteditable helper plugins for Firefox/Webkit? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm currently working to build a CMS for a client where the editing page looks exactly like the rendered page.
Hence I don't want an iframe based WYSIWYG, I am looking for something of a wrapper for contenteditable which irons out the differences between Firefox and Webkit.
For instance an Enter key press in Firefox results in a <br/> tag while the same event in Webkit results in it being enclosed in a <div> tag.
If you don't have suggestions for an editor, then can you help me solve this problem? The way I fixed it first was to check the onkeyup event and then use the execCommand "undo" and then insertHtml <br/>.
That works fine, but the problem is if the user is in a list, and they press enter they expect to have a next list element created but end up with a line break. How do I detect what's the location of the caret when the enter key is being fired so that I can skip the <br/> insertion behavior ?
Ideally I wouldn't even want a <br/> rather the text block to be encapsulated in a <p> tag for SEO purposes, but I wasn't able to solve that as well.
Any help would be greatly appreciated !
Aloha editor is nice. Google it.
There are lots of niggly little differences between the browsers when it comes to content editing. I don't know of any library that irons out all the differences and I suspect that anyone writing such a library would simply write a browser-based WYSIWYG editor. That being the case, your best bet is probably to look at how the big open source editors such as TinyMCE and CKEditor do it.
There is a configuration property called 'content_editable' in the source code of TinyMCE v3.5.2. This flag prevents an iframe from getting rendered. The published documentation doesn't say anything about this flag. I presume it is because the flag might not have been deeply tested.
I invoked TinyMCE on a contenteditable div and disabled all TinyMCE UI. Basic functionality seems to be working fine.
Init Options:
$('#editor').tinymce({
script_url: '/tinymcecustom/tiny_mce_jquery.js',
content_editable: true,
theme: "simple"
});
Html MarkUp:
<div id="editor" contenteditable="true" style="height: 900px"></div>
EditorTemplate.js (inside the theme folder):
(function () {
tinymce.create('tinymce.themes.SimpleTheme', {
init: function (ed, url) {
this.editor = ed;
},
renderUI: function (o) {
return {
editorContainer: this.editor.id
};
}
});
tinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme); })();
This is a complex area which you will struggle with to get right. Also if you are allowing users to Paste content then using an iFrame is the best way to ensure valid results and not mess up the page.
Aloha editor, TinyMCE etc. are rather big and bloated. I suggest you have a look at WYSIHTML5 https://github.com/xing/wysihtml5, http:www.createjs.org or for something simpler https://github.com/mquan/freshereditor however I don't recommend this simplistic approach.

Categories