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 403,506 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,209 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: 3062 | Replies: 14 | Solved
Reply
Join Date: Jun 2006
Location: India
Posts: 6,816
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 339
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: has no properties...

  #11  
Jun 23rd, 2007
I still won't whether you completely understand Javascript and its use. I see a lot of hanging useless pieces of <script> tags scattered all over the pages and even after the closing </html> tag !!!

I see a lot of problems:

1. The function definition should be something like:
  1. <script type="text/javascript" language="javascript">
  2. function doIt(id)
  3. {
  4. if(document.getElementById(id).value == "true")
  5. {
  6. alert("Supplier Saved");
  7. document.getElementById(id).value = "false";
  8. }
  9. }
  10. </script>
  11.  
  12. ....pass to doIt the id of the hidden field whose value you want
  13.  
  14. <body onload="doIt('a2z:_link_hidden_');">
  15.  
  16. ....

And stop changing the id and names of your fields, you just end up confusing us. And decide on which fields value is required for you to display the error message.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Apr 2007
Posts: 18
Reputation: Arch_Bytes is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Arch_Bytes Arch_Bytes is offline Offline
Newbie Poster

Re: has no properties...

  #12  
Jun 23rd, 2007
function doIt(){
alert(document.getElementById('a2z:saveMessage').value);

if(document.getElementById('a2z:saveMessage').value=true)
{
alert("Supplier Saved");
document.getElementById('a2z:saveMessage').value=false;
}
}
 

thanks to all your help i was able to solve the no properties error.. now i've got a new problem, even if the value is false it keeps entering the condition and I cant find out why..
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,816
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 339
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: has no properties...

  #13  
Jun 23rd, 2007
Originally Posted by Arch_Bytes View Post
function doIt(){
alert(document.getElementById('a2z:saveMessage').value);

if(document.getElementById('a2z:saveMessage').value=true)
{
alert("Supplier Saved");
document.getElementById('a2z:saveMessage').value=false;
}
}
 

thanks to all your help i was able to solve the no properties error.. now i've got a new problem, even if the value is false it keeps entering the condition and I cant find out why..

Do this:
  1. function doIt()
  2. {
  3. alert(document.getElementById('a2z:saveMessage').value);
  4. if(document.getElementById('a2z:saveMessage').value == "true")
  5. {
  6. alert("Supplier Saved");
  7. document.getElementById('a2z:saveMessage').value = "false";
  8. }
  9. }
Last edited by ~s.o.s~ : Jun 23rd, 2007 at 1:04 pm.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Apr 2007
Posts: 18
Reputation: Arch_Bytes is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Arch_Bytes Arch_Bytes is offline Offline
Newbie Poster

Re: has no properties...

  #14  
Jun 23rd, 2007
thanks your suggestions worked!! thank you guys really.. now I can't finally get some rest..
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,816
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 339
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: has no properties...

  #15  
Jun 23rd, 2007
Glad you could figure it out. Try reading some good tutorials to solidify your concepts of Javascript and you won't run into such simple problems.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Reply

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

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

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

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