« first day (2733 days earlier)      last day (1055 days later) » 

1:01 PM
HEy
I am trying to have a fontawesome icon as a submit button, and when I enter it into a script editor it tells me unexpected end of input
.gg-file-add {
    background:
        linear-gradient(to bottom,
            currentColor 5px,transparent 0)
            no-repeat 2px 9px/6px 2px;
    box-sizing: border-box;
    position: relative;
    display: block;
    transform: scale(var(--ggs,1));
    width: 14px;
    height: 16px;
    border: 2px solid transparent;
    border-right: 0;
    border-top: 0;
    box-shadow: 0 0 0 2px;
    border-radius: 1px;
    border-top-right-radius: 4px;
    overflow: hidden
  }
Ive got the css for the button
<div class = "container">
	<p><center>Destruction Form</center></p>
	<button onclick="https://siteexample.sharepoint.com/cyber/Lists/DestructionPolicy/NewForm.aspx" class="gg-file-add"></button>
	</div>
 
1:30 PM
@MaxiGui users with 20k reputation or more can delete vote answers that are negatively scored as well
@bigchungus can you make a reproducible demo on jsfiddle.net or something?
 
1:42 PM
Nvm figured it out
but what the hell
My one link doesnt work. IT just refreshes the same page im on
 
If it's a SharePoint page, it might be hijacking your code and replacing some of it. Especially if there's any JS or HTML5
SPO is a bit better than on-prem versions
however I'm not sure your button onclick thing will work
use <a href> instead
 
It worked fine for other link
<div class="center">
<form action="/cyber/Lists/DestructionPolicy/NewForm.aspx?">
<button type ="submit" class="btn">Destruction Form</button>
</form>
Thats my new one that wont work
 
There is a sharepoint SE site that may have something on that (or people who know more); sharepoint.stackexchange.com
 
I know, posted there waiting on response
 
ok so there is a way to delete it at a point. That is good the way it is
 
1:52 PM
?
 
I just answered to TylerH, no link with your problem
 
2:28 PM
posted on October 23, 2020

New Cyanide and Happiness Comic

 
WTF
@TylerH so the a href works... but it doesn't look like the button anymore
The destruction form is the one I changed because it wasn't working
went from
<form action="/DestructionPolicy/NewForm.aspx">
<button type ="submit" class="btn">Destruction Form</button>
</form>
To <a href ="=/DestructionPolicy/NewForm.aspx" class="btn">Destruction Form</a>
 
3:12 PM
You can format an a href like a button
one sec
See my answer here: stackoverflow.com/questions/13630229/… at the end of it there is a demo for making an element look like a button, including mousedown styles and stuff
you can apply it to an <a> just as easily, you just might need to set display: block or something
 
@TylerH I figured it out before I saw this but I am still facing some issues
stackoverflow.com/questions/64502383/html-button-issues refer to the Update and below in bold
 
FYI there is no font-color property. It is just color
 
Thats what I tried as well and nothing changed haha
That edit just made it one really long button
And the text colors didn't change
 
you also have invalid spaces
in the HTML it is class="btn" not class = "btn"
 
What do you mean
 
3:23 PM
anyway, do you want the background color to be gold or the text color?
 
Background color green like it is, text color
#b3ab7d
 
OK, it is that color when I run it
 
Ok, I fixed it on my end
a {
    text-decoration: none;
}
a:link, a:visited {
    color: #b3ab7d;
}
a:hover {
    color: #b3ab7d;
}
why does the center div now connect as one block
 
that's unnecessarily verbose. if you want the color to be #b3ab7d all the time regardless of whether it's been visited, is hovering, or not, just set the style once on a
@bigchungus because that is how divs work. If you want space between two divs, apply some margin. In this case, apply something like margin: 0 10px; to the .btn class
that will put 10px of margin space on the left and right sides of each button (the space between the two buttons will collapse. Look up "css margin collapse" for more info on that if you're unfamiliar with how that works)
 
Thanks for your help
 
3:29 PM
np
 
And I understand that it is verbose, I just don't see an issue with it if it wokrs
 
Well, the issue is not necessarily always with "now" but often "later"
 
Ah.
 
Write code for the person who will be maintaining your code in 6 months - 5 years frmo now
which sometimes will still be you :-P
If you write something in three places where one place will do, then you have 3 places to update when you want to change the value
 
Haha yes, I can't with HTML for some reason. JS and Java I am fine, I guess I just dont have nearly any practice with HTML5
 
3:32 PM
also, if you follow that practice for enough styles or enough code, files can start to get big, which can impact load times. Not a huge deal, but can be a big enough deal, especially if you're working at large enough scales or for mobile devices, etc.
 
This is going to be such an idiotic question. SO I have a logo png, instead of taking too much time and using photoshop. Can I create a square that is going to be say the same color green as the previous button. Is there a way I can get that logo in that square with writing below it and it links to another page? With CSS
I don't think I could have asked that in a worse manner
 
@bigchungus you mean position the logo in the middle of the square? so the square is bigger than the logo?
 
Yes obv.
Im gonna make a fiddle rq to show you what I mean
 
Yes, you can do that
 
I am just confused on how to position logo top center, and then have some text below it witha href link. Or can the whole square work as a link to
 
3:42 PM
Here's a basic demo using flexbox jsfiddle.net/zg4cqtrp
no actual image so I added alt text to show the positioning
also works by removing the height/width from the container or setting them both to 100%, etc.
 
So are you saying the red border is the square and the green is the image
 
No, the red border is the whole page, the green is the square and the alt text inside the green square is the logo
Here, this will be clearer: jsfiddle.net/zg4cqtrp/1
more closely emulates a "real page" being already in place behind the square and image
resize the display section to see it is responsive
Alternatively, if you just want a color to be surrounding an image, you can just give the image a big fat border: jsfiddle.net/zg4cqtrp/2 lol
 
Like this. I want the logo centered up top. And the text below it to be centered as well. Instead of having just the text be the link, is it possible to make the whole div clickable to a new link or no
 
3:59 PM
@bigchungus jsfiddle.net/oybfqwxh that's the first bit
if you want to make the whole div clickable then you can either do that via JS or you can move the <a> up higher in the DOM and wrap it around all the content. one sec
 
Ok.
 
That looks good.
Trying to do something like this www2.northropgrumman.com/suppliers/Pages/…
was able to get this jsfiddle.net/j407aesd/1
@TylerH one more q
 
4:40 PM
If I want to do a collection like so, how do I get them side by side
 
4:58 PM
Lost
 
5:44 PM
@bigchungus You'd remove the container wrapped around each one
 
6:05 PM
@TylerH I figured it out
@TylerH one more question for you since you seem to know what your doing more than I.
www2.northropgrumman.com/suppliers/Pages/… see how this is like a HTML table/list with the dropdowns.
How would you go about doing that.
 
@bigchungus Expanding and collapsing is known as accordion.
You should check this:
https://www.w3schools.com/howto/howto_js_accordion.asp
 
@LinuxUser Very Nice! insert Borat voice
 
@bigchungus It's mostly recommended that you make accordion menus, or any interactive operations, be done via JavaScript or some server-side method. E.g. jqueryui.com/accordion
You could do it with checkboxes and labels, but that would really make your HTML verbose, and would be considered a 'hack'
 
jQuery is cake. I was thinking there would be a way to do it with that. But this accordion looks like exactly what I need
 
6:31 PM
@TylerH when I expand the row, it refreshes the page after its open and closes it right after
And when I look in the console, nothing pops up to explain it
jsfiddle.net/v23gn6w7 it doesn't do it on this... But in my SharePoint script editor, as soon as I expand the page refreshes and collapses
 
6:53 PM
That sounds like you'll need some assistance from SharePoint people; e.g. on the SharePoint Stack Exchange site
Not sure what all SharePoint does with code
could be it includes its own version of jQuery that you need to override or at least account for but I'd totally be guessing
 
7:04 PM
Ok
 
7:20 PM
Makes no sense
Wouldnt I be able to see why its collapsing again in the console?
 
7:35 PM
sorry for offtopic, but this chat is awesome! thanks to creators!!
 
8:13 PM
@01e5Dk huzzah
@bigchungus maybe. Maybe not if it is done on the server side. The console only catches javascript, so if something happens on the server side it won't get detected
C# or PHP for example can run code on the server based on what you do in the client
and if you don't have code that says "console.log this" then you won't see it in the console anyway
 
 
2 hours later…
10:27 PM
 

« first day (2733 days earlier)      last day (1055 days later) »