logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-12-2008, 07:32 PM   #1
blur_image
 
Join Date: Mar 2008
Posts: 5
Default button and textfield

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 is offline   Reply With Quote
Old 03-13-2008, 09:38 AM   #2
blur_image
 
Join Date: Mar 2008
Posts: 5
Default

Quote:
Originally Posted by blur_image View Post
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 is offline   Reply With Quote
Old 03-14-2008, 11:49 PM   #3
blur_image
 
Join Date: Mar 2008
Posts: 5
Default

Quote:
Originally Posted by blur_image View Post
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
blur_image is offline   Reply With Quote
Old 03-21-2008, 11:31 PM   #4
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

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.
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 03-25-2008, 10:21 PM   #5
blur_image
 
Join Date: Mar 2008
Posts: 5
Default re:

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="VBS CRIPT" 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.
blur_image is offline   Reply With Quote
Old 03-27-2008, 04:05 AM   #6
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

what you want can be done with javascript but I do not write javascript. something I'm not proud to confess.
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 03-27-2008, 09:05 AM   #7
blur_image
 
Join Date: Mar 2008
Posts: 5
Default

nobody can do everything.we are not god. i can't write java too.
blur_image is offline   Reply With Quote
Old 03-27-2008, 01:47 PM   #8
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Quote:
Originally Posted by blur_image View Post
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.
domedia is offline   Reply With Quote
Old 03-29-2008, 09:31 PM   #9
student101
 
Join Date: Dec 2007
Posts: 379
Thumbs up

Quote:
Originally Posted by blur_image View Post
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)

PHP Code:
 <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
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com