Web Development Questions That Don't Need Their Own Thread v2
3,079 replies, posted
There's actually an option in Firefox to print the backgrounds.
Just put
[html]<link rel="stylesheet" type="text/css" href="print.css" media="print" />[/html]
in your head tag and go crazy.
Does anyone know of any methods to set the body height to the viewport (To the point where it goes just as far as to hide the URL bar) in mobile websites?
Here's a picture to illustrate.
[img]http://dl.dropbox.com/u/9012934/FPMobile/IMG_1203.PNG[/img]
Essentially, I want the area of the red box. I want to avoid anything browser specific, and methods like adding extra padding, or a high min-height.
I'm trying to use cURL in php to
1. login to a site
2. submit a second form while logged in
3. download the csv file that results from submitting the form in step 2
I figured out how to login, download, and echo the page where the second form is located from reading some code off the internet but I have no idea how to submit a form the second time while still logged in
Can anyone help? Let me know if you need any more info...
[QUOTE=ken188;30398704]I'm trying to use cURL in php to
1. login to a site
2. submit a second form while logged in
3. download the csv file that results from submitting the form in step 2
I figured out how to login, download, and echo the page where the second form is located from reading some code off the internet but I have no idea how to submit a form the second time while still logged in
Can anyone help? Let me know if you need any more info...[/QUOTE]
I'm assuming the site uses cookies to check if you're logged in; in that case, you have to give the cookies back to the server the second time, so it can see that you're logged in.
I need to interact with the users PC so I was just wondering if it would be better to use Java or Flash?
I basically need to record sound from the users computer.
Also I remember seeing a good host a while back, it was something like £15 for a year and it included a domain name, they were uk based.
Dont know if it rings a bell with anyone but if it does could you tell.
More people have Flash than Java, and Flash starts faster than Java does.
[QUOTE=TheDecryptor;30408232]More people have Flash than Java, and Flash starts faster than Java does.[/QUOTE]
Is there anyway to develop for flash (including the gui of the program im thinking of) without using Flash?
I have a question about javascript, but it's uses are more for web, so:
How can I wrap the span tag around an already existing img tag?
[QUOTE=vexx21322;30423225]I have a question about javascript, but it's uses are more for web, so:
How can I wrap the span tag around an already existing img tag?[/QUOTE]
Easy with [url=http://api.jquery.com/wrap/]jQuery[/url].
[html]$("#myImage").wrap("<span>");[/html]
[QUOTE=Skorpy;30423679]Easy with [url=http://api.jquery.com/wrap/]jQuery[/url].
[html]$("#myImage").wrap("<span>");[/html][/QUOTE]
Wow, how did I not check Jquery.
Thanks.
[Editline]a[/Editline]
What's a good way to check if the tag I'm wrapping the other tag in doesn't already exist?
Something like this maybe?
[html]
var myImg = $("#myImage");
if (!myImg.parent().hasClass("cool-image")) {
myImg.wrap("<span class='cool-image'>");
}
[/html]
[QUOTE=Skorpy;30424743]Something like this maybe?
[html]
var myImg = $("#myImage");
if (!myImg.parent().hasClass("cool-image")) {
myImg.wrap("<span class='cool-image'>");
}
[/html][/QUOTE]
Perfect, thanks for all your help.
[html]
$('img').wrap( function()
{
if( !($(this).get(0).parentNode.tagName == "A" ))
--code
} );
[/html]
I love Jquery.
[QUOTE=Catdaemon;30332399]Has anyone used CodeIgniter? I'm liking it so far but the view system is odd.. can you not have views rendered inside views? It'd be nice to be able to wrap all the header/footer fluff that's on every page in a single file so I can focus on writing views for content.[/QUOTE]
4 days late but.....Check out [url]http://www.fuelphp.com[/url]
It's basically a newer version of CodeIgniter. A lot of the top contributors banded together and decided to make a new framework that took all the good things from CI and fixed the bad.
[QUOTE=Haxxer;30372487][img]http://www.facepunch.com/fp/ratings/tick.png[/img] Agree x 1000[/QUOTE]
[img]http://www.facepunch.com/fp/ratings/tick.png[/img] Agree x 10000000
Someone fucking make a decent Windows GUI for MongoDB. MongoVUE is pure trash compared to the majority of the ones available for OS X. It works, but the interface is just clunky and it's a hassle to do anything. Want to edit a record you're viewing? Well you have to basically type the query in a separate tab for it to work. I'd rather just use the console over it.
[QUOTE=adamjon858;30432743]Someone fucking make a decent Windows GUI for MongoDB. MongoVUE is pure trash compared to the majority of the ones available for OS X. It works, but the interface is just clunky and it's a hassle to do anything. Want to edit a record you're viewing? Well you have to basically type the query in a separate tab for it to work. I'd rather just use the console over it.[/QUOTE]
I wouldn't know where to start.
[editline]13th June 2011[/editline]
now a web gui, I might be able to do
question: why are people stupid, thinking they can exploit shit
[url]http://dl.dropbox.com/u/1032139/www/kk404/404.htm[/url]
[QUOTE=Jimbomcb;30445673]question: why are people stupid, thinking they can exploit shit
[url]http://dl.dropbox.com/u/1032139/www/kk404/404.htm[/url][/QUOTE]
skiddies:
[img]http://i.imgur.com/fbJGZ.png[/img]
OSX has all the good programs. Is it hard to make a hackintosh?
[editline]14th June 2011[/editline]
Love this tweet in the middle of the page: [url]http://fuelphp.com/[/url]
[QUOTE=jaybuz;30449131]OSX has all the good programs. Is it hard to make a hackintosh?
[editline]14th June 2011[/editline]
Love this tweet in the middle of the page: [url]http://fuelphp.com/[/url][/QUOTE]
Depends on your hardware. Generally, it's shit easy to make a hackintosh on a desktop with an Intel CPU. My desktop hackintosh (3.8ghz i7 OC, 16GB ram, 5770, 8TB raid, 3x 1080p monitors) works perfect. My laptop hackintosh (2.4ghz C2D, 4GB ram, 2x500GB, Apple wifi card, 9800GTS) works but I need to start it up in OSX safe mode and then individually launch core processes as its a bit buggy.
[code]ESUxwCXCJba said...
EFy5oO , [url=http://gbwjgsfifbqz.com/]gbwjgsfifbqz[/url], [link=http://ycrvpbwovbsj.com/]ycrvpbwovbsj[/link], [url]http://nlnmbvvndtcs.com/[/url]
06/11/11
BpZxMJWRHeOIXEyDIc said...
LGLGXb <a href="http://aatdyeccsngx.com/">aatdyeccsngx</a>[/code]
why do people try this when They keep on failing to do so?
[QUOTE=zzlawlzz;30449402][code]ESUxwCXCJba said...
EFy5oO , [URL="http://gbwjgsfifbqz.com/"]gbwjgsfifbqz[/URL], [link=http://ycrvpbwovbsj.com/]ycrvpbwovbsj[/link], [URL]http://nlnmbvvndtcs.com/[/URL]
06/11/11
BpZxMJWRHeOIXEyDIc said...
LGLGXb <a href="http://aatdyeccsngx.com/">aatdyeccsngx</a>[/code]why do people try this when They keep on failing to do so?[/QUOTE]
Because very often something eventually goes through. PHP in particular is open to dozens of different exploits most developers don't even know exist. (assuming that's someone trying to bypass sanitization on a chat system or forum - you didn't give us a lot of context.)
Example: your image uploader is terribly insecure.
[QUOTE=StinkyJoe;30449552]Because very often something eventually goes through. PHP in particular is open to dozens of different exploits most developers don't even know exist. (assuming that's someone trying to bypass sanitization on a chat system or forum - you didn't give us a lot of context.)
Example: your image uploader is terribly insecure.[/QUOTE]
ok.
I know.
So i've been working on a javascript function to retrieve the currently playing song on Shoutpunch and making it scroll in the title bar so you can read the full song name when the tab or window is in the background. I've customzed a scroll title bar script i found on the interwebs to work in this situation.
[code]function stateChanged()
{
if (xmlhttp.readyState==4)
{
var songtitle = new String(xmlhttp.responseText + " ");
document.title= xmlhttp.responseText;
document.getElementById('songtitle').innerHTML= xmlhttp.responseText;
var msg = songtitle;
var pos = 0;
var spacer = " ... ";
var time_length = 100;
sleep(2000);
while (pos < msg.length)
{
document.title = msg.substring(pos, msg.length) + spacer + msg.substring(0, pos);
pos=pos + 2;
sleep(800);
}
}
}[/code]
stateChanged is called when the song title is returned via request.
The sleep function i'm calling there has also been shamelessly stolen:
[code]function sleep(ms)
{
var dt = new Date();
dt.setTime(dt.getTime() + ms);
while (new Date().getTime() < dt.getTime());
}[/code]
It does work under Opera and Chrome, has quite an impact on Opera's performance though. Firefox completely throws up when i run it.
Could somebody with some JavaScript knowledge help me out here?
That looks pretty inefficient, it'd be better to store the song title in a global variable, and perform the scrolling in a function you trigger with setTimeout (each time it's called, you move it over one character, then when it's "finished" you can use a longer timeout to have it pause at the end of the animation before it starts over again)
I did exactly that previously and it always came up with a "cannot convert 'msg' to object" and refered me to this line
[code]document.title = msg.substring(pos, msg.length) + spacer + msg.substring(0, pos);[/code]