User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 330,125 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,009 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 5056 | Replies: 3
Reply
Join Date: Jul 2003
Posts: 3
Reputation: bboyle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bboyle bboyle is offline Offline
Newbie Poster

Javascript/HTML problem!!!

  #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.

<html> 
<head> 
<title>Test</title> 

<script type="text/javascript"> 
<!-- 
function disableForm(form) 
{ 
alert('disable form'); 
form.disabled=true; 
} 


// --> 
</script> 


</head> 

<body> 
<form name="formname"> 

<table> 

<tbody> 
<tr> 
<td> 

<input type=edit name="textinput" value="abc"/> 
</td> 
</tr> 
<tr> 
<td align=left>input</td> 
<TD align=left><input type=edit name=userName>* </TD> 
</tr> 

</tbody> 

</table> 
<input type="button" value="test" onclick="java script:disableForm(this.form);" /> 
</form> 
</body> 
</html>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2003
Location: Fargo, ND
Posts: 301
Reputation: big_k105 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
Colleague
big_k105's Avatar
big_k105 big_k105 is offline Offline
Coding God (i wish)

Re: Javascript/HTML problem!!!

  #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
 java script: 
from line
 <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  
Join Date: Feb 2003
Location: Canada
Posts: 786
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Rep Power: 9
Solved Threads: 25
Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: Javascript/HTML problem!!!

  #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, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Reply With Quote  
Join Date: Jul 2003
Posts: 3
Reputation: bboyle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bboyle bboyle is offline Offline
Newbie Poster

Re: Javascript/HTML problem!!!

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 1:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC