Javascript/HTML problem!!!

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jul 2003
Posts: 3
Reputation: bboyle is an unknown quantity at this point 
Solved Threads: 0
bboyle bboyle is offline Offline
Newbie Poster

Javascript/HTML problem!!!

 
0
  #1
Jul 8th, 2003
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>
Reply With Quote Quick reply to this message  
Join Date: May 2003
Posts: 307
Reputation: big_k105 is an unknown quantity at this point 
Solved Threads: 2
Team Colleague
big_k105's Avatar
big_k105 big_k105 is offline Offline
PFO Founder

Re: Javascript/HTML problem!!!

 
0
  #2
Jul 8th, 2003
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: Javascript/HTML problem!!!

 
0
  #3
Jul 8th, 2003
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.
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Jul 2003
Posts: 3
Reputation: bboyle is an unknown quantity at this point 
Solved Threads: 0
bboyle bboyle is offline Offline
Newbie Poster

Re: Javascript/HTML problem!!!

 
0
  #4
Jul 9th, 2003
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC