Jump to content

optikalefx

Members
  • Posts

    363
  • Joined

  • Last visited

    Never

Everything posted by optikalefx

  1. How can you put a time limit on it? I thought of cookies but thats not always good, and sweeping the server folder but that requires constant checks. The issue is that on this last download page, no more PHP is run, unless i do something via ajax when they click the download link. But i cant kill the sym link when they click the link of course. The download script idea was alright, except it doesnt work for this because this download link is an XPI for a firefox extension and if the link is not to a .xpi then the javascript wont verify it even if i redirect the headers and all. So im thinking itll have to be attached to the download? or if there exists a self destructing timer?
  2. Is there any way to tell that the download is completed?
  3. HI all, I have a file placed outside my web directory. I create via php a sym link to that file so a user can download that file. After the download, or after a period of time, i need the sym link to be removed and i need to add some info to my database that the download is done. any ideas?
  4. I have a file that people are installing from the web. Its a firefox extension. So you hit install and it installs it right to firefox. Is there a way for me to know weather the download started or finished? I need to record weather the user has tried to download or not. Id love for it to tell me they finished the download. What method or technique can I use to find out if the user is downloading the file/ or if the download is completed so i can then record that into my database? Thanks
  5. I just have the mysql server that powweb gives me. It works when its not above the doc root. I cant figure out how to edit posts on here?
  6. I have a bunch of mysql queries set up. They all worked fine, but i needed my info to connect to be moved above the web root so they are safe. First i set up a constants.php file that defines a bunch of constants. That works just fine. and the code to get to that file is require_once constants.php So i moved the constants file to root, which is 2 above where these are. So i changed it to require_once ../../constants.php Im able to echo the constants and get there info but mysql fails Warning: mysql_connect() [function.mysql-connect]: Access denied for user '****'@'****' (using password: YES) in /hermes/web04/b1609/pow.4ten/htdocs/paypal/newuser.php on line 66 Access denied for user '****'@'****' (using password: YES) And im not sure what cgi1204.int.bizland.net is. Im not using that anywhere. As far as i know. line 66 is just my connect query mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error()); Any idea what could be going on? Thanks guys
  7. <?php $server = "ftp.myserver.com"; echo $server; $conn_id = ftp_connect($server); ?> it gives me a fatal error that ftp_connect is not a defined function. and i know ftp is enabled and my server is correct. Using php 5. thanks.
  8. Im making a firefox extension. One of the features im using is the html 5 canvas. Which had the ability to load a remote website and scale it, basically making it a thumbnail of the site. Now my thumbnail works great on sites that dont have a doctype. But for all of those that do, canvas wont work. Moreover, i had my extension delete the doctype as the very first thing, but it still took affect and canvas never loaded. so that leads me to belive, changing the doctype wont do it either. so my question is a) can you think of another way, not using canvas, to load a website and scale it down or b) bypass the doctype so that it doesnt F with everything? btw, all changes are not permant of course, they just affect whats happening while the extension is running. THANKS!!
  9. so i have a div with text, and the text is all html, but you can see it. so it looks like <html> <p> hi </p> <br> blah blah i have thiis regex query <([A-Z][A-Z0-9]*)\b[^>]*>(.*?)</\1> which will find all tags how can i use that. I want to turn all tags blue on the page.
  10. nah i want to alpha out just the white of the image
  11. ive been looking at the gd library and im just wondering, is it possible to say click a button and it would alpha out the white of an image?
  12. its really simple actually. just create an alpha black div the size of the screen. and then use intervals to fade it in and out. or you could do the cool way and use canvas.
  13. Im trying to develop a way for a user to click an image, then on a button that would basically alpha away the white. like if its pic with a giant white block around it, i want to get rid of (alpha or get rid) that white part any ideas where to start?
  14. yea, i dont use it often so by heart i wouldnt know the code but i know for the current dom to get all links its document.links; so you could do something like var iframeLinks = document.getElementById("frameid").contentDocument.links; and then run a for loop for (i=0;<= iframeLinks.length;i++) and just change the target attribute of each link. like iframeLinks.setAttribute("target", "_self"); something like that.
  15. does the page in the iframe ever change? you can access the dom of that frame document.getElementById("frame id").contentdocument; take a look at this http://www.w3schools.com/htmldom/prop_frame_contentdocument.asp
  16. so are you saying the DIV prompt wont work? And in any case to get the data without typage is to use a select box (ist a drop down) i gave the sample code for that in my earlier post, in the .innerHTML part
  17. to tell you the truth, your better off with a div overlay than a prompt dialog. I know this probably changes everything for you, but I know you can do ANYTHING with the div. just do something like var newDiv = document.createElement('DIV'); newDiv.width = 300; newDiv.height = 300; newDiv.position = "absolute"; newDiv.top = document.body.clientHeight/2; // horizontally center newDiv.left = document.body.clientWidth/2; // vertically center newDiv.innerHTML = "<form action='' method=''><select name='info'><item name='male'>male</item><item name='female'>female</item></select></form> document.body.appendChild(newDiv); i didnt test this, so it may not be 100% but thats the main idea so that will put a div with custom html inside of it on the page. And then you can add more to that html that would call a function which would make the div go away document.body.removeChild(newDiv); oh and if the prompt is onLoad you can add to the body <body onload="placeDiv();"> and just have that run the code above, or similar
  18. no one is gonna write it for you but we can give insight on how to do it you can make use of the javascript built in date functions. Then based on what was clicked, use the functions to find out the year, and using math and the fact that each month as the same number of days every 4 years, you can calculate what this year will have. have fun making it
  19. Im not gonna write the code for you, BUT, the answer is yes, and here is the documentation http://developer.mozilla.org/en/docs/DOM:event.initMouseEvent read it learn it, it works.
  20. ok this is making me angry function viewHTML() { var html = editDoc.body.innerHTML; html = html.replace(/\n/g,""); html = html.replace(/>/g,">\n\r"); var view = editDoc.createTextNode(html); //view.style.width = editDoc.body.clientWidth; //view.style.height = editDoc.body.clientHeight; //view.innerHTML = html; editDoc.body.parentNode.replaceChild(view,editDoc.body); } so the replace functions do work to replace all occurences of a character. BUT id like it not to be a textarea, because im useing document.designMode as well. so i want it to be in a DIV or something. So i trie dthis function viewHTML() { var html = editDoc.body.innerHTML; html = html.replace(/\n/g,""); html = html.replace(/>/g,">\n\r"); var view = editDoc.createElement('DIV'); view.style.width = editDoc.body.clientWidth; view.style.height = editDoc.body.clientHeight; view.innerHTML = html; editDoc.body.parentNode.replaceChild(view,editDoc.body); } but that just recreates the body so i escaped it function viewHTML() { var html = editDoc.body.innerHTML; html = html.replace(/\n/g,""); html = html.replace(/>/g,">\n\r"); var view = editDoc.createElement('DIV'); view.style.width = editDoc.body.clientWidth; view.style.height = editDoc.body.clientHeight; view.innerHTML = escape(html); editDoc.body.parentNode.replaceChild(view,editDoc.body); } but that puts a ton of %20s and stuff and doesnt react to the replaces \n's an ahhhhhh i just want
  21. when i do str.replace("",""); its only replacing the first occurance. any ideas?
  22. ok that works sort of. But it only line breaks if i had line broke in the code by hitting enter. Is there a snippet that would loop thru the code and if it found > it would replace it with >/n so that all tags would be be on a new line?
  23. so i have a webpage that basically when you click a button it replaces BODY with a textnode of the innerHTML. Basically a view source. Problem is, that it shows all the HTML gumbled up. So how could i put in line breaks? Maybe make use of the splitText function?
  24. so im using this kind of listener document.addEventListener('mousedown',function,true); this is only for firefox. how can i make var num increase as you hold down the arrow key i already can detect if the arrow is pressed, but not held. its called once, and it should keep on calling it. //for down arrow if (e.keyCode == "40") { }
  25. so we go ahead and do document.addEventListener('click',myfunc,true); and then we do function myfunc(e) { and we can do alert(e.target.property) } so what i need to be able to do, is find out what font the text you click on is. and element.style.fontFamily wont work if there is no fontFamily present. So that means its in default font. which is what? javascripts gotta have something up its sleve (btw, same problem for font size, how do i know what size something is)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.