PDA

View Full Version : button and textfield


blur_image
03-12-2008, 07:32 PM
hello.
i am new on dreamweaver mx and i am trying to do this.i have two buttons in a form.and i have a textfield.in the form i have get and it locates the same asp file (example.asp).on the first button a have a value (dog) and second (cat).when i push first button my link change from example.asp to /example.asp?Submit=dog and if i push the other one it goes to /example.asp?Submit=cat.i think this is working ok.how could i use the textfield to display the word dog or cat when i am at the first or second place?
please help me.thank you

*there is no java.just single values on each button.

blur_image
03-13-2008, 09:38 AM
hello.
i am new on dreamweaver mx and i am trying to do this.i have two buttons in a form.and i have a textfield.in the form i have get and it locates the same asp file (example.asp).on the first button a have a value (dog) and second (cat).when i push first button my link change from example.asp to /example.asp?Submit=dog and if i push the other one it goes to /example.asp?Submit=cat.i think this is working ok.how could i use the textfield to display the word dog or cat when i am at the first or second place?
please help me.thank you

*there is no java.just single values on each button.
I just need to add something.On the page i have a database.I need to display all about dog or cat.the problem is how to get the word i need so it can display only that.maybe it cannot be displayed in a textfield.
thank you all.

blur_image
03-14-2008, 11:49 PM
I just need to add something.On the page i have a database.I need to display all about dog or cat.the problem is how to get the word i need so it can display only that.maybe it cannot be displayed in a textfield.
thank you all.
maybe this could help.it is an example.the link is http://blurimage.webng.com/index2.asp
please help.butto

mangofreak
03-21-2008, 11:31 PM
ok. what I would do is to use a pull down menu, but here we go:

Select * From tblCatsandDogs
Where cats = "cat" AND dogs = "dog"

Post your code, I'll give you a hand. Or let me know if you already figured it out.

blur_image
03-25-2008, 10:21 PM
I do not know how to write down the code.hope this is how to do it.i will put all code

<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1253"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1253">
<style type="text/css">
<!--
body {
background-color: #000000;
}
body,td,th {
color: #FFFFFF;
}
.style3 {font-size: 12px}
.style4 {font-size: 12}
a:link {
color: #FFFFFF;
}
a:visited {
color: #F7F7F7;
}
a:hover {
color: #F7F7F7;
}
a:active {
color: #F7F7F7;
}
-->
</style>
<link href="mybutton.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="800" height="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="100"><table width="800" height="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="160" colspan="5" rowspan="2">&nbsp;</td>
<td width="100" height="80">&nbsp;</td>
<td width="100" height="80">&nbsp;</td>
<td width="100" height="80">&nbsp;</td>
</tr>
<tr>
<td height="80" colspan="3"><div align="center"></div></td>
</tr>
<tr>
<td colspan="2" rowspan="4" bgcolor="#000033"><table width="100" height="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="400"><form name="form1" method="get" action="index2.asp">
<table width="100" height="240" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40"><div align="center"><span class="mybutton">
<input name="Submit" type="submit" class="mybutton" value="Dog">
<input name="Submit2" type="submit" class="mybutton" value="Cat">
</span></div></td>
</tr>
<tr>
<td><div align="center"><span class="mybutton">
</span></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<p>&nbsp;</p></td>
<td width="100" height="100">&nbsp;</td>
<td height="100" colspan="2"><form name="form2" method="post" action="">
<input type="text" name="textfield">
</form></td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
<tr>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
<tr>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
<tr>
<td width="100" height="100">mytest</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
<p class="style3">&nbsp;</p>
</body>
</html>


as you see there is no database yet.i only need when i push the button the value to be displayed in the textfield.if that is possible.
thanks anyway.

mangofreak
03-27-2008, 04:05 AM
what you want can be done with javascript but I do not write javascript. :( something I'm not proud to confess.

blur_image
03-27-2008, 09:05 AM
nobody can do everything.we are not god.:) i can't write java too.

domedia
03-27-2008, 01:47 PM
nobody can do everything.we are not god.:) i can't write java too.
And remember that Javascript and Java are two very different languages. :)

student101
03-29-2008, 09:31 PM
hello.
i am new on dreamweaver mx and i am trying to do this.i have two buttons in a form.and i have a textfield.in the form i have get and it locates the same asp file (example.asp).on the first button a have a value (dog) and second (cat).when i push first button my link change from example.asp to /example.asp?Submit=dog and if i push the other one it goes to /example.asp?Submit=cat.i think this is working ok.how could i use the textfield to display the word dog or cat when i am at the first or second place?
please help me.thank you

*there is no java.just single values on each button.

You need an onclick or onsubmit event (I prefer the onclick)

<input name="bdog" type="button" id="bdog" onClick="messagebox.value=bdog.value;" value="Dog" />
<input name="bcat" type="button" id="bcat" onClick="messagebox.value=bcat.value;" value="Cat"/>
<input name="messagebox" type="text" id="messagebox">

Hope this helps you.

Cheers