Solved

Drupal.settings.basePath...what is this path?

Posted on 2010-08-31
6
2,580 Views
Last Modified: 2012-06-21
Hey all,
I have an script that I'm trying to figure out and it uses the following then appends more to the path.  My question is...what is the path to Drupal.settings.basePath ?

How can I find the url/path for: Drupal.settings.basePath ?

Thank you.
0
Comment
Question by:ModifyMe
  • 3
  • 2
6 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 33567698
Have a look at the following:

http://drupal.org/node/114774#base_path

Gary
0
 

Author Comment

by:ModifyMe
ID: 33567745
Yeah, and I'll be honest...I really could not understand it.  Just wondering if Drupal.settings.basePath is static.  

If so, what is the actual path?  
If not, is there a way to find the url/path it's pointing to?
0
 
LVL 46

Accepted Solution

by:
tbsgadi earned 500 total points
ID: 33567838
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:ModifyMe
ID: 33567968
Ok Gary, I may be over my head on this one.  A former employee developed this module which did work, but now for some reason does not and I am trying to troubleshoot to fix.

I did review the link you just sent at akchauhan and understand it a bit more.  But my knowledge may be starting to become limited.

In our custom .js script, there is a variable which looks like the following:
var url = Drupal.settings.basePath +  "xxxx/xxxx_url";

So my goal is to figure our what this path is...

Sorry for being vague, this is my first experience with custom module development in Drupal.
0
 
LVL 17

Expert Comment

by:Thomas4019
ID: 33569077
if all you want to do is figure out what is it add this line to your javascript file. It should temporarily make a really annoying popup window with the value.
alert(Drupal.settings.basePath);
0
 

Author Closing Comment

by:ModifyMe
ID: 33643223
Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now