Jump to content

jaronblake

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by jaronblake

  1. I have found what you are looking for. You can find it at http://www.pageresource.com/dhtml/jtut6.htm but it is simple: <TABLE width="200" border="1" cellspacing="0" cellpadding="0"> <TR> <TD style="width:100%; background-color:lightblue" onMouseover="this.style.backgroundColor='yellow';" onMouseout="this.style.backgroundColor='lightblue';"> Watch me get scared! </TD> </TR> </TABLE>
  2. you can do this with a textbox and its value <script> function alertme(){ alert(document.formname.text1.value); } </script> <form name="formname"> <input type="text" value="This is the body text. From here I will select text" size="60" name="text1"> <input type="button" name="test" id="t1" value="push" onclick="alertme();"> </form>
  3. you can create buttons that can change the color of the cell but as for clicking on the cell itself i dont think thats possibe but i could be wrong.
  4. When you say "clicked on" are you talking about radio buttons, checkboxes, or just clicking the text itself?
  5. What I'm trying to do is setup in mysql row to have a picture name to go with my item. example: name: cup; picture:cup.jpg This works fine when in php i try to pull up the picture when i pull up the item as long as i have my picture stored in the folder. But, what i want to do is if the picture is not in the folder or i have not spelled something correctly then i want it to default to a defaut picture. Is there some way to do this?
  6. I was looking at dell.com and i saw how you can click on a radio input and it will change the price with what you have selected and also the upgrade and downgrade options change too. I was tyring to do this in php but am having a little trouble. here is the dell website [a href=\"http://configure.us.dell.com/dellstore/config.aspx?c=us&cs=19&l=en&oc=DB110A&s=dhs\" target=\"_blank\"]http://configure.us.dell.com/dellstore/con...oc=DB110A&s=dhs[/a] here is my code so far. I cant figure out how to have it change once i clike on the radio button. [!--coloro:#333399--][span style=\"color:#333399\"][!--/coloro--]<html> <head> <title>Upgrade</title> </head> <form> <?php $var1 = 10; $var2 = 20; $var3 = 40; $selection = 1; if ($selection == 1) { $update1 = $var1; $update2 = $var1+$var2; $update3 = $var1+$var2+$var3; echo '<input type="radio" value"1" checked="true">Basic<br>'; echo '<input type="radio" value"2"">Bronze +$'.$update1.'<BR>'; echo '<input type="radio" value"3">Silver +$'.$update2.'<BR>'; echo '<input type="radio" value"4">Gold +$'.$update3.'<BR>'; } if ($selection == 2) { $update1 = $var1; $update2 = $var2; $update3 = $var2+$var3; echo '<input type="radio" value"1">Basic -$'.$update1.'<BR>'; echo '<input type="radio" value"2" checked="true">Bronze<BR>'; echo '<input type="radio" value"3">Silver +$'.$update2.'<BR>'; echo '<input type="radio" value"4">Gold +$'.$update3.'<BR>'; } if ($selection == 3) { $update1 = $var1+$var2; $update2 = $var2; $update3 = $var3; echo '<input type="radio" value"1">Basic -$'.$update1.'<BR>'; echo '<input type="radio" value"2">Bronze -$'.$update2.'<BR>'; echo '<input type="radio" value"3" checked="true">Silver<BR>'; echo '<input type="radio" value"4">Gold +$'.$update3.'<BR>'; } if ($selection == 4) { $update1 = $var1+$var2+$var3; $update2 = $var2+$var3; $update3 = $var3; echo '<input type="radio" value"1">Basic -$'.$update1.'<BR>'; echo '<input type="radio" value"2">Bronze -$'.$update2.'<BR>'; echo '<input type="radio" value"3">Silver -$'.$update3.'<BR>'; echo '<input type="radio" value"4" checked="true">Gold<BR>'; } ?> </form> <body> </body> </html>[!--colorc--][/span][!--/colorc--] if there is a tutorial for this let me know.
  7. that worked. and i wont cross post. Im new at this :)
  8. I have been trying to get some help with my php code. I posted a forum at [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95200&pid=381079&st=0&#entry381079\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...=0&#entry381079[/a] but no one has tried to awnser my problem. If anyone can help let me know
  9. Does anyone know how to make this work?
  10. that worked but now i have the problem of doing it within a template. My index.php looks like this <?php include("template/header.tpl.html"); include("template/menu.tpl.html"); if (empty($_GET['page'])) { $page = 'home.php'; } else { $page = $_GET['page']; } if (false == is_file($page)) { $page = 'file_not_found.php'; } include($page); include("template/footer.tpl.html"); ?> this works for all my links if i put in <a href="index.php?page=test.php"> but when i try to access my model i have <a href="index.php?page=model.php?m='.$row['model'].'"> and it comes up as page not found with this in the address bar index.php?page=model.php?m=T4R23 if i remove the m=T4R23 it goes into the page but with errors. So i know that the link is good. Any help would be great on how to make this work
  11. [!--quoteo(post=380767:date=Jun 6 2006, 02:41 PM:name=Randy)--][div class=\'quotetop\']QUOTE(Randy @ Jun 6 2006, 02:41 PM) [snapback]380767[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code]while($row = mysql_fetch_array( $result )){     echo '<a href="model.php?m='.$row['model'].'"><br>'; }[/code] model.php [code]<?php     $model = $_GET['m'];     $result = mysql_query("SELECT * FROM `table` WHERE (`model`='$model')");     echo("Model: $model");     echo("<br>Price: " . mysql_result($result, 0, "price")); ?>[/code] Very simple example... [/quote] hey thanks. Do you know where I can find some tutorials on that area?
  12. I have something like this while($row = mysql_fetch_array( $result )) { echo '<a href="'.$row['model'].'"><br>'; } How do i link to a template page that when they click on the model that they want, it will go to a template page and put the rest of the values from that "model" row.
  13. [!--quoteo(post=380711:date=Jun 6 2006, 12:21 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Jun 6 2006, 12:21 PM) [snapback]380711[/snapback][/div][div class=\'quotemain\'][!--quotec--] substr($row['whatever'],0,strpos($row['whatever'], '('); [/quote] Thanks you have been a big help
  14. Is there a way to stop at a charrater like (
  15. I am trying to get some info from a value in mysql, but i dont want the whole value just the first few words. I do want the data later but i want it as a short preview of what is in the row.
×
×
  • 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.