Link to home
Start Free TrialLog in
Avatar of Nathan Riley
Nathan RileyFlag for United States of America

asked on

Remove "The Page at domain.com says:" within Popup

I have the following code that puts up a pop up when the user hits submit:
<script>
function submitForm()
{
  //perhaps some client validation here
  document.forms["yourform"].submit();
  alert("Thanks for submitting.")
}
</script>
<input type="button" onclick="submitForm();" name="go" value="Go" />

Open in new window


The pop up that then comes up is:
The page at domain.com says:

Thanks for submitting.

Open in new window


How can I edit my script to remove the "The page at domain.com says:" part?
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

The problem is you are popping up an alert after the submit.

Just put a message in a hidden div and change the display property to block BEFORE you submit.

Or handle it from the server side by replying back with the message after you submit.

Cd&
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial