•
•
•
•
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 428,574 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,608 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: 3182 | Replies: 14 | Solved
![]() |
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:
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 see a lot of problems:
1. The function definition should be something like:
javascript Syntax (Toggle Plain Text)
<script type="text/javascript" language="javascript"> function doIt(id) { if(document.getElementById(id).value == "true") { alert("Supplier Saved"); document.getElementById(id).value = "false"; } } </script> ....pass to doIt the id of the hidden field whose value you want <body onload="doIt('a2z:_link_hidden_');"> ....
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.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
•
•
Join Date: Apr 2007
Posts: 18
Reputation:
Rep Power: 2
Solved Threads: 0
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..
•
•
•
•
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:
javascript Syntax (Toggle Plain Text)
function doIt() { alert(document.getElementById('a2z:saveMessage').value); if(document.getElementById('a2z:saveMessage').value == "true") { alert("Supplier Saved"); document.getElementById('a2z:saveMessage').value = "false"; } }
Last edited by ~s.o.s~ : Jun 23rd, 2007 at 1:04 pm.
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Display properties won't come up (Windows NT / 2000 / XP / 2003)
- Question about Properties (Java)
- Properties (Java)
- Display properties/settings/Desktop area (Windows 9x / Me)
- Create menu from properties file by recursion (Java)
- My Computer Icon Linked To System Properties: How Do I Fix It? (Windows 9x / Me)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: how to send data in POST method using javascript
- Next Thread: kalah african game problem...



Linear Mode