Forum closed. New forum available at http://community.wymeditor.org/

link to .php instead of .js file

Support forum for WYMeditor.

link to .php instead of .js file

Postby Anniepannie on Sat Nov 28, 2009 9:39 pm

Hi there!

I'm trying to slightly customise this great editor, but I'm encountering a slight yet very annoying problem.

I'd like to change the insert link dialog box, so my clients can choose between linking to an external URL, another page on their website, or a photo/file. I'm used to using php to make this possible (making a list of all other pages or images, ...), so I'd like to insert some php parts in the jquery.wymeditor.min.js file.

That, off course as JavaScript is client side, is not possible. Therefore, I was thinking of linking to a php file in the example like this:
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.php"></script>
instead of
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
and then put the following line in my php file:
<?php header('Content-type: application/javascript'); ?>, before using the content of the original .js file.

Somehow, this also does not work, though, as I for example ask firefox to give me the page information on both files, it gives exactly the same info.

Any solution to this problem?
Anniepannie
 
Posts: 3
Joined: Sat Nov 28, 2009 9:23 pm

Re: link to .php instead of .js file

Postby mr_lundis on Thu Jan 07, 2010 11:37 am

Hi!
Could you possibly provide a test page? Just guessing what's wrong could take forever.

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: link to .php instead of .js file

Postby roundash on Thu Jan 07, 2010 10:05 pm

Hi

Try this thread http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=554

Basically you can call a php file via ajax from within the dialog.

Hope this helps
roundash
 
Posts: 24
Joined: Wed May 30, 2007 4:13 pm
Location: Devon, UK


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests