Jump to content

Any Idea Why This Wont work


glenelkins

Recommended Posts

Hi any ideas why the confirm dialog wont show?

[code]
// Check if the user has finished creating their profile
if ($finished == 0) {
?>
<script language="javascript">
if (confirm ('Have You Finished Creating Your Wedding Page?')) {
alert ("Ok");
} else {
alert ("Bummer")
</script>
<?
}
[/code]
Link to comment
Share on other sites

I have had errors from validator.w3c.org that 'language' is not a valid attribute for a script tag, though I think I have had js running in tags like that before. Use type="text/javascript" anyway, I don't know if that will fix it, it looks OK to me.

We must be nearing the end of the world - computers are not obeying our command!
Link to comment
Share on other sites

[code]// Check if the user has finished creating their profile
if ($finished == 0) {
?>
<script type='text/javascript'>
if (confirm ('Have You Finished Creating Your Wedding Page?')) {
alert ("Ok");
} else {
alert ("Bummer")
}
</script>
<?
}[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.