LLLLLLL
-
Posts
306 -
Joined
-
Last visited
Posts posted by LLLLLLL
-
-
I'm trying a basic CSS media query. I added these two lines to my file... they are essentially copied from another site, with the href being different and referring to actual files on my server.
<link rel="stylesheet" type="text/css" media="screen and (max-width: 740px)" href="assets/css/style_m.css" />
<link rel="stylesheet" type="text/css" media="screen and (min-width: 741px) and (max-width: 900px)" href="assets/css/style.css" />
But this doesn't work for me at all. The result on my site is that the elements on the page act as if no CSS file is declared at all. Is there something more that I need to do?
-
I need the metadata from the file. That's what this thread is about.
-
Yeah, I saw that. Was hoping for something more built-in.
-
I have found some info on manipulating PDF documents here http://www.php.net/manual/en/ref.pdf.php and elsewhere, but I can't get exactly what I need.
What's the easiest way to get metadata (author, title, keywords, etc.) from a PDF document? Basically I want the opposite of
http://www.php.net/manual/en/function.pdf-set-info.php
Is there an easy "get info" function somewhere?
-
Yes , I thought about that right before going to sleep last night... just set it directly.
Appears to be it.
-
Marking as solved because I have enough info. It does seem like more info is needed in general documentation, and/or testing of the order of events. I don't have time to look into these things right now.
But at least I know that it hits onclick because there's a spec for it.
-
Player is an audio element
var player = document.createElement( 'audio' );
player.setAttribute( 'volume', default_volume );
-
I have an HTML5 audio player that gets created dynamically. Elsewhere the variable is declared:
var default_volume = 0.8;
Then I set the volume for the player ...
player.setAttribute( 'volume', default_volume );
Debugging shows default_volume is 0.8, but once set, "volume" is changed to 1
Why is there rounding? How can I make it maintain the value I chose?
-
Cool, as long as it is documented. I just wanted to know what it was doing it. Clearly "onclick" isn't the way to go.
I wasn't clear from that DOM doc, if both onclick and onsubmit are declared, what gets processed first?
-
Right, like I said, browsers seem to do this. But is it documented somewhere? Is it just our imagination?
-
There are lots of form-validation discussions revolving around onsubmit versus onclick. This is not one of them, but it's related.
I noticed something like this:
<form method="post"> ... <input type="submit" onclick="return validate_form()"> </form>
So there's no "onsubmit" validation for the form, but the button's onclick is calling the function instead. This isn't the recommended way to do this validation, so it is said, because someone can press "enter" in another input field of the form, thus bypassing the "onclick" event of the button.
But that's where my question comes in....
1) I am pressing enter in a text box
2) The "validate_form()" function is getting called anyway!
Why would that be? Is there now built-in logic to some browsers to do this? Any other reason?
Chrome's call stack shows that the onclick handler initiated the call to the function, but I pressed enter in a text box. So why did that handler get called? (Chrome, IE, all the browsers do this.)
-
"Before any output" - very good! That helps me.
So I will pretty much modify my code as I stated; the line won't be the very top of the file, but it will be very close.
Thanks!
-
So, I understand if I add the following, that other domains can use the script via AJAX:
<?php header("Access-Control-Allow-Origin: *"); ... code that does something
My question is: does this line have to be at the top of the file? Does it matter where this line is located?
I was thinking of doing something that lets a user configure their software's "allowed" domains, so, something like this:
<?php $urls = db::some_query_to_see_allowed_origins(); if ( !empty( $urls ) ) header("Access-Control-Allow-Origin: $urls"); ... code that does something
Would something like this work? I don't know at what point the "cross-domain" errors occur, so I don't know where the header line needs to be.
-
I have already corrected the issue by turning off backstretch on the offending page, so i'm not sure how you can reproduce it. At this point it's an issue with backstretch anyway.
I don't see a reason to post a link to my client's working site.
-
Thanks for an insulting post.
-
No, that doesn't explain why it's only for some users.
It's clearly an issue with the jQuery "backstretch" plugin. Has something to do with people and very large screens/resolutions. Still doesn't make sense.
-
What is wrong with what you have here? Does it work?
-
A customer's web page of their store (where credit card numbers are entered) is HTTPS. On my machine, and for several others, there are no content warnings; everything is HTTPS. For some users, the page shows that some content is insecure. How is this possible?
I should note there is a backstretch jQuery script in use, but I've set the background to always be HTTPS, so it doesn't make too much sense that this is the culprit.
-
The answer here was that there was a <base> element on the page that I forgot about. This <base> tag had the href in HTTP, not HTTPS. Eh voila.
-
The only additional information I have is that based on browser settings, a user might get "although this page is encrypted the information you have entered is to be sent over an unencrypted network."
This still doesn't make sense. It is an HTTPS page with a relative URL. How can it be posting as HTTP? Ugh.
-
(sent a private message with URL)
-
Now that I'm closer to a solution, I'm finding exactly what's going on. Closing this topic and opened a new one:
-
If I'm on https://myserver.com/test.php, why is this form posting to the HTTP version of the page?
<form method="post" action="test.php?step=1"> <input type="text" name="email"> <input type="submit" name="submit"> </form>
I can hard-code the full path in the action, but that seems unnecessary.
Further, I have some pages where it posts to HTTPS first (as I expect). Why would it go to one versus another?
-
Actually I see now that the $_POST has nothing in it. Is the mod_rewrite eliminating the post on redirect?
Trying CSS media query. Not working
in CSS Help
Posted
No, the file path was not wrong.
Looks like the problem was actually and (max-width: 900px) since my screen was wider than that. Confused why the original site works with that same query, however.