Message box under the web site logo - javascript

Is there a way to create a message box under the web site logo icon in a html page, just like the pop up: "This website does not supply identity information; your connection to this website is not encrypted. " when the logo besides the page url is clicked at stackoverflow.
Thanks.

Not that I know of. Those are browser messages (specifically in Chrome).

I think you mean the little icon left of the name of the page. If so, you know it is displaying the title element of head element. So you can put anything in the title element, but it will show in the browsers header also.

No you can't and to be more specific : No you will NEVER EVER be able to do it.
The little arrow for example in chrome that is present in such messages and messages like "save password" are there for the user to be able to distinguish between the page and the browser telling something (To avoid the page faking a browser message that could lead to bad security consequences)

Related

Can you make an html link that does not let you click back to previous page, or show the previous link in your history?

I am working on a client site where the client has requested that there be a button (basic a link) that links to another page like google, in case an abusive significant other busts into the room while a woman is reading about how to get assistance. The tricky part is that I am trying to figure out to link to a page that will open int he same windows, but no let you go back to the site by clicking the browser's back button, or show up in "history". I have built a lot of website and never heard of this being possible without the use of a custom browser extension or something.
My question is ..
Is there a way to do this? Possible some JS magic? Just wondering
You're looking for location.replace().
<button onclick='location.replace("https://www.google.com");'>Click to close</button>
Instead of creating a new entry in browser history, it replaces the current one.
Note: Unfortunately, it's blocked by [SO]. But just try it in your app. It does work.
Second note: If you combine this with initially opening the to be hidden page in a new tab (target="_blank") => no history.
However, the best method and advice for such cases is browsing in incognito: Ctrl+Shift+N. Once closed, it's gone, with all history in the session. Pressing Ctrl+Shift+T in a new browser window won't bring the formerly opened tabs back.
IMHO, this technique should be clearly detailed in the "Precautions" section of your client's website, also advising on having another "normal" browsing session opened in a background browser window, with a few neutral tabs open on subjects that wouldn't raise any suspicions: cooking recipes, things for children, cosmetics, etc...
I am not sure about your question.
But on click you can open Iframe
<iframe src="www.google.com" style="border:none;"></iframe>

How do I open a link to a website on a new window in a browser and block the current website until the user finish or close the new one?

Currently I'm working with Mercado Pago API, but the thing is that I want when the user clicks the pay button, I want to open a new window in the browser (chrome, firefox, etc.) in the middle of the screen where is going to fill his credit card number and all that stuff meanwhile i want that the background site (I mean the main site where the user clicked on pay) to be blocked, like with darker colors, and not be able to do anything in that site until the user close the new window or he finish with the payment. I've been looking on the internet but I haven't found anything related to the blocked site. Maybe you could help me or have any idea to make that. thanks in advance.
I can't make comments, so sorry in advance for this being an "answer". But are you not able to store information about what the user has selected and then use the current page to process the payment, then bring back or send off what they wanted? perhaps using AJAX to run a PHP page that stores something. Just a suggestion but not entirely an answer, because AFAIK you can't "block" tabs as that could be very dangerous and could be used for the wrong reasons.
The task you want to do requires both back-end programming (php/server-side) and a bit of front-end jquery(js) + ajax.
For front-end something like this could be your start.
Bootstrap Static Modal Example.
And you would need to put your form there, submit it via ajax, and on success close the modal.
I hope this could help you a bit, and get you started in the right direction.
Note: This is not particularly safe. (It's not hard to hide the modal and fiddle around the page in the background.

How to Disable a specific link using html or javascript

I am using a Gchat voice and video chat script. link to my website
The problem is that someone login in my chatroom and he use this flash link to crash users browser.
when he login all of us get disconnected and we have a blank black page at that time.
He must be using src="http://best-hosting.cu.cc/c/banner3-www-facebook-skype-net-com.swf" or iframe of that link somewhere when he is logging in.
Please help me. How can I disable that flash thing not to load in all users browsers
I get his links detect using ads block plus extension in firefox when he login with that flash link thing. when i block his link in ads block plus then i do not get disconnect but the other users who dont have ads block plus still get disconnect from website and have a blank black page.
Please suggest me something that will solve my problem.
You could try the accepted answer here: Find text and remove it jquery
Use it to find a string within the text and remove the entire thing.
I'd personally do: $('.className').contains('.swf').remove();​
Where className would be the class for links, or you could just do it for the <a> tag in general
EDIT: That being said, I have no idea what Gchat is, and whether or not this would be possible with it. If it is something hosted on your site it should work, but if it is embedded and hosted elsewhere, I'm not quite sure, worth a try though.

How to prevent a text from appearing up in firebug or View Source of browser

I have a simple Pan card no : xxxxxxx7654 , which i am showing using jsp in the browser. Now , if i use the view source functionality of the browser or the firebug tool or chrome bug tool, then i will be able to see the text in the DOM. Now, I want to get the text displayed in browser, but want to hide it from prying eyes of people who will be using fire bug, chrome bug or View Source of a browser .
The field name is PAN_CARD_NO.
I display it using : <p id ='My_Pan'>My Pan is :<%= PAN_CARD_NO %></p>
Now this brings the value in the browser, which is nice and dandy, but i don't want it to be shown using fire bug or chrome bug or view source.
Does any body have any suggestions as to how it can be done ?
The source of the page is what is delivered to the browser to be rendered. Because of that, anything that you want to present to the end user in the browser will be visible in some way in the source code. There are no work-arounds here. If it is displayed in the browser, the end user has access to it in one way or another.
If your goal is to not show the whole PAN card number, that should be done on the server side, before it's delivered to the browser. In this case, you make sure that the PAN_CARD_NO variable only contains something like xxxxxxx7654. With this method, full PAN card number is never delivered to the end user.
If your goal is to prevent unauthorized users from viewing the PAN card number, then you need to make sure that you only deliver the card number for the authenticated user. This will require you to have the user authenticate themselves to the server in some way (e.g. logging in).

How to serve a page with only a title bar and content, nothing else?

I have a web page jammed full with a few hundred rows of tabular numerical data. It's fearsome. The user wants to see as many data rows as he can in one single view, without scrolling vertically. I'm thinking to serve that page with just a title bar -- no back or refresh button, no address bar, no Google toolbar, no status pane, nothing but a title bar. The user reaches the page by way of a normal html link.
Is there a way to do that in the CGI that writes the page? The CGI is already writing content and cache-control headers.
If not, then (next best thing) is there a way to do it with JavaScript, without opening a new browser window, perhaps in the onload event handler?
Thanks!
Is there a way to do that in the CGI that writes the page?
No.
If not, then (next best thing) is there a way to do it with JavaScript, without opening a new browser window, perhaps in the onload event handler?
Well, you could, on onload open a new ("chromeless") browser window with your page, but that's about it.
You can't control the user's current browser window from within an HTML page.
Pretty sure you can't do this cross browser and I'm positive you can't do it server side. However most browsers allow a full screen view which the user can get to.
In Internet Explorer and firefox the shortcut is F11. I know that's not the solution your looking for. However I'm pretty sure thats all there is.
I didn't see n0nick answer when I typed mine up. I agree with his answer I'm leaving mine in here for the F11 part.

Categories

Resources