Computing.Net > Forums > Web Development > Expert in HTML/Dreamweaver, help!

Expert in HTML/Dreamweaver, help!

Reply to Message Icon

Original Message
Name: lch
Date: February 3, 2006 at 05:59:51 Pacific
Subject: Expert in HTML/Dreamweaver, help!
OS: windows XP Sp2
CPU/Ram: 320MB
Comment:

I need help urgently. I tried alot of webpages forums but they did not reply. I hope someone could help me out for my project.

This is my source code for an webpage. Can i use any javascript or codes to make it works like this?

If "messagepos" and "messageneg" are empty (they are messagebox),
It will disable the button "Submit".
Or
when you click "submit" button to "CSVwrite.pl", it will stop whatever function and appear pop up box, ask you to fill in something.


quote:

----------------------

<!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=iso-8859-1">
<style type="text/css">

</style>
</head>

<body>
<form name="form1" method="post" action="cgi-bin/csvwrite.pl">
<p class="style1">Please write something you hate about Chung Hong </p>


<textarea name="messageneg" cols="60" rows="10" id="messageneg"></textarea>
</p>

<span class="style1">Please write something you like about Chung Hong</span></p>

<span class="style1">
<textarea name="messagepos" cols="60" rows="10" id="messagepos"></textarea>
</span></p>


<input name="name" type="hidden" id="name" value="Denise">
<input name="name2" type="hidden" id="name2" value="------">
</p>


<input type="submit" value="submit">
</p>
</form>

 </p>
</body>
</html>


----------------------

Please...


Report Offensive Message For Removal


Response Number 1
Name: Michael J (by mjdamato)
Date: February 3, 2006 at 07:16:49 Pacific
Reply: (edit)

I'm not a dreamweaver expert (I don't use WYSIWYG editors). But, if you can make the following changes, this will work for you:

1. In the head of the document, add the following code:

<script language="javascript">
function checkValues() {
o = document.form1;
if (o.name.value && o.name2.value) {o.submit.disabled = false;}
else {o.submit.disabled = true;}
}
</script>

2. Add the following to the two text boxes:

<input name="name" type="hidden" id="name" value="Denise" onkeyup="checkValues();">
<input name="name2" type="hidden" id="name2" value="------" onkeyup="checkValues();">

3. Change the submit button as follows:
<input type="submit" value="submit" name="submit" disabled>

You should probably check it out in a few different browsers for compatability.

Michael J


Report Offensive Follow Up For Removal

Response Number 2
Name: lch
Date: February 4, 2006 at 18:14:48 Pacific
Reply: (edit)

thanks for the reply, i will try it.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Expert in HTML/Dreamweaver, help!

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge