hello.
i have a page where if you don't select an option an alert message is displayed(i'm using javascript and php). when the user clicks 'ok' the parent page is refreshed. i don't want this(the refreshing). can anyone tell me what to do?

i got it...just had to add a return false to my onsubmit.

onsubmit="check();return false;"

i also added a return false after the alert() statement..

If you have the check() function return false, you can remove the return false; from your onsubmit event.

It's just a bit cleaner that way ;-)

ok...thank you :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.