JavaScript and client side scripting.
Moderator: General Moderators
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
Post
by Charles256 »
Code: Select all
<script language='javascript' type="text/javascript">
var test=confirm("Are you sure?");
if (test)
{
Event successfully deleted.<br />
<a href='admin.php?admin=3'>Return</a> }
else
{
<a href='admin.php?admin=3'>Return</a> }
</script>
any idea why that confirm isn't firing?
-
Burrito
- Spockulator
- Posts: 4715
- Joined: Wed Feb 04, 2004 8:15 pm
- Location: Eden, Utah
Post
by Burrito »
you have "Event successfully deleted.<br />
<a href='admin.php"
and
" <a href='admin.php?admin=3'>Return</a> "
just kinda hanging out in the script...they need a home otherwise the whole thing will die
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
Post
by Charles256 »
Code: Select all
<script language='javascript' type="text/javascript">
var test=confirm("Are you sure?");
if (test)
{
document.write("Event successfully deleted.<br />
<a href='admin.php?admin=3'>Return</a>"); }
else
{
document.write("<a href='admin.php?admin=3'>Return</a>"); }
</script>
okay...that should do it..it's not.why's it mad now?
-
Burrito
- Spockulator
- Posts: 4715
- Joined: Wed Feb 04, 2004 8:15 pm
- Location: Eden, Utah
Post
by Burrito »
the write method has to contain everything on the same line:
Code: Select all
<script language='javascript' type="text/javascript">
var test=confirm("Are you sure?");
if (test)
{
document.write("Event successfully deleted.<br /> <a href='admin.php?admin=3'>Return</a>"); }
else
{
document.write("<a href='admin.php?admin=3'>Return</a>"); }
</script>
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
Post
by Charles256 »
ah ha.thanks.knew it was something trivial.thanks a lot man.