Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
[QUOTE=Svenskunganka;47105569]Could you show your entire virtual host config? Seems to me like you're redirecting forth and back[/QUOTE]
[code]
<VirtualHost *:443>
(SSL stuff)
ServerAdmin josm@anche.no
ServerName josm.uk
ServerAlias www.josm.uk
DocumentRoot /srv/www/josm.uk/public_html/
ErrorLog /srv/www/josm.uk/logs/error.log
CustomLog /srv/www/josm.uk/logs/access.log combined
</VirtualHost>
[/code]
You did mean this, right?
Where should the script tags be placed?
I was following a tutorial and he was placing them inside <head> but I read somewhere where it said they have to go in <body>, I placed them in the body and everything worked.
Now something happened and it's like the scripts are not being ran at all, all it does it loads the page for a while and then the code I placed is not working.
both works.
head if you want the script to be downloaded and executed before the rest of your HTML loads (it will block)
bottom of body if you want the HTML to load first and then the scripts are downloaded
this is if not using async or defer attributes
And is this what I need to run jQuery?
Also is the second line correct?
[code]
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="javascript/index.js"></script>
[/code]
yeah i guess. are you using some debug tool? then it's easy to see if your script was downloaded and if it have errors
if you're doing stuff in the DOM, are you using a [url=http://api.jquery.com/ready/]ready function[/url]
Yes I am using ready and it works now.
I changed...
[code]
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
[/code]
with
[code]
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
[/code]
[QUOTE=BoowmanTech;47106100]Yes I am using ready and it works now.
I changed...
[code]
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
[/code]
with
[code]
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
[/code][/QUOTE]
Shouldn't make a difference. Using "//" will just get it from [url]http://ajax.googleapis.com[/url] if the user is using http to connect to your website, and [url]https://ajax.googleapis.com[/url] if the user is using https to connect to your website.
[QUOTE=Cyberuben;47106484]Shouldn't make a difference. Using "//" will just get it from [url]http://ajax.googleapis.com[/url] if the user is using http to connect to your website, and [url]https://ajax.googleapis.com[/url] if the user is using https to connect to your website.[/QUOTE]
Well idk, all I know is that the second one works and that they are 2 different URLs.
I'm currently using Semantic UI for a Web-Dev project and I can't quite fix this
This is how it looks currently:
[T]http://i.imgur.com/zJZ4l5u.png[/T]
As you see, on the right side it's kinda pinned to the top, and I don't know why.
Source:
[CODE]
<div class="ui fixed top tiered inverted main menu" id="topMenu">
<div class="container">
<div class="ui item" onclick="toggleSidebar();"><i class="content icon"></i></div>
<a class="title ui item" href="?site=main/main">
<i class="home icon"></i>
</a>
<a class="title link item">
<b><?php echo $GLOBALS["config"]["project"] . " - " . Template::get("title"); ?></b>
</a>
<div class="ui item">
<div class="ui search mini" id="userSearch">
<div class="ui icon input mini">
<input class="prompt" type="text" placeholder="User-Suche">
<i class="search icon" onclick="doUserSearch()"></i>
</div>
<div class="results"></div>
</div>
</div>
<div class="right menu">
<div class="item">
<div class="ui pointing dropdown link" id="userDropdown">
<i class="dropdown icon"></i>
<span class="text">Eingeloggt als <?php echo $_SESSION["username"]; ?></span>
<div class="menu">
<a class="item link">
<i class="icon user"></i>
<span>Profil</span>
</a>
<a class="item link">
<i class="icon users"></i>
<span>Freunde</span>
</a>
<a class="item link">
<i class="icon settings"></i>
<span>Einstellungen</span>
</a>
<a class="item link">
<i class="icon calendar"></i>
<span>News</span>
</a>
</div>
</div>
</div>
<div class="ui item buttons">
<a class="ui button green" href="?site=main/downloads">Downloads</a>
<a class="ui button teal">Feedback/Support</a>
<a class="ui button red" onclick="logout();">Logout</a>
</div>
</div>
</div>
</div>
[/CODE]
[QUOTE=Cyberuben;47106484]Shouldn't make a difference. Using "//" will just get it from [URL]http://ajax.googleapis.com[/URL] if the user is using http to connect to your website, and [URL]https://ajax.googleapis.com[/URL] if the user is using https to connect to your website.[/QUOTE]
This has been covered multiple times here before:
If you're using // you need to be on an actual server, if you're opening a .html into the browser for example you [B]NEED[/B] to specify the protocol.
[QUOTE=Moofy;47107819]This has been covered multiple times here before:
If you're using // you need to be on an actual server, if you're opening a .html into the browser for example you [B]NEED[/B] to specify the protocol.[/QUOTE]
Technically it'll work but because you're using file:// it'll try to open file://ajax.googleapis.com since all // means is use the same protocol, had you accessed the file over ftp it would've tried to open [url]ftp://ajax.googleapis.com[/url].
Besides this using file:// and Chrome (and probably all other browsers too) will cause you a headache because there's a whole bunch of security measures preventing you from opening local files this way
Dirty question: If we have a div, which has a lot of elements inside (divs, spans, lists, etc etc etc), is there a css-only way to pick the attribute of one of them (by example, .author_info:nth-child(1):nth-child(2):nth-child(1)[href*="/user/44-"] ) and change the main div (author_info) in that case?
Google doesn't say a lot, even restricting searches to last year.
Using this with IP.Boards; snippet of the important code [URL="http://jsfiddle.net/uy3ry4gL/"]here[/URL].
If I understood you correctly you want to find a child and from that child a far-up parent?
if using jquery you could do something like this
[code]
$('a[href*="/user/44-"]').closest('.author_info')
[/code]
closest traverses upwards
if not, write a simple loop that checks the class of the parent and traverses upwards
Yeah, it'd be something like that. I was wondering if there would be a way to make it purely with CSS, though.
I tried with a shitton of :nth-childs and it didn't work, but I guess that'd be part of the solution, if there were one
That wouldn't be a good solution. It's pretty hard to figure out what's happening
[editline]10th February 2015[/editline]
Besides I don't think it would even work ?
Hey,
I have hardly any coding experience aside from fairly basic html, CSS and modifying other things such as SM server plugins, and I'd like to make a site similar to [url]http://choosemypc.net/[/url] except with a database of different results and different sorting functions (For example if this website gave you 10 different builds to choose from in your price range, and you could sort by price, brand, etc)
What would be the best route to take? Should I just learn javascript (To make it interactive and sexy) and improve my HTML/CSS and learn some sort of database language?
Thanks
Where can I get the cheapest wildcard SSL cert?
What's the difference of getting wildcard ($94.00) and multi ($29.88)?
It says on namecheap you can have unlimited SUB-domains from a single domains and multi is up to 100 domains.
[url]https://www.namecheap.com/security/ssl-certificates/multi-domain.aspx[/url]
Wouldnt it be better to have 100 multi-domain instead of unlimited sub-domain?
[QUOTE=johnnyaka;47107805]I'm currently using Semantic UI for a Web-Dev project and I can't quite fix this
This is how it looks currently:
[T]http://i.imgur.com/zJZ4l5u.png[/T][/quote]
I'm running into something similar to this and thought line-height might resolve it but have had no dice thus far.
[QUOTE=jung3o;47112772]What's the difference of getting wildcard ($94.00) and multi ($29.88)?
It says on namecheap you can have unlimited SUB-domains from a single domains and multi is up to 100 domains.
[url]https://www.namecheap.com/security/ssl-certificates/multi-domain.aspx[/url]
Wouldnt it be better to have 100 multi-domain instead of unlimited sub-domain?[/QUOTE]
Even if it would work only the first 3 domains are included in that price, after that it's €11,42/yr per domain
I've been developing a web application in chrome's mobile tools, does anyone know of any libraries or SDK's to help port my HTML files to Android / iOS. I need basic services like file input and geo location. I've tried PhoneGap and Corona but I can't use file input with this.
edit: It turns out PhoneGap / Cordova has a plugin for this, nvm.
[QUOTE=Pridit;47112941]I'm running into something similar to this and thought line-height might resolve it but have had no dice thus far.[/QUOTE]
I created an Issue [URL="https://github.com/Semantic-Org/Semantic-UI/issues/1788"]here[/URL], let's see if we are just dumb or it's a bug :v:
Woah, 1 week since last post.
I received this morning a mail from AdMedia titled "Re: Campaign Question" asking me for a 'partnership opportunity between our two companies'. They say that they've 'ran campaigns for <site name> via third party networks' (which is bullshit because I've *never* put ads on that webpage, and the only third-party network with any kind of information would be Disqus) and 'wanted to work directly together' with me.
Now, first thing I thought was "oh yey, a spam mail, wonderful". But then I checked and the email they sent it to is the Whois one, there's no shady business in the source code, and the name of the rep checks out (same position in LinkedIn).
Do you guys think it's legit (and specifically sent to me), it's legit (but sent to multiple domains other than mine to get some replies), or it's the best fake I've ever seen?
Sounds pretty shady?
Are there any good profiling tools for finding memory leaks in a massive Javascript / Typescript application?
What TLD should I use for my portfolio? Does anyone really care? If not i'll just use a free one or something.
[QUOTE=Th3applek1d;47222407]What TLD should I use for my portfolio? Does anyone really care? If not i'll just use a free one or something.[/QUOTE]
As long as it's sort of related I think it'll be OK. For example if you're in the uk you could get .co.uk, or .com, .net, .me or others. But getting a TLD like .furniture wouldn't be a fit.
I don't know what ones are free, but usually they're sensible so you could just grab one of them.
[QUOTE=Rocket;47224603]If it's a web development portfolio, definitely. It makes you look way more professional. If it's a portfolio for something unrelated, it doesn't really matter.
See also: [url]http://www.freenom.com/en/index.html[/url][/QUOTE]
Yeah, I host several domains through them for my odd and end projects, they have a pretty nice UI and great features and even service for the most part but the site is just slow as /fuck/.
I ended up going with a .me domain, beause it was cheaper and it seems fitting. I'm thinking of buying some of the more "common" TLDs for my domain and have them redirect to the .me site (except for .com, it's taken :(
Sorry, you need to Log In to post a reply to this thread.