Jump to content

anyone have acode of downloading after aperiod


medicalboy

Recommended Posts

First off, "a" is usually it's own word.What are you trying to accomplish, do you just want an arbitrary timer where they have to wait for something to happen, or do you want it to actually be based on something?

Link to comment
Share on other sites

well you would already have the download link ready before the page pops up (you would have the file you want to serve them, right?) and then you could just use javascript to show it, i.e. change its display setting. So first things first, I guess you need a timer. What have you got so far?

Link to comment
Share on other sites

well you would already have the download link ready before the page pops up (you would have the file you want to serve them, right?) and then you could just use javascript to show it, i.e. change its display setting. So first things first, I guess you need a timer. What have you got so far?
yeh i need atimer,but i want afunction to generate arandom link for the user, to allow him to use this link only 1time for acertain periodthe same as rapidsharethanx in advance
Link to comment
Share on other sites

I imagine if you are asking for stuff like this, the random link generator for you atm is probably like putting the cart before the horse. So lets start small. You still need a timer. What have you got so far for this? (or anything for that matter?) Can you see where we're going with this? You start it off, we help you move it along, and so on and so forth...

Link to comment
Share on other sites

I imagine if you are asking for stuff like this, the random link generator for you atm is probably like putting the cart before the horse. So lets start small. You still need a timer. What have you got so far for this? (or anything for that matter?) Can you see where we're going with this? You start it off, we help you move it along, and so on and so forth...
this is the timer:
var minsvar secs;function cd() { 	mins = 1 * m("10"); // change minutes here 	secs = 0 + s(":01"); // change seconds here (always add an additional second to your total) 	redo();}function m(obj) { 	for(var i = 0; i < obj.length; i++) {		  if(obj.substring(i, i + 1) == ":")		  break; 	} 	return(obj.substring(0, i));}function s(obj) { 	for(var i = 0; i < obj.length; i++) {		  if(obj.substring(i, i + 1) == ":")		  break; 	} 	return(obj.substring(i + 1, obj.length));}function dis(mins,secs) { 	var disp; 	if(mins <= 9) {		  disp = " 0"; 	} else {		  disp = " "; 	} 	disp += mins + ":"; 	if(secs <= 9) {		  disp += "0" + secs; 	} else {		  disp += secs; 	} 	return(disp);}function redo() { 	secs--; 	if(secs == -1) {		  secs = 59;		  mins--; 	} 	document.cd.disp.value = dis(mins,secs); // setup additional displays here. 	if((mins == 0) && (secs == 0)) {		  window.alert("Time is up. Press OK to continue."); // change timeout message as required		  // window.location = "yourpage.htm" // redirects to specified page once timer ends and ok button is pressed 	} else { 		cd = setTimeout("redo()",1000); 	}}function init() {  cd();}window.onload = init;

http://javascript.internet.com/time-date/c...down-timer.htmland sorry for this, i still abeginner, but i tried to it but in vaini tried to add document.url like somethingwindow.location = "yourpage.htm" + document.url()but the problem , iwant to execute the link first ,then to add any random number to disguise the visitor fromthe real linkthis imean, disguising the visitor , in order to minimizing the number of downloads

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...