Drop-down-menu not working on second page - javascript

I have to make a website for school and we have to make a drop-down-menu. I've made one and it works fine, but on my other pages the drop-down-menu won't open when I click on it.
Can somebody help me?

I'd recommend that you use the chrome developer tools to check and see what happens to the other pages when you click the button that's supposed to initiate the dropdown menu.
If nothing happens, right click the button and hit inspect in developer tools to verify that you're targeting the correct element, and to verify that the dropdown menu actually exists on all your pages.

Most likely you haven't linked the javascript file on the other pages. Can't say much without you showing what you've done first.

Related

Search icon on mobile site unresponsive and no longer toggles open

The search icon on my mobile website suddenly stopped working recently. It's supposed to toggle open a search bar; however, now when I click it, nothing happens.
When I long press via Chrome on mobile it displays "about:blank#blocked" and on Firefox on hover it displays javascript:void(0).
Not sure what caused it to stop working and it's a bit frustrating.
If anyone has any insights or ideas on how to solve it, that would be super helpful.
My website is www.gentlemanwithin.com
I see your issue:-
Your issue is when you are trying to access custom search form that unable to access because you added an extra search button which is not belongs to that. So you try toggle function to show yellow colored area of your code. After it your issue will solve. Below I have attached your site screenshot image, that you can see it for the reference.

Accordion getting sporadically hidden in IE 7-8

I am using jQuery accordion on a web page. In IE 8, it gets hidden sporadically sometimes when user clicks on some other window. I am not able to get why is it behaving like this. When I inspect element in HTML developer tool I could see accordion and if I change some value in that, accordion gets visible again. Can somebody please help me to identify what is the problem? If I use debugger mode everything works correctly.
I looked at code carefully and observed that accordion code was added in one extra tag but strange that only IE was not able to run it properly. So I removed that extra wrapper and its running properly now.

How do I run a custom script when I view a website?

For example, I want to copy text from this website: http://cafe.naver.com/4korean
But they have disabled right click menu as well as any kind of text selection on the website
After a little searching in Google I found this script: http://userscripts.org/scripts/review/61326
which is supposed to disable the protection on their website
However, I am not able to figure out how to run this code
I pressed F12 and went to the Chrome console, but when paste and run the code, I just get the message undefined (which I am sure was some other red coloured error message when I had tried the same thing just this morning)
I am not sure if there is any problem with the script, or with the way I am running it.
Please help.
Thank you.
PS: I am not sure how to tag this question. I think the script is javascript but I am not sure. Please provide some suggestions on this as well. Thanks.
Hers is the Link which will let you study how to re-enable right click on website, try it for once.
Hers is the anothere one Link2
Besides, that there come a plugin for Mozilla Mozilla Right to click and chrome Chrome Allow Right Click, you can have it whatever you wants.

Finding out what JS is controlling this

I have a page which is using a nice hover feature which is controlled by javascript, and I was wondering if there is a tool which would tell me what JS is controlling at a specific point as there is a lot of JS files used across the site.
You need a debugging tool, one such tool is mentioned in the comments: Chrome. Once you have the debugger enabled you need to set breakpoints on various events to capture the code flow within all the javascripts. For more info visit here
I would go with Chrome. You can load the page, see all the related JS.
If you are in Chrome, right click on or near the button and click "Inspect Element."
Now you can see all the goodies :)
In google chrome right-click the element, click on "Inspect Element" option. The Chrome Developer window with active Elements tab should appear. You'll see the html structure with your element being highlighted. Right-click on that element and activate all three options in "Break on..." submenu. If some modifications of DOM happen during hover, they will trigger the breakpoint right in the place where you need. But keep in mind, that hover effects can be implemented via css without a bit of javascript, so this plan can fail easily.
As other's have said, use Chrome's web developer toolbar. Go to the sources panel and click the little pause button icon in the lower left corner. This will cause the debugger to activate as soon as the next javascript command is run. Then activate the hover feature - the debugger should pause execution in the callback function that's responsible.
Google actually discusses this exact scenario at the bottom of this documentation page.

Designing UI for a Google Chrome extension

I'm writing a plugin for Google chrome that works similarly to the Adobe's web-capture plugin for Mozilla Firefox. I need some help designing the UI for the extension. As of now, the extension has a button, next to the wrench icon, that, when clicked, converts the page to a PDF file. I need to add a drop-down menu, just as it is on Firefox, which should display other options for conversion, and providing the same functions in context menu as well. I'm not sure if it's possible to have a main button and a drop-down menu button, where the main button initiates conversion directly, and the drop-down menu button shows the drop down menu showing other options, in Google Chrome as nothing is mentioned about it's possibility on the Chrome Extension development page. I could probably have a pop-up page but that would come up when I would click the main button. Could someone help me with this? If it is possible to have a both main button, and a drop-down menu button, then how should I go about doing it? Or if it is that I would have to use a pop-up page to show the options, then where should I place my functions, which will be used by context menu APIs as well.
As far as i understand i wouldn't prefer having 2 buttons. What you can do is, have a drop down button and once that appears after clicking, you can have a big button inside that saying "PDFy my current page" and below you can have rest of the options. I guess having two button will unnecessarily bring confusion and will make browser cluttered.

Categories