Jump to content

Cronthenoob

Members
  • Posts

    312
  • Joined

  • Last visited

Posts posted by Cronthenoob

  1. it was just a guess :)You hurt my feelings :)j/k :)I found this on google! I don't know how old it is . . . . .

    SCRIBBLE - This type would allow the user to "scribble," with a mouse, pen, or arrow keys, on the image specified by the SRC attrib. If the browser is unable to display images, the SCRIBBLE type defaults to TEXT with an initial value of someval. How the information would be passed back is not yet defined.
    I found this too. (it only works in Firefox, opera, and safari.
    <html><head>	<title>Canvas Scribble</title>	<style type="text/css">	/* <![CDATA[ */	body {		-khtml-user-select:none;		-moz-user-select:none;	}	#canvas {		border:1px solid silver;	}	#button {		width:750px;		text-align:center;	}	/* ]]> */	</style>	<script type="text/javascript">	/* <![CDATA[ */	var canvas, context;	var x1, y1, x2, y2, dx, dy;	function windowLoaded() {		canvas  = document.getElementById("canvas");		debug   = document.getElementById("debug");		context = canvas.getContext("2d");		canvas.addEventListener("mousedown",mousePressed ,false);		canvas.addEventListener("mouseup"  ,mouseReleased,false);		context.lineCap		= "round";		context.lineJoin	   = "round";		context.lineWidth	   = 2;		context.shadowBlur	   = 3;		context.shadowColor   = "#ff0000";		context.shadowOffsetX = 2;		context.shadowOffsetY = 2;	}	function mousePressed(evt) {		canvas.addEventListener("mousemove",mouseDragged,false);		context.beginPath();		x1 = evt.pageX;		y1 = evt.pageY;	}	function mouseDragged(evt) {		x1 = x2;		y1 = y2;		x2 = evt.pageX;		y2 = evt.pageY;		context.beginPath(); // necessary for Opera 9.0beta. why???		context.moveTo(x1,y1);		context.lineTo(x2,y2);		context.stroke();	}	function mouseReleased(evt) {		canvas.removeEventListener("mousemove",mouseDragged,false);		context.closePath();	}	function clearCanvas() {		context.clearRect(0,0,						  canvas.getAttribute("width"),						  canvas.getAttribute("height"));	}	/* ]]> */	</script></head><body onload="windowLoaded();"><canvas width="750"		height="500"		id="canvas"></canvas><input type="button"	   id="button"	   onclick="clearCanvas();"	   value="Clear"/></body></html>

  2. Ok try something like this.You'll obviously change the names to what you have in your database and add an action to the form. You can probably find a simple javascript to submit each feild automatically when the user selects something and so it remembers what they selected in each dropdown.But here is the general logic I could come up with. It should be a decent start if you know php :)P.S. I havnt tested it yet.

    <html><body><form><select name="industry"><option value="">---Industry---</option><?PHP	$query="SELECT * from dropdown1";	$results = mysql_query($query);	while ($e=mysql_fetch_array($results)) {	 echo "<option value='".$e[one_value]."'>".$e[one_value]."</option>";	}?></select><select name="product_cat"<?PHPif ($_REQUEST['industry'] != "") {echo ">";}else { echo "disabled>";}  $query="SELECT two_value from dropdown2 where dropdown_one_id=$_REQUEST[dropdown1]";  $results = mysql_query($query);   while ($e=mysql_fetch_array($results)) {	echo "option value='".$e[two_value]."'>".$e[two_value]."</option>";   }?></form></body></html>

  3. Try adding another div around both of your divs and giving it a fixed width.

    <div style="width:800px"> <div>Something</div> <div>Something else</div></div>

  4. Thank you chronthenoob that helps me a lot i have it hardcoded now but is it possible to make this into a database driven list?
    It is very much possible to make them database driven. I'm sure you can just add some database interaction instead it being hardcoded. You posted in the php forum so im assuming you are using php and mysql for the database. I can help you out if you are having problems with the queries. It shouldnt be too difficult :)Good luck!
  5. Well if you don't need more than one or two pages you could place everything on a text file that can be edited. No database required.Just create .txt file in the folder you want. Use the fopen() function.Click Me!I've done something simliar, I can probably dig it up if you can't figure it out on your own. But you probably should if you want to learn something. :)

  6. Well, the easiest way is to download and install a prebuilt wiki software package onto your web server.I've never used one, but it looks like they are pretty customizable, and there are some free ones out there.

  7. I know everybody loves to use tableless layouts even though they can be a huge headache when you get into the more complicated designs. For this reason, if I run into a problem I can't fix after about an hour or two. I just end up using tables. Sure your file size will be larger, and maybe it'll take a little bit more time to load, but in the end, you don't have a headache and everthing was easier to get to look the way you wanted it.

×
×
  • Create New...