943,518 Members | Top Members by Rank

Ad:
Jul 8th, 2003
0

Javascript/HTML problem!!!

Expand Post »
When I disable my webpage the text in my edit fields duplicates. e.g. ABC changes to ABCABC. THis only seems to happen when I have my edit fields in a <table>. A sample of my code is provided. I'd appreicate any help. Thanks, B.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>Test</title>
  4.  
  5. <script type="text/javascript">
  6. <!--
  7. function disableForm(form)
  8. {
  9. alert('disable form');
  10. form.disabled=true;
  11. }
  12.  
  13.  
  14. // -->
  15. </script>
  16.  
  17.  
  18. </head>
  19.  
  20. <body>
  21. <form name="formname">
  22.  
  23. <table>
  24.  
  25. <tbody>
  26. <tr>
  27. <td>
  28.  
  29. <input type=edit name="textinput" value="abc"/>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td align=left>input</td>
  34. <TD align=left><input type=edit name=userName>* </TD>
  35. </tr>
  36.  
  37. </tbody>
  38.  
  39. </table>
  40. <input type="button" value="test" onclick="java script:disableForm(this.form);" />
  41. </form>
  42. </body>
  43. </html>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bboyle is offline Offline
3 posts
since Jul 2003
Jul 8th, 2003
0

Re: Javascript/HTML problem!!!

what does this page actually suppose to do cause from what i can see it works and runs on my computer after i removed
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. java script:
from line
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <input type="button" value="test" onclick="java script:disableForm(this.form);" />
please if that doesnt do it can you explain what the page does so when i take it and run it i know if its working right.
Team Colleague
Reputation Points: 36
Solved Threads: 2
PFO Founder
big_k105 is offline Offline
308 posts
since May 2003
Jul 8th, 2003
0

Re: Javascript/HTML problem!!!

I have to ask the same.

What do you want the page to do.

The formating is kind of wacky, but otherwise, if you remove the JavaScript: and the ending ";" as big_k105 said, it works fine, according to your posted code/function implementation.
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Jul 9th, 2003
0

Re: Javascript/HTML problem!!!

Sorry! I posted the wrong code!! I have since adjusted it. It is just a very rough sample of something I'm working on, I know the formatting is not right in some places. Anyway what I basically want to try to do is to disable the from. The problem I am having is that when my fields are inside a table the text duplicates when the form is disabled. You should be able to see that if you run my now adjusted code.
Thanks, B
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bboyle is offline Offline
3 posts
since Jul 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Scrolling On/Off issue
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Image Trouble





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC