How can I hide a browser default picture upload button? - browser

I'm configuring a picture upload button on a form. I have a green bootstrap button I am happy with, but Chrome still gives me a default, grey, pic upload button.
You can see the grey button underneath the green "Upload Project Picture" button.
I have searched my code, but can't find any way to hide it. My colleague (who is fairly experienced), has no idea either. Thanks if you can help.
I found this question, but am not sure if it's exactly the same issue:
How can I hide a button if JavaScript is disabled?

I think the best approach is to position the native element absolutely, and then move it far to the left of the viewable screen. You can then make your fancy custom submit button "be" the actual submit via javascript. Sounds hacky, but a similar solution is recommended by no less than Mozilla.
input[type=file] {
/* original submit tag pushed outside the viewport */
position: absolute;
left: -1000em;
}

Related

Expanding button to autosuggestbox in UWP

I am trying to configure a button within my UWP app to expand in to an AutoSuggestBox on click. This behavior is mentioned in this post:
https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/search#Implementation
I tried utilizing a flyout on the button click, but it doesn't give me the desired effect. Is there an existing control that can do this or will I need to roll my own XAML of an existing control?
The behavior you see in the blogpost can be easily achieved by having an autosuggestbox hidden behind the button, then after on button click fading out the button and resizing the autosuggestbox to the desired width.
There's no way to "expand" a control into a different one, but you can make it look like that happens :)

SharePoint default modal dialog box not showing buttons

I've been doing searches trying to find help on this, but so far all I have found is how to set options for popping up a SharePoint modal dialog box from custom code.
However, I haven't created any custom web parts to display modal dialogs. What's happening, is if someone clicks the upload document button in a library, the upload document modal dialog comes up, but the ok and cancel buttons are half off of the bottom of the box. Users can click on them, but it just doesn't look very good.
I started playing with the CSS to make the modal dialog box bigger to reveal the buttons, and that works for the most part, but the real problem is the grant user permission dialog box.
When that is clicked, it doesn't show the ok and cancel buttons, and maximizing the dialog box doesn't reveal them. The user has to hit tab about 5-10 times before the focus moves to the ok button and is then clickable.
I would post an image, but I don't have enough reputation to do so.
Has anyone come across this? It seems very strange that the out of the box setting would have this problem.
The CSS that I use to adjust the height and width of the modal dialog is:
.ms-dlgFrame, .ms-dlgContent, .ms-dlgBorder, .ms-dlgFrameContainer
I'm just trying to set the height/min-height values, but I haven't had much luck.
We're using Internet Explorer 11 to view the pages.
Stevangelista actually pointed me in the right direction, I wish I could mark comments as answers, and since I'm new I can't upvote the comment, but here's the solution:
I am using a customized master page, and that comment had me take a look at the elements in the page.
Since the master page is being used in the dialog boxes as well, I used the s4-notdlg class to remove parts that weren't needed in the dialogs. Those parts were pushing the buttons below the bottom of the screen.
I'm not a css expert, so there may be ways of keeping those parts and still have the buttons accessible, but the particular issue I was trying to fix was resolved by using the s4-notdlg class to objects in my custom master page.

onclick changing colour of a link, and returning all others to default

I have a list of links which open up various hidden divs on a page. Each link is white. Very simply all I want to do is when each link is 'active' it changes to yellow.
This is fine, and I've achieved this using an onclick event this.style.color='yellow';
the problem is that they then stay yellow, so effectively I need either a way to globally change all other elements back to white onclick OR to individually specify the each link to turn white
thinking javascript wise, could I achieve it with something like
onclick turn all links to white
turn this link to yellow
? Am I barking up the wrong tree?
Don't use onclick event just use css active your problem will get solve,
<style>
a:active
{
color:yellow;
}
</style>
where your link is,
Google
If you need any other help just let me know.

fb request dialog appearing party out of window

I am asking for help, we have a request dialog in our app, but it appears partly out of the screen so its croped a bit on the right side.
We would like to center it so it wouldn`t be croped. Would anyone know how to fix that please?
Thanks
I had the same problem. I'm not sure about the way how to position dialog itself. IMHO it can also depend on location of click event. Anyway, I've found ugly, but quite functional way to fix it with JavaScript:
setInterval("$('.fb_dialog').css('left', '0');", 1500);
The dialog itself cannot be repositioned.
Are you using iframes in your code by any chance?
Try changing the width in your CSS file to something smaller and see if it makes a difference. The Request Dialog usually positions itself in the middle of a page by detecting the size of the page / frame.

bgiframe appears in front of jquery modal dialog's overlay in IE6

When I look at jquery ui's demo modal dialog (http://jqueryui.com/demos/dialog/#modal) in IE6 the bgiframe is appearing on top of the background overlay. So instead of seeing a black/gray stripe pattern, there is just a white background covering the page with the word "false" in the upper left corner. Is bgiframe broken with the latest version of jqueryui? Is there a quick way to repair this problem with bgiframe? If not, is there a plugin that hides selects when a modal dialog is shown? The ie6 z-index issue with selects is the reason I was using bgiframe in the first place.
Have you looked at this answer
http://blog.dmbcllc.com/2009/02/19/jquery-bgiframe-and-ie6-z-order-hacks/

Resources