Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-08-31
6
Medium Priority
?
2,677 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 33567838
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

715 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