473,385 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to disable php script messages using javascript??

Hi

I have user-side javascript that validates a form. And I have server-side
php script thad does the same. Is it possible to disable php script from
showing messages about missing values if javascrpt did it before??

i have
<div id='wrong"></div> that contains these messages. So I tried to set
style.display='none' but it seems that it doesn't work.
I guess this is because javascript first sets style.display='none' but it
has no effect on php script that just write messages...
Am I right?

What is the way to solve this problem?

Thanks for help.
Leszek

Feb 4 '06 #1
1 2166
Le Sat, 04 Feb 2006 05:37:10 +0100, Leszek a écrit :
I have user-side javascript that validates a form. And I have server-side
php script thad does the same. Is it possible to disable php script from
showing messages about missing values if javascrpt did it before??
The javascript checks the user's error, right? It's up to it not to call
the page if there's an error. You could, in the submit event, tell the
javascript to not call the php page. Otherwise, you could set up a boolean
parameter in the form, such as a hidden field, where the php could find
wether the form is good or not.

i have <div id='wrong"></div> that contains these messages. So I
tried to set style.display='none' but it seems that it doesn't work. I
guess this is because javascript first sets style.display='none' but it
has no effect on php script that just write messages... Am I right?
The php server-side code processes the page before sending it. I can
suppose that as soon as the php got the page, it means that the page is
good. Why such a need, then?

What is the way to solve this problem?


- Think carefully about the interaction between JS and PHP.
- Keep on writing on usenet ;-)
--
Christophe HENRY
fo***************@nerim.net (sans lkm)
GnuPG : 3922239E60036EC86BF7268A877C52AC 4883C02A
Feb 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: KS | last post by:
Im trying to prevent the user from clicking any other links on my page when the user have selected/clicked a href once. Sometimes it takes a while before the next page loads so some user will try...
3
by: P Wolpert | last post by:
This is my first post. I hope I don't sound stupid. I have a script conflict when I put two scripts on one page. Both scripts will work if I use one at a time but the menu button script will not...
2
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
1
by: Bob | last post by:
Does anyone know how to disable javascript in the new Netscape 8 -- for off line testing (like can be done readily with the current MSIE, Firefox or Opera browsers) ? When I try tools -> options...
8
by: jpaul | last post by:
Hi I am very new to this two If the browser disable the javascript, what happen to Ajax? can i slove the problem by using server side script? any suggestion for this? i currently do some dirty...
3
by: bhanubalaji | last post by:
hi, I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA.. can any one help regarding this.. What's the wrong with my code? I am...
56
by: Deepan HTML | last post by:
Hi All, Currently i am working in a framed environment where i have divided the window as 20% and 80% and the 20% is used for navigation purpose and right frame for displaying the orignal content....
8
by: alamodgal | last post by:
hiiiiiiiiiii everybody, pls solve my problem if u can? Actualy what happens in my site when i press enter key it will show some secured...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.