Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Oct 2009, 21:07
sifuhall sifuhall is offline
 
Join Date: Nov 2001
using javascript in admincp?

I'm working on a new product and it is going very well.

I've added my cpnav file and am working on my admin functions and I would like to use javascript to get a confirmation before something is deleted.

I've tried printing that directly out, closing the php tags, etc, but I can't seem to get javascript from inside the admincp.

for example, I've trried the following:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


and also



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


In both cases when do == equipment I get the cp header, but no javascript is printed.
__________________
Reply With Quote
  #2  
Old 01 Oct 2009, 21:27
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Not sure if it'd make a difference but have you tried return?
return "<script type=\"text/javascript\">alert('confirmation')</script>";

I'd recommend running the script out of PHP tags though.. it could be that the PHP is parsing the ending javascript semi-colon as the end of the PHP string.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:27.

Layout Options | Width: Wide Color: